[Dnsmasq-discuss] resolving on dnsmasq box itself?
Bart Vandewoestyne
Bart.Vandewoestyne at telenet.be
Tue Jun 12 15:35:57 BST 2007
Dear all,
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
box:
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:
search telenet.be
nameserver 195.130.130.129
nameserver 195.130.129.161
I have the following options in my /etc/dnsmasq.conf file:
domain-needed
bogus-priv
interface=eth0
and in my /etc/hosts I have as only line:
127.0.0.1 localhost
Furthermore, I have
forsythe:~# cat /etc/hostname
forsythe
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
Server: 195.130.130.129
Address: 195.130.130.129#53
Non-authoritative answer:
*** Can't find forsythe: No answer
forsythe:~# nslookup forsythe.
Server: 195.130.130.129
Address: 195.130.130.129#53
** 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
then
ping forsythe
works but the following commands fail:
nslookup forsythe
nslookup forsythe.
ping forsythe.
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
line
nameserver 127.0.0.1
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!
Bart
--
"Share what you know. Learn what you don't."
More information about the Dnsmasq-discuss
mailing list