Posted: Sun Jun 18, 2006 19:45 Post subject: automagically setting dnsmasq dhcp-option values
We have 4 clients that are quite busy with p2p and as such are generating a lot of dns lookups. That's why I set the dnsmasq option
Code:
dhcp-option=6,xx.xx.xx.xx,xx.xx.xx.xx
because the router (WRT54GL) isn't able to handle all of the requests and breaks down.
Now my remaining problem or question is if there's already a clever way to automagically get the ISP's nameservers and insert them into /tmp/dnsmasq.conf ?
I guess it could easily be done using a shell script with grep and/or awk that reads the current nameservers from resolv.conf (or better yet, grabs them directly from the router's dhcp client?) and inserts them into /tmp/dnsmasq.conf
Has somebody already created such a script? I'll have a look at the dhcp client and see if there's a way to write the nameservers directly into dnsmasq.conf