[PLUG] automate replacing resolv.conf file at startup

Mike Connors mconnors1 at gmail.com
Sat Dec 19 05:42:08 UTC 2009


Russell Senior wrote:
>  So, ignoring DHCP supplied DNS *might* be shooting yourself in the foot in
> some circumstances.  
For my purposes, overwriting resolv.conf in rc.local is the best 
solution and it shouldn't hamstring me as the DNS changes occur after 
network configuration has occurred. I'll test it on a PTP node this 
weekend to confirm.
> My initial thought was to just intercept all port
> 53 traffic and direct it to our nameserver.  That could either
> transparently solve the problem or potentially create other ones.
> Something like (untested):
>
>   iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 10.11.x.x:53
I would expect that most captive portals do something like this.

I think there's more to understand about how all this works. Because 
when I configured my conf file not to request DNS info in DHCP 
communications to my Linksys router, I still got DNS info from the 
Comcast modem upstream. I'm going to create static DNS entries on my 
Linksys and then make changes to the dhclient.conf request stanza and 
see what I can figure out...



More information about the PLUG mailing list