0

I'm tearing my hair out trying to setup dnsmasq. I'd like to be able to resolve certain local domains (just as a test) to my own machine, and forward the rest to my regular DHCP nameserver that's coming from campus. I'm running Ubuntu 20.04.

Here's what I need from dnsmasq:

  • A wildcard resolver to some local test domain.
  • Full compatibility with forwarding to my existing campus nameserver. I.e. I want 'search' from /etc/resolv.conf to still work, so 'neon' resolves to 'neon.cs.princeton.edu' as usual. I have been unable to even find the IP address of my campus nameserver, let alone keep 'search' working.
rosstex
  • 123
  • 1
  • 5

1 Answers1

1

In your dnsmasq conf file add these lines to forward specific domains to different IPs.

server=/domain1.ca/192.168.2.4
server=/domain2.ca/192.168.2.5

And this line to forward to your 'campus nameserver'

server=10.0.0.8

If you don't have these two things working yet (forward domain, and forward all else), troubleshoot until you get this piece working.

Once that works, start testing the search domains after that.

madacoda
  • 185
  • 7
  • I eventually got it working, thanks! Not sure if this is the cleanest way, but I changed resolv.conf to use nameserver 127.0.0.1, and set the falll-through for dnsmasq to 127.0.0.53, so both systems are still running. – rosstex May 06 '20 at 03:14