Adding static host records on DDWRT’s DNSmasq

I run my own domain. You’d be amazed to find out most my my services are hosted by a single router, a Asus RT-N16 running DD-WRT.
Lately I noticed my website wouldn’t load inside my own network. I saw that I had no actual records for my base domain, or it’s www counter-part. Although I had hoped that an external record lookup and a hairpin would be good enough, it didn’t seem to be the case, plus to aboved un-needed latency a direct lookup with the direct internal IP would be far more benificial.

To my dismay I haven’t managed the box in a while and I couldn’t seem to find any DHCP based records under /etc/hosts.
I was aware of where I set the file for DHCP records, however not sure if DNSmasq uses that for DNS lookups as well or not.
A quick google search however provided a nice blog with step on how to accomplish it via the Web Interface.

Log into the administration interface and go to the Services tab.
Find the DNSMasq section and make sure the DNSMasq option is enabled.
In the Additional DNSMasq Options box type in your local DNS configurations (one entry per line):


where host-or-domain refers to the machine name (or domain name) you want to customize the address for and ip-address is the numeric IP address
Save and Apply and you should be all set.

Thanks ZEDT

Leave a Reply

Your email address will not be published. Required fields are marked *