Cobra Forum

Linux => Networking & Wireless => Topic started by: kalpana on Oct 21, 2023, 03:55 AM

Title: resolve domain to different DNS when in specific wifi network
Post by: kalpana on Oct 21, 2023, 03:55 AM
Hi,

when connected to my home wifi, I want my laptop to resolve home-server.example.com to an IP in the local network. When connected to any other network, I want to use that network's DNS. The server is publicly reachable on the same domain through some levels of reverse-proxying through a VPN. My home router has a slow uplink and no public IPv4 address.

I'm using the standard Ubuntu NetworkManager setup. I realize I can set DNS overrides in NetworkManager's settings, but those are for DNS servers, not single domains. If running a DNS server on my laptop is the best way forward, what software would you recommend setting a single override like this?

Best regards