I am running a dns server on my router, and it serves example.com as 1.2.3.4.
I have also set the hostname to example.com. This causes a problem with dnsmasq, especially the way it is configured in openwrt. If i service dnsmasq stop
and run dnsmasq in the foreground, then everything works fine - example.com is served as 1.2.3.4.
However, if I run dnsmasq on startup, example.com is served as 192.168.1.1, the value of the ipaddr
option for lan in /etc/config/network
, using /tmp/hosts/dhcp.configxx
How can I set the hostname to example.com without making dnsmasq serve example.com as 192.168.1.1?
You might ask why not change the hostname? I am running a mailserver as well that relies on the hostname, and if i change it something like openwrt.lan, then the mailserver won't listen/respond to mails to example.com