Tailscale client on public network can't access local domains defined in "Host Override"
-
my domain: mydomain.com
my home domain: home.mydomain.comPfsense: DNS resolver enabled with forwarded DNS enabled, and use Quad9 as upstream DNS (specified in pfSense General)
HAproxy on pfSense: handle public requests from public network (xxx.mydomain.com); and handle my home local domain (xxx.home.mydomain.com), by creating a Virtual IP, specifying all local subdomains (xxx.home.mydomain.com) in DNS-->Hosts Override pointing to the Virutal IP. So the same set of Haproxy acls/actions/backends is shared for both xxx.mydomain.com and xxx.home.mydomain.comUse scenarios with tailscale disconnected:
- using public internet
enter url: xxx.mydomain.com, success as expected
enter url: xxx.home.mydomain.com, not success as expected
- using home wifi
enter url: xxx.mydomain.com or xxx.home.mydomain.com, all success as expectedNow with Tailscale into the mixes
Headscale server: a docker container on my unraid, serving tailscale client via: headscale.mydomain.com
config: override_local_dns: true, nameservers: 192.168.1.1 (pfSense), magicdns: trueTailscale clients:
- on pfSense: router subnet allowed to access 192.168.1.0/24
- on debian vm (on Unraid, 192.168.1.2): as an exit node (not using pfSense as an exit node because I always lost internet connection when other tailscale clients use pfSense tailscale as an exit node)
- other laptops, mobile phones, ipad
Use scenarios with tailscale connected:
- using public internet
enter url: xxx.domain.com, success as expected
enter url: hostname.local domain defined in pfSense General ui: working
enter url: xxx.home.mydomain.com: not working
- using home wifi: all scenarios above work
My question is, when using public internet with tailscale connected, how can I access xxx.home.mydomain.com?
Please note that when I use wireguard connected to my pfsense, I can access xxx.home.mydomain.com -
@bthoven I found that using Virtual IP for my home.mydomain.com was the issue. Instead, using LAN interface IP (for my pfSense setup--> 192.168.1.1) has solved the problem.