Ive recently setup a box with 2 network cards as a firewall/router using fedora 13. Im using pppoe to connect to the internet (ppp0 interface)
I want to start using dnsmasq as a dns server for my lan but i have a curious issue with ppp0 and the ISPs dns servers.
In my 'ifcfg-ppp0' i have PEERDNS=yes and this successfully sets the ISPs dns entries (from dhcp) into /etc/resolv.conf.
My problem is now i want to use dnsmasq as the dns server for the local machine so i would to do the following.
1) Put 127.0.0.1 in /etc/resolv.conf
2) On ipup of ppp0, get it to write the nameserver entries to a different file
3) Tell dnsmasq to use that file instead of resolv.conf for upstream dns
Ive examined the ipup and ifup scripts and done a google search and there is reference to it also being written to /var/run/ppp/resolv.conf - this is correct but it also always overwrites /etc/resolv.conf
2 Solutions that ive considered are:
1) Make /etc/resolv.conf non-writable with permissions - not sure if this would cause issues elsewhere
2) Hard code the nameserver address for my ISP in the dnsmasq config and turn off PEERDNS in the ppp0 config - sounds great, until my isp changes their dns server ips.
If those two are my only options then so be it, but since this surely must be a fairly common configuration (1 box for ppp and dns server) i thought i would ask before giving up.
Please let me know if more detail is required.