DNS redirect based on domain name


#1

I use a local dnsmasq to redirect specific domains. Mostly because I’ve got domains which are on both sides of a firewall and resolve to different addresses based on VPN status.

You’ve pretty much got the same effect with the local DNS but would be interesting if that could be expanded based on domain names.

eg: (dnsmasq config file)

server=/mydomain.ca/172.29.0.20
server=/dhcp.mydomain.ca/172.29.0.20
server=/google.com/8.8.8.8

server=8.8.4.4

That way you could direct an internal domain to an internal server rather than piling in a few hundred addresses.

Also on that line, something dnsmasq can’t do, would be wild cards. server=/host*.mydomain.ca/172.29.0.20