DNSMasq Local Network

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:32, 2 July 2006 (edit)
69.11.220.226 (Talk)

← Previous diff
Revision as of 21:44, 2 July 2006 (edit) (undo)
69.11.220.226 (Talk)
(1) Editting the /etc/hosts file)
Next diff →
Line 2: Line 2:
== 1) Editting the /etc/hosts file == == 1) Editting the /etc/hosts file ==
 +
 +This is probably the first place one attempts getting this to work if you have a *NIX background. And it does work here with a '''''**caveat**''''' , once you've editted your /etc/hosts, you need to restart/reload DNSMasq. So for example if you populate your /etc/hosts with the startup_rc script like:
 +
 +<pre>
 +'echo 192.168.1.50 somename' >> /etc/hosts
 +</pre>
 +
 +from the startup script. You also need to put:
 +
 +<pre>
 +killall dnsmasq
 +dnsmasq --conf-file /tmp/dnsmasq.conf
 +</pre>
 +
 +in your startup script. So your script ends up looking like:
 +
 +<pre>
 +'echo 192.168.1.50 somename' >> /etc/hosts
 +
 +killall dnsmasq
 +dnsmasq --conf-file /tmp/dnsmasq.conf
 +</pre>
== 2) Additional DNS Options == == 2) Additional DNS Options ==
== 3) Creating static leases == == 3) Creating static leases ==

Revision as of 21:44, 2 July 2006

So far I've learned of 3 ways to configure the DD-WRT, so that it will perform DNS for your local network. I don't claim to know which way is preferred by the developer(s) of the DD-WRT.

1) Editting the /etc/hosts file

This is probably the first place one attempts getting this to work if you have a *NIX background. And it does work here with a **caveat** , once you've editted your /etc/hosts, you need to restart/reload DNSMasq. So for example if you populate your /etc/hosts with the startup_rc script like:

'echo 192.168.1.50    somename' >> /etc/hosts

from the startup script. You also need to put:

killall dnsmasq 
dnsmasq --conf-file /tmp/dnsmasq.conf 

in your startup script. So your script ends up looking like:

'echo 192.168.1.50    somename' >> /etc/hosts

killall dnsmasq 
dnsmasq --conf-file /tmp/dnsmasq.conf 

2) Additional DNS Options

3) Creating static leases