I have a domain, let’s call it mydomain.com. I have split DNS using dnsmasq, so I can resolve things locally based on their dhcp reservations (ex: nas.mydomain.com), which is what I want and is great. However, I also have a squarespace site, mydomain.com which I obviously do not host. So, currently, I cannot resolve mydomain.com on my local network.
Is it possible to have dnsmasq forward queries for a specific address? I know I can add a static address for it, but I don’t know if squarespace IP’s change…
I’m not that familiar with dnsmasq. Can’t help you here. That said, I know it’s possible, because we have an appliance at work that does it, it’s just that it has a web UI and I don’t have console access.
I don’t think this is possible. As an alternative, I will add the vlan description as the third level domain name and create static aliases for common things I’d like to access in the hosts file.
In my case (Ubiquiti EdgeOS), when server=/mydomain.com/9.9.9.9 is set while domain=mydomain.com is also set on a DHCP subnet, the result is that mydomain.com does not resolve, so domain= supercedes server=.
I’m kind of ok with my solution. It is cleaner to have the domain names mirror the vlans. This way I can do things like:
nas.san.mydomain.com and nas.srv.mydomain.com where the first one points to a port that only serves iscsi on a jumbo frame vlan and the second is the NAS’s default gateway and management port. Setting the search domain on the respective DHCP subnets allows nas to always resolve to the specific instance that is on the local subnet.