I ran
Code:
dnsmasq --log-queries
so that I can see the activity coming through when I tail syslog.
Any requests made to a public web site (eg. google.com) show up in the log as being forwarded to the correct IP. And the correct page is displayed in the browser.
Any requests that match the contents of /etc/hostname, in this case
dev1.homeserver.com, show up as multiple entries of:
Quote:
Feb 25 14:35:35 dev1 dnsmasq[2359]: query[A] dev1.homeserver.com from 192.168.1.1
Feb 25 14:35:35 dev1 dnsmasq[2359]: /etc/hosts dev1.homeserver.com is 192.168.1.161
|
and the correct page displays in the browser.
But if I request another host added into my /etc/hosts file, like test.homeserver.com, the log shows:
Quote:
Feb 25 14:54:20 dev1 dnsmasq[2359]: query[A] test.homeserver.com from 192.168.1.1
Feb 25 14:54:20 dev1 dnsmasq[2359]: forwarded test.homeserver.com to 68.87.85.98
Feb 25 14:54:20 dev1 dnsmasq[2359]: reply test.homeserver.com is <NXDOMAIN>-IPv4
|
and a cannot find server or dns error is displayed.
Here is my /etc/hosts file:
Code:
127.0.0.1 localhost.localdomain localhost dev1
192.168.1.161 dev1.homeserver.com dev1
192.168.1.161 test.homeserver.com test
I don't understand why test.homeserver.com is not being redirected to the appropriate place. Is there anything else I have to configure for this tto work?