DNSMasq entry not working on R7000

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Sun Jun 25, 2017 10:21    Post subject: DNSMasq entry not working on R7000 Reply with quote
Router: Netgear R7000
Firmware: kong DD-WRT v3.0-r32170M kongac (06/03/17)

Issue:

Some time back I added an entry to the host file on my R7000 at

\jiffs\etc\hosts.vree in the
format: 192.168.1.20 domain.com

I also added two lines in the webui -> Additional DNSMasq Options:

address=/seanvree.com/192.168.1.20
addn-hosts=/jffs/etc/hosts.vree

SO, I'm not sure when it stopped working, but when I ping domain.com from a client on the LAN, it SHOULD return 192.168.1.20, not the public WAN IP right?

THX
Sponsor
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Sun Jun 25, 2017 18:39    Post subject: Re: DNSMasq entry not working on R7000 Reply with quote
seanvree wrote:
Router: Netgear R7000
Firmware: kong DD-WRT v3.0-r32170M kongac (06/03/17)

Issue:

Some time back I added an entry to the host file on my R7000 at

\jiffs\etc\hosts.vree in the
format: 192.168.1.20 domain.com

I also added two lines in the webui -> Additional DNSMasq Options:

address=/seanvree.com/192.168.1.20
addn-hosts=/jffs/etc/hosts.vree

SO, I'm not sure when it stopped working, but when I ping domain.com from a client on the LAN, it SHOULD return 192.168.1.20, not the public WAN IP right?

THX


Works fine here:

address=/redbutton.de/127.0.0.1
root@r6400:~# ping redbutton.de
PING redbutton.de (127.0.0.1): 56 data bytes

It is not dnsmasq, you must have some other problem.

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Sun Jun 25, 2017 19:59    Post subject: Re: DNSMasq entry not working on R7000 Reply with quote
[quote="<Kong>"]
seanvree wrote:
Router: Netgear R7000
Firmware: kong DD-WRT v3.0-r32170M kongac (06/03/17)


It is not dnsmasq, you must have some other problem.


Thanks for the response @Kong.

Yeah, I don't get it...it's a simple function.

Here are all the inputs from the DnsMasq field...do you think any of these are maybe conflicting, causing an issue?

```
addn-hosts=/jffs/etc/hosts.vree
address=/mydomain.com/192.168.1.20
rebind-domain-ok=/plex.direct/
local=/vree/
expand-hosts
bogus-priv

strict-order
dhcp-option=6, 8.8.8.8, 208.67.222.222, 104.238.153.178
```


I don't get it because I changed nothing and then all of the sudden, I noticed I couldn't access my hostname when my gateway went down
These are ALL the inputs from
r6300v2usr
DD-WRT Novice


Joined: 03 Jan 2017
Posts: 49
Location: Lindau, Germany

PostPosted: Mon Jun 26, 2017 15:06    Post subject: Re: DNSMasq entry not working on R7000 Reply with quote
Quote:

Yeah, I don't get it...it's a simple function.

Here are all the inputs from the DnsMasq field...do you think any of these are maybe conflicting, causing an issue?

```
addn-hosts=/jffs/etc/hosts.vree
address=/mydomain.com/192.168.1.20
rebind-domain-ok=/plex.direct/
local=/vree/
expand-hosts
bogus-priv

strict-order
dhcp-option=6, 8.8.8.8, 208.67.222.222, 104.238.153.178
```

I don't get it because I changed nothing and then all of the sudden, I noticed I couldn't access my hostname when my gateway went down
These are ALL the inputs from

An extract from man-pages of dnsmasq:
Code:
-A, --address=/<domain>/[domain/][<ipaddr>]
...Note that /etc/hosts and DHCP leases override this for individual names. ...

Only a guess but maybe try different IP or hostname for test to eliminate DHCP conflicts?
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Mon Jun 26, 2017 15:42    Post subject: Re: DNSMasq entry not working on R7000 Reply with quote
seanvree wrote:
dhcp-option=6, 8.8.8.8, 208.67.222.222, 104.238.153.178


Doesn't this set Google as dns server for your client and not your router. Your router may resolve correctly, but does not help if the router is never asked.
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Mon Jun 26, 2017 15:59    Post subject: Re: DNSMasq entry not working on R7000 Reply with quote
[quote="seanvree"]
<Kong> wrote:
seanvree wrote:
Router: Netgear R7000
Firmware: kong DD-WRT v3.0-r32170M kongac (06/03/17)


It is not dnsmasq, you must have some other problem.


Thanks for the response @Kong.

Yeah, I don't get it...it's a simple function.

Here are all the inputs from the DnsMasq field...do you think any of these are maybe conflicting, causing an issue?

```
addn-hosts=/jffs/etc/hosts.vree
address=/mydomain.com/192.168.1.20
rebind-domain-ok=/plex.direct/
local=/vree/
expand-hosts
bogus-priv

strict-order
dhcp-option=6, 8.8.8.8, 208.67.222.222, 104.238.153.178
```


I don't get it because I changed nothing and then all of the sudden, I noticed I couldn't access my hostname when my gateway went down
These are ALL the inputs from


Maybe you tested with different clients or client settings, with your config dnsmasq will assign google dns to those clients, that use dhcp, if you use a client with static ip where you set the routers ip as the dns server it will use dnsmasq and correctly resolve the specified IP.

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Tue Jun 27, 2017 19:13    Post subject: Re: DNSMasq entry not working on R7000 Reply with quote
<Kong> wrote:

Maybe you tested with different clients or client settings, with your config dnsmasq will assign google dns to those clients, that use dhcp, if you use a client with static ip where you set the routers ip as the dns server it will use dnsmasq and correctly resolve the specified IP.


Kong / and others:

You were right, I removed "addn-hosts=/jffs/etc/hosts.vree " and it started working for a while....

I figured out that IPv6 was also getting in the way. I don't have static routes set up for that hostname...so it wasn't resolving as the box has both an IPv4 and IPv6 address.

So my final question is...how do I set a static IPv6 to the same box?

also in this directive: "address=/mydomain.com/192.168.1.20 " Can I put the hostname instead of the IP so that if/when it has a IPv6 IP, then it will still resolve?
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Tue Jun 27, 2017 19:24    Post subject: Reply with quote
As you don't have private addresses in IPv6, you don't need a local dns. The issue can also be that a dns server accessed by IPv6 does return the IPv4 record.
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Tue Jun 27, 2017 20:50    Post subject: Reply with quote
Per Yngve Berg wrote:
As you don't have private addresses in IPv6, you don't need a local dns. The issue can also be that a dns server accessed by IPv6 does return the IPv4 record.


I think that is my issue as well -

Right now, in Dnsmasq I have

address=/mydomain.com/192.168.1.20

And it's working fine as long as I don't have IPv6 enabled.

But when I enable IPv6 and try to PING mydomain.com, and the PC I'm using has IPv6 enabled, it's going to time-out correct?

How do I attatched mydomain.com to a specific host that is using IPv4 AND IPv6?
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Tue Jun 27, 2017 21:10    Post subject: Reply with quote
For an IPv4 address, a A record is entered in dns.
For an IPv6 address, a AAAA record is entered in dns.

The client is probably using the dns server of your isp for IPv6.
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Tue Jun 27, 2017 21:13    Post subject: Reply with quote
Per Yngve Berg wrote:
For an IPv4 address, a A record is entered in dns.
For an IPv6 address, a AAAA record is entered in dns.

The client is probably using the dns server of your isp for IPv6.


Right, so how do I change that in DDWRT WebUI?
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Wed Jun 28, 2017 19:07    Post subject: Reply with quote
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

On your ipv6 config, disable radvd and dhcpv6s

On the dnsmasq options:

quiet-dhcp
quiet-dhcp6
quiet-ra
enable-ra
dhcp-range=::10,::200,constructor:br0,ra-names,slaac,64,24h


The clients should have the router's link local address as rdnss.

Does the machine at 192.168.1.20 have an ipv6 address?
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Wed Jun 28, 2017 23:33    Post subject: Reply with quote
Per Yngve Berg wrote:
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

On your ipv6 config, disable radvd and dhcpv6s

On the dnsmasq options:

quiet-dhcp
quiet-dhcp6
quiet-ra
enable-ra
dhcp-range=::10,::200,constructor:br0,ra-names,slaac,64,24h


The clients should have the router's link local address as rdnss.

Does the machine at 192.168.1.20 have an ipv6 address?


Yes, the machine x.20 DOES have an IPv6 address.

Okay,

When you say "dhcpv6s" I don't have that option in the IPv6 options, I only have Dhcp6c...I'm assuming you disabled that?

So in the IPv6 I have:

Dhcp6c: Disable
Dhcp6s: Disable
Radvd: Disable

Services- DNSMasq - Additional DNSMasq Options:

domain=vree
local=/vree/
expand-hosts
address=/seanvree.com/192.168.1.20
rebind-domain-ok=/plex.direct/
no-resolv
strict-order
server=208.67.222.222
server=8.8.8.8
quiet-dhcp
quiet-dhcp6
quiet-ra
enable-ra
dhcp-range=::10,::200,constructor:br0,ra-names,slaac,64,24h
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu Jun 29, 2017 4:55    Post subject: Reply with quote
Dhcp6c: Enable
Dhcp6s: Disable
seanvree
DD-WRT User


Joined: 09 Sep 2015
Posts: 92

PostPosted: Thu Jun 29, 2017 9:24    Post subject: Reply with quote
Per Yngve Berg wrote:
Dhcp6c: Enable
Dhcp6s: Disable


Really appricate you helping me with this.
So, just to be clear, these are my current setings:

setup -> Ipv6:

IPv6 Type: Native from ISP
Prefix Length: 64
Static DNS: Blank
Assinged prefix: Blank
Router IPv6 Address: Blank
MTU: 1452

Dhcp6c Custom: Enable
Dhcp6c config: Blank
Dhcp6s: Disable
Radvd: Disable

Then I added the following to Services -> DNSMasq Options:
quiet-dhcp
quiet-dhcp6
quiet-ra
enable-ra
dhcp-range=::10,::200,constructor:br0,ra-names,slaac,64,24h

So when I did that I'm now not getting an IPv6 WAN IP on the router at all.

The clients on the lan are showing IPV6 addresses something like this:

fe80:ecfe:6b60f835:d07e%13

And in the syslog, I'm getting this error:

"daemon.warn dnsmasq-dhcp[21942]: no address range available for DHCPv6 request via br0"

What am I doing wrong?
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
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