A common setup: the company runs a PBX in the office, while some employees work from home or on the road. With one hostname and split DNS, both groups connect to the same PBX — office users over the LAN, remote users over the internet.
Setup
- Create a public hostname pointing to the office's public IP address, e.g.
webclient.company.com A 123.123.123.123. - Get a TLS certificate for that (sub)domain and install it on the PBX.
- Forward the websocket port on the router to the PBX, e.g.
123.123.123.123:8089 → 192.168.1.100:8089(plus the RTP range for media). - Add an internal DNS record for the same name pointing to the private IP, e.g.
webclient.company.com → 192.168.1.100.
How it works
| Where the user is | DNS answer | Connection |
|---|---|---|
| Outside the office | 123.123.123.123 (public) | Via the internet and the port forward |
| In the office | 192.168.1.100 (private) | Directly over the LAN |
Because the hostname is the same, the certificate is valid in both cases and users don't have to change anything.
Tip: you can also create the internal record with a DNS rewrite in Pi-hole or AdGuard.