Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Has anyone got dnsmasq to work with etc/hosts?
I have a few XP workstations with their dns set to to NAS's DNS Server... in my ffp/etc/hosts file i have
209.85.171.100 agoogleserver
I restart by
sh /ffp/etc/dnsmasq.sh restart
On my XP machines I do a flushdns and registerdns, and technically if I try to access agoogleserver in my browser, it should be able to reach google as if I were to just type in 209.85.171.100 in my browser? Well that didn't work.
So I dug around and thought maybe the hosts file path might be different for the dns323...
in my /ffp/etc/dnsmasq.conf I added
no-hosts addn-hosts=/ffp/etc/myhosts
using the same config in myhosts:
209.85.171.100 agoogleserver
Restarted... flushed, registered
Still not working. Am I doing something wrong here? I know the dnsmasq.conf is being used because if I add:
address=/someweirdnonexistentpage.com/209.85.171.100
That'll take me to google when I type in someweirdnonexistentpage.com into my browser.
Any help would be appreciated.
Thanks.
Last edited by kaiyoti (2009-01-11 12:11:06)
Offline
I think that the problem with the hosts file is caused by the missing domain part.
Try putting:
209.85.171.100 agoogleserver.com
into your hosts file and see what happens when you access agoogleserver.com. This should work.
There is no host name without a domain part in the Domain Name System.
There should be a way to supply only short names in the hosts file but you need to configure dnsmasq to expand these to the full name automatically using a preconfigured domain.
By the way you don't need to use your browser to check name lookup in Windows. An easier way to do it is using the command "nslookup". Once started it will tell you which name server it is using and which address this name server has. In the command prompt of nslookup you can type in a name and it will tell you the corresponding address if it finds one.
You can change the name server used by nslookup by typing "server <ip address>".
Offline
Yah I used this before
expand-hosts
I'll give your suggestions a go.
Thanks for that nslookup tip, much easier. ![]()
Edit... Still not working, just says "non-existent domain"
if I add
address=/agoogleserver/209.85.171.100
into my dnsmasq.conf and nslookup agoogleserver, it'll work just fine.
Is there anyway of getting a verbose status from dnsmasq to see all the hosts forwarded? Or some sort of status showing what hosts file it's reading from?
Last edited by kaiyoti (2009-01-12 00:30:46)
Offline
You should probably take a look into the manpages of dnsmasq - here for example.
I'm using dnsmasq on my server, not the NAS, so I can only look there. On my server dnsmasq uses syslog and logs to "/var/log/daemon.log" and I can see entries there telling me which nameserver it is using and how many entries it reads from "/etc/hosts" when starting. That's good for checking if it read the correct hosts file.
For testing I enabled an option in the dnsmasq.conf called "log-queries" which provides some output when a DNS query is made.
For example it tells me if the query was forwarded to another DNS server and which one it is. If it is a local entry then it says that it looked into "/etc/hosts" and got the address from there.
By the way the option "address=/<domain>/<ip address>" is just another way to specify fixed addresses. If you really can't get the hosts method to work I would stick to this option if I was you.
Offline
Cool, I try that out.
Thanks
Offline