installing a DNS Server

I am connected to the super highway via a speedtouch 510 ADSL modem. I used the DNS and DCHP features of the modem.

The problem? well the modem doesn’t support MX type DNS queries. so I can’t send email from by server becuase I can never look up the recipents mail server 🙁

Now bind9 may be the most used DNS server but it is an overkill for me. I consulted the oracle (yes I mean google) and came up with DNSmasq! The installation is as easy as:

apt-get install dnsmasq

and all is setup via the /etc/hosts and /rtc/recolv.conf files.

All I had to do was download my router configuration (it defaults to a file called user.ini) and run the following script:

cat user.ini | grep "add hostname=" | sed 's/add hostname=//g' | sed 's/addr=//g' | awk {' print $2 "\t\t" $1'}

and I copied that into my /etc/hosts file.

The last step was to modify the /etc/resolv.conf on the server to lookup my ISP’s DNS server instead of the router’s so DNSmasq will forward queries to link.net instead of the router.

Leave a Reply