Running 12.04 as a gateway - resolvconf, dhclient and dnsmasq integration
Posted
by
Adam
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Adam
Published on 2012-08-24T17:03:55Z
Indexed on
2012/08/30
15:49 UTC
Read the original article
Hit count: 412
I have a gateway server which is set up originally with Ubuntu desktop 12.04 - perhaps a mistake, I don't know, something to bear in mind.
I ripped out network-manage
r and now want to get resolvconf
, dhclient
and dnsmasq
to play well together.
dhclient
gets the gateway's eth0 WAN
ip address and the ISP DNS name server from the modem.
dnsmasq
needs to serve dhcp to the rest of the lan on eth1 and acts as a DNS cache both for the lan and for the gateway machine.
I also set up iptables
as a firewall.
Right now, the gateway's /etc/resolv.conf
shows only name server = 127.0.0.1
which is correct AFAIK.
However I don't think that dhclient is giving dnsmasq the ISP DNS name server nor is dnsmasq picking up the OpenDNS and Google name servers I specified in /etc/network/interfaces
- at the moment look-ups, i.e. ping or surfing, don't work unless I manually edit /etc/resolv.conf
to put in an upstream name server like 8.8.8.8
So I removed the resolvconf package.
Now I'm not getting dhcp on my lan and I'm not able to do DNS look-ups on the host itself - I can surf and ping on the net, but not 127.0.0.1.
Where do I go from here? This setup with the config for dhclient and dnsmasq, and the same resolv.conf and hosts files worked on my old debian box.
© Ask Ubuntu or respective owner