[Dnsmasq-discuss] resolving on dnsmasq box itself?
Bart.Vandewoestyne at telenet.be
Tue Jun 12 15:35:57 BST 2007
I have a NAT-box setup with iptables masquerading to masquerade
out my personal internal home-LAN. This box is called 'forsythe'
and has an internal IP of 192.168.0.1. The external interface is
configued with DHCP by the DHCP-server from my ISP.
I am using this version of dhclient on my Debian GNU/Linux stable
forsythe:~# dhclient -V
Internet Systems Consortium DHCP Client V3.0.4
I have the following in my /etc/dhcp3/dhclient.conf file:
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope, interface-mtu;
After I have obtained an IP-address on my external interface, my
/etc/resolc.conf contains the following lines:
I have the following options in my /etc/dnsmasq.conf file:
and in my /etc/hosts I have as only line:
Furthermore, I have
forsythe:~# cat /etc/hostname
So far so good... i can ping and do nslookup for for example www.google.com
but my question is about the following:
The hostname of my masquerading (NAT) box which also runs the dnsmasq
daemon is 'forsythe' and it has a statically assigned ip address of
192.168.0.1. However, i cannot ping or do nslookup of the host 'forsythe':
forsythe:~# ping forsythe
ping: unknown host forsythe
forsythe:~# ping forsythe.
ping: unknown host forsythe.
forsythe:~# nslookup forsythe
*** Can't find forsythe: No answer
forsythe:~# nslookup forsythe.
** server can't find forsythe: NXDOMAIN
Can somebody tell me what the *CLEAN* solution is to overcome this problem?
If i add the line
192.168.0.1 forsythe.localnet forsythe
works but the following commands fail:
What is the clean solution to be able to ping and do nslookups
for the host 'forsythe'?
I also thought of adding a line
prepend domain-name-servers 127.0.0.1;
to my /etc/dhcp3/dhclient.conf so that my /etc/resolv.conf has an extra
but I don't think this is the proper way to do it... it looks like I'm putting
dnsmasq in a loop this way...
Any suggestions for a *CLEAN* solution are welcome!
"Share what you know. Learn what you don't."
More information about the Dnsmasq-discuss