Re: [Dnsmasq-discuss] basic host name problem
richardvo...@gmail.com on 25/01/10 21:14, wrote: On Mon, Jan 25, 2010 at 12:20 PM, Adam Hardy adam@cyberspaceroad.com wrote: I've got a gateway server running dnsmasq for dhcp on my LAN and I've got a couple of problems with the host names of the dhcp clients. The first is a Belkin print server which picks up its ip address and passes thro its hostname MFD8FDC7. This appears in dnsmasq.leases - so I should be able to communicate with it now, right? There must be something missing from my dnsmasq config because I see now that any attempt to use the host names of dhcp clients from the gateway server fail with unknown host I'm on debian stable if that makes any difference Sounds like your gateway is not using dnsmasq for lookups. dnsmasq tells dhcp clients to use its services, but the gateway you will have to manually configure in /etc/resolv.conf to send requests to the local dnsmasq process. I mistakenly included the /etc/hosts file instead of the /etc/resolv.conf file which would have been far more informative re this problem. It looks like this: adam@isengard:~$ cat /etc/resolv.conf domain isengard.localdomain search isengard.localdomain nameserver 127.0.0.1 nameserver 194.74.65.68 Do I need to add more in there? Regards Adam
Re: [Dnsmasq-discuss] basic host name problem
On Mon, Jan 25, 2010 at 6:29 PM, Adam Hardy adam@cyberspaceroad.com wrote: richardvo...@gmail.com on 25/01/10 21:14, wrote: On Mon, Jan 25, 2010 at 12:20 PM, Adam Hardy adam@cyberspaceroad.com wrote: I've got a gateway server running dnsmasq for dhcp on my LAN and I've got a couple of problems with the host names of the dhcp clients. The first is a Belkin print server which picks up its ip address and passes thro its hostname MFD8FDC7. This appears in dnsmasq.leases - so I should be able to communicate with it now, right? There must be something missing from my dnsmasq config because I see now that any attempt to use the host names of dhcp clients from the gateway server fail with unknown host I'm on debian stable if that makes any difference Sounds like your gateway is not using dnsmasq for lookups. dnsmasq tells dhcp clients to use its services, but the gateway you will have to manually configure in /etc/resolv.conf to send requests to the local dnsmasq process. I mistakenly included the /etc/hosts file instead of the /etc/resolv.conf file which would have been far more informative re this problem. It looks like this: adam@isengard:~$ cat /etc/resolv.conf domain isengard.localdomain search isengard.localdomain nameserver 127.0.0.1 nameserver 194.74.65.68 Do I need to add more in there? That should do it. Run netstat whilst dnsmasq is stopped, to see if any other dns-capable daemon could be binding port 53 and preventing dnsmasq from receiving the queries. Regards Adam ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] basic host name problem
richardvo...@gmail.com on 26/01/10 01:56, wrote: There must be something missing from my dnsmasq config because I see now that any attempt to use the host names of dhcp clients from the gateway server fail with unknown host I'm on debian stable if that makes any difference Sounds like your gateway is not using dnsmasq for lookups. dnsmasq tells dhcp clients to use its services, but the gateway you will have to manually configure in /etc/resolv.conf to send requests to the local dnsmasq process. I mistakenly included the /etc/hosts file instead of the /etc/resolv.conf file which would have been far more informative re this problem. It looks like this: adam@isengard:~$ cat /etc/resolv.conf domain isengard.localdomain search isengard.localdomain nameserver 127.0.0.1 nameserver 194.74.65.68 Run netstat whilst dnsmasq is stopped, to see if any other dns-capable daemon could be binding port 53 and preventing dnsmasq from receiving the queries. This is what I see: Interesting ports on localhost (127.0.0.1): Not shown: 1703 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 111/tcp open rpcbind 139/tcp open netbios-ssn 445/tcp open microsoft-ds 631/tcp open ipp 3306/tcp open mysql 3689/tcp open rendezvous 7634/tcp open hddtemp 8009/tcp open ajp13 8080/tcp open http-proxy Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.148 seconds adam@isengard:~$ netstat -an |grep -i listen tcp0 0 0.0.0.0:11301 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:6600 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:36890.0.0.0:* LISTEN tcp0 0 127.0.0.1:3306 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:33005 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:7634 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:21 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:250.0.0.0:* LISTEN tcp6 0 0 127.0.0.1:8005 :::*LISTEN tcp6 0 0 :::8009 :::*LISTEN tcp6 0 0 :::139 :::*LISTEN tcp6 0 0 :::8080 :::*LISTEN tcp6 0 0 :::22 :::*LISTEN tcp6 0 0 ::1:631 :::*LISTEN tcp6 0 0 :::445 :::*LISTEN
Re: [Dnsmasq-discuss] basic host name problem
On Tue, Jan 26, 2010 at 3:19 AM, Adam Hardy adam@cyberspaceroad.com wrote: richardvo...@gmail.com on 26/01/10 01:56, wrote: There must be something missing from my dnsmasq config because I see now that any attempt to use the host names of dhcp clients from the gateway server fail with unknown host I'm on debian stable if that makes any difference Sounds like your gateway is not using dnsmasq for lookups. dnsmasq tells dhcp clients to use its services, but the gateway you will have to manually configure in /etc/resolv.conf to send requests to the local dnsmasq process. I mistakenly included the /etc/hosts file instead of the /etc/resolv.conf file which would have been far more informative re this problem. It looks like this: adam@isengard:~$ cat /etc/resolv.conf domain isengard.localdomain search isengard.localdomain nameserver 127.0.0.1 nameserver 194.74.65.68 Run netstat whilst dnsmasq is stopped, to see if any other dns-capable daemon could be binding port 53 and preventing dnsmasq from receiving the queries. This is what I see: Looks good. I think you will have to turn on query logging in dnsmasq and see if it receives any queries. Perhaps your resolv.conf is causing requests for client.isengard.localdomain while dnsmasq made an entry for client.localdomain Interesting ports on localhost (127.0.0.1): Not shown: 1703 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 111/tcp open rpcbind 139/tcp open netbios-ssn 445/tcp open microsoft-ds 631/tcp open ipp 3306/tcp open mysql 3689/tcp open rendezvous 7634/tcp open hddtemp 8009/tcp open ajp13 8080/tcp open http-proxy Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.148 seconds adam@isengard:~$ netstat -an |grep -i listen tcp 0 0 0.0.0.0:11301 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:6600 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:3689 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:33005 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:7634 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp6 0 0 127.0.0.1:8005 :::* LISTEN tcp6 0 0 :::8009 :::* LISTEN tcp6 0 0 :::139 :::* LISTEN tcp6 0 0 :::8080 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:631 :::* LISTEN tcp6 0 0 :::445 :::* LISTEN
Re: [Dnsmasq-discuss] basic host name problem
richardvo...@gmail.com on 26/01/10 14:23, wrote: On Tue, Jan 26, 2010 at 3:19 AM, Adam Hardy adam@cyberspaceroad.com wrote: richardvo...@gmail.com on 26/01/10 01:56, wrote: There must be something missing from my dnsmasq config because I see now that any attempt to use the host names of dhcp clients from the gateway server fail with unknown host I'm on debian stable if that makes any difference Sounds like your gateway is not using dnsmasq for lookups. dnsmasq tells dhcp clients to use its services, but the gateway you will have to manually configure in /etc/resolv.conf to send requests to the local dnsmasq process. adam@isengard:~$ cat /etc/resolv.conf domain isengard.localdomain search isengard.localdomain nameserver 127.0.0.1 nameserver 194.74.65.68 Perhaps your resolv.conf is causing requests for client.isengard.localdomain while dnsmasq made an entry for client.localdomain Here's a query log: Jan 26 14:49:13 localhost dnsmasq[31068]: reading /etc/resolv.conf Jan 26 14:49:13 localhost dnsmasq[31068]: using nameserver 194.74.65.68#53 Jan 26 14:49:13 localhost dnsmasq[31068]: ignoring nameserver 127.0.0.1 - local interface Jan 26 14:49:13 localhost dnsmasq[31068]: using local addresses only for domain localdomain Jan 26 14:49:13 localhost dnsmasq[31068]: query[A] MFD8FDC7.isengard.localdomain from 127.0.0.1 Jan 26 14:49:13 localhost dnsmasq[31068]: config MFD8FDC7.isengard.localdomain is NXDOMAIN-IPv4 So it's exactly what you predicted - but I've read thro the whole config and can't see what I need to change. Here's my dnsmasq.conf again: domain-needed bogus-priv filterwin2k server=/localdomain/127.0.0.1 local=/localdomain/ expand-hosts domain=localdomain dhcp-range=192.168.0.3,192.168.0.254 dhcp-option=option:router,192.168.0.2 dhcp-option=option:mtu,1500 I think that resolv.conf is wrong - should domain=localdomain and not isengard.localdomain? resolv.conf is being constantly rewritten by dhclient3 which is doing obtaining an ip address via dhcp for the external NIC. I can see now that I had supersede domain-name isengard.localdomain in the dhclient3.conf - doh! So that was it. Thanks for your help, regards Adam
Re: [Dnsmasq-discuss] basic host name problem
On Mon, Jan 25, 2010 at 12:20 PM, Adam Hardy adam@cyberspaceroad.com wrote: Hi, I've got a gateway server running dnsmasq for dhcp on my LAN and I've got a couple of problems with the host names of the dhcp clients. The first is a Belkin print server which picks up its ip address and passes thro its hostname MFD8FDC7. This appears in dnsmasq.leases - so I should be able to communicate with it now, right? There must be something missing from my dnsmasq config because I see now that any attempt to use the host names of dhcp clients from the gateway server fail with unknown host I'm on debian stable if that makes any difference Sounds like your gateway is not using dnsmasq for lookups. dnsmasq tells dhcp clients to use its services, but the gateway you will have to manually configure in /etc/resolv.conf to send requests to the local dnsmasq process. I've got 127.0.0.1 in my /etc/hosts 127.0.0.1 localhost isengard.localdomain isengard 192.168.0.2 isengard.localdomain # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts along with all that ipv6 stuff, which someone somewhere recommended at some point but I don't recall the details now (should I ditch it?) Plus this is the settings in dnsmasq.conf: adam@isengard:~$ decomment.sh /etc/dnsmasq.conf domain-needed bogus-priv filterwin2k server=/localdomain/127.0.0.1 local=/localdomain/ expand-hosts domain=localdomain dhcp-range=192.168.0.3,192.168.0.254 dhcp-option=option:router,192.168.0.2 dhcp-option=option:mtu,1500 Any inspiration gratefully received. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss