View previous topic :: View next topic |
Author |
Message |
Robert S Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/373167949427dc8404d3a8.jpg)
Joined: 15 Aug 2004 Posts: 463 Location: Canberra Australia
|
Posted: Wed Nov 23, 2005 12:24 pm Post subject: Can't access dnsmasq from other PC on network [SOLVED] |
|
|
I've set up the default dnsmasq installation and have put the following in /etc/conf.d/dnsmasq: Quote: | DNSMASQ_OPTS="-q -S xxx.xxx.xxx.xxx" | xxx.xxx.xxx.xxx is the IP address of my ISP's nameserver. The log shows that dnsmasq is doing name lookups for my local computer. If I go to another computer on my network and change my /etc/resolv.conf to Quote: | nameserver 192.168.0.20 | (ie the address of my dnsmasq machine), I can't do name lookups (eg. nslookup google.com) because they time out. If I do nmap 192.168.0.20, port 53 is open. If I look in the log of 192.168.0.20, the lookup on the remote machine is not logged.
How do I allow dnsmasq to be used as a nameserver on my network? This is probably (and hopefully) an easy n00b question.
Last edited by Robert S on Thu Nov 24, 2005 8:58 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Wed Nov 23, 2005 1:43 pm Post subject: |
|
|
I think dnsmasq is just not getting the requests. Try running nslookup interactively and select the dnsmasq server by IP (server 192.168.0.20) and then try google.com and see what happens. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Robert S Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/373167949427dc8404d3a8.jpg)
Joined: 15 Aug 2004 Posts: 463 Location: Canberra Australia
|
Posted: Wed Nov 23, 2005 8:42 pm Post subject: |
|
|
Still no luck. Remote machine: Quote: | # nslookup www.google.com 192.168.0.20
;; connection timed out; no servers could be reached | Local machine:Its obviously not responding to requests to 192.168.0.20. I'm missing something obvious I think. My /etc/dnsmasq.conf: Quote: |
domain-needed
bogus-priv
server=xxx.xxx.xxx.xxx
server=xxx.xxx.xxx.xxx
| My /etc/conf.d/dnsmasq is listed above. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
think4urs11 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/8534934054bad29b51e5fa.jpg)
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Wed Nov 23, 2005 8:47 pm Post subject: |
|
|
seems to as if you forgot to bind dnsmasq to an interface; insert something like interface=eth0 in its config (asuming eth0 is your internal NIC) _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Robert S Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/373167949427dc8404d3a8.jpg)
Joined: 15 Aug 2004 Posts: 463 Location: Canberra Australia
|
Posted: Thu Nov 24, 2005 12:32 am Post subject: |
|
|
I've done that. Still no luck. Could somebody post a working configuration on this forum? Are there any other files not related to dnsmasq that might be relevant? BTW I don't have a firewall running on my machine. I am somewhat mystified by this. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Thu Nov 24, 2005 8:37 am Post subject: |
|
|
Can you try to run it interactively to make sure it's not the client as the config etc seems fine.
Type nslookup enter
then server 192.168.0.20 enter
google.com enter
... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
slycordinator Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/4334262804b30599e9bb30.jpg)
Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Thu Nov 24, 2005 8:43 am Post subject: |
|
|
You probably didn't set it up for the box that has dnsmasq installed to do forwarding of packets.
Also you don't need to set up your ISP's DNS servers in dnsmasq. On the box that you've got dnsmasq installed on you just have /etc/resolv.conf have the upstream dns servers.
There's a section for dnsmasq here:
http://gentoo-wiki.com/HOWTO_setup_a_home-server |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Robert S Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/373167949427dc8404d3a8.jpg)
Joined: 15 Aug 2004 Posts: 463 Location: Canberra Australia
|
Posted: Thu Nov 24, 2005 8:57 am Post subject: |
|
|
The solution was so simple that its embarrassing to put it here . Something to do with wrong IP addresses.
As you say - I've just discovered that it works perfectly well straight out of the box with ISP's nameservers in /etc/resolv.conf.
I've trashed djbdns and replaced it with dnsmasq. I'm only using it for a small home network. It doesn't fill my root directory with clutter and is easy for a simple person like me to understand. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|