[SOLVED] Try to get dnsmasq to resolve hostname

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
jkl555
DD-WRT Novice


Joined: 14 Mar 2011
Posts: 8

PostPosted: Sun Oct 09, 2011 12:09    Post subject: [SOLVED] Try to get dnsmasq to resolve hostname Reply with quote
I have a E3000 running DD-WRT v24-sp2 (04/13/11) big - build 16785. Previously I had a E1000 but still have the same problem on the set up.

The problem is I can't get the router itself to resolve the hostname by itself. For example,

root@E3000:/tmp# ping yahoo.com
ping: unknown host

My setting (under Service tab)
I have localDNS box enabled
I have "dhcp-option=6, 8.8.8.8"

I also add "8.8.8.8" to Static DNS 1 under Setup tab but no use.

I can see under /tmp these settings but that doesn't force the router to resolve anything

root@E3000:/tmp# cat resolv.dnsmasq
nameserver 8.8.8.8
nameserver 64.71.255.198
root@E3000:/tmp# cat resolv.conf
nameserver 192.168.1.1

Here is the dnsmasq.conf if it helps
root@E3000:/tmp# cat dnsmasq.conf
interface=br0,br1
resolv-file=/tmp/resolv.dnsmasq
all-servers
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=104
dhcp-option=lan,3,192.168.1.1
dhcp-option=br1,3,192.168.2.1
dhcp-authoritative
dhcp-range=lan,192.168.1.100,192.168.1.149,255.255.255.0,1440m
dhcp-range=br1,192.168.2.100,192.168.2.150,255.255.255.0,1400m
stop-dns-rebind
dhcp-option=6, 8.8.8.8

Finally the only work around is to edit /etc/resolv.conf manually to add the 8.8.8.8 but it only lasts until the next reboot.

I wonder if I am missing something simple in the set up. Any help will be appreciated.

Thanks.


Last edited by jkl555 on Mon Oct 10, 2011 22:46; edited 1 time in total
Sponsor
nuke12
DD-WRT User


Joined: 10 Jul 2011
Posts: 90

PostPosted: Sun Oct 09, 2011 18:52    Post subject: Reply with quote
I probably can't help you but DNS does work fine from my E3000.

I'm not sure what settings I have right, that you don't but I don't have any thing entered under "service" and nothing under "setup".

I do have my own DNS server but you using a Google server should also work.

I have this;

Code:
root@waccess3:/etc# cat resolv.conf
nameserver 192.168.1.118 (the e3000 IP)


That points to the E3000 and I have this;

Code:
root@waccess3:/etc# cat /tmp/resolv.dnsmasq
nameserver 192.168.1.129 (my DNS server)


and that points to my actual DNS server.

The way my system works is dnsmasq (on the router) answers DNS requests but really forwards everything to my actual DNS server @ 192.168.1.129.

Probably won't help but might give you something to search on?
jkl555
DD-WRT Novice


Joined: 14 Mar 2011
Posts: 8

PostPosted: Mon Oct 10, 2011 22:45    Post subject: Reply with quote
Thanks. I tried yours and it didn't help.

After some trial and I think I got it. I have a separate vlan br1 and it is this firewall rule (copied from some dd-wrt wiki) that is blocking the access

# Only br0 can access the router's local sockets (software running on the router)
iptables -I INPUT -i ! br0 -m state --state NEW -j DROP

I drop this rule and now ping works.

Now I have to fix this rule ...
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum