dnsmasq doing dns

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
bbolin
DD-WRT Novice


Joined: 06 Jul 2018
Posts: 11

PostPosted: Tue Jul 31, 2018 9:27    Post subject: dnsmasq doing dns Reply with quote
Can't seem to get this to work. Tried many things. Trying to shutdown an old bind9 server and use the router for dns. I've got some static IP's and startup that makes the lan ports on the router work

I've attached some screenshots and text file with options

Local DNS enabled or disabled because of conflicting DHCPd Options I've read

I've also reset the router without success:
erase nvram && reboot

From the dhcp clients I can always ping the router by name but none of the static names. Those successful names are in:

cat /tmp/hosts
127.0.0.1 localhost
192.168.0.1 dlink
192.168.0.1 dlink.example.com

cat /tmp/dnsmasq.conf
cache-size=1000
domain=example.com
local=/example.com/
expand-hosts
dhcp-host=00:24:1d:d7:d7:33,myth,192.168.0.50,infinite
dhcp-host=c0:3f:d5:6d:e0:c8,brent-nuc,192.168.0.102,infinite
dhcp-host=00:1E:06:33:B8:D2,front,192.168.0.131,infinite
dhcp-host=00:01:2e:28:29:14,emily,192.168.0.52,infinite
dhcp-host=00:01:2e:27:3d:ee,brent,192.168.0.51,infinite
dhcp-host=d0:66:7b:c8:a2:3a,samsungtv,192.168.0.129,infinite
dhcp-host=08:00:27:fc:be:28,check_make,192.168.0.127,infinite
dhcp-host=00:18:dd:07:07:da,HDHR4,192.168.0.140,infinite
dhcp-host=00:18:dd:04:71:12,HDHR2,192.168.0.141,infinite
dhcp-host=00:1e:06:35:43:47,oc2,192.168.0.115,infinite
dhcp-host=00:1b:78:6c:54:64,HP-printer-brent,192.168.0.199,infinite
dhcp-host=30:8d:99:d6:ec:fc,HP-printer-emily,192.168.0.142,infinite
dhcp-host=00:40:8C:B2:18:5A,axis-m1011-w,192.168.0.128,infinite
dhcp-host=C8:02:8F:10:5C:CF,dafang,192.168.0.103,infinite
dhcp-host=00:1e:06:32:c4:c9,hc2,192.168.0.105,infinite

startup script:
swconfig dev eth1 set enable_vlan 1
swconfig dev eth1 set apply

DLINK 615 E3
v3.0-r36247 std (06/29/1Cool

Thanks
Sponsor
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1416

PostPosted: Tue Jul 31, 2018 22:39    Post subject: Reply with quote
So assuming that you have copied the full information, I see something missing on you dnsmasq.conf file.

You should have something such as:
interface=br0

that tells dnsmasq where to offer the services

I also do not see:

resolv-file=/tmp/resolv.dnsmasq
dhcp-option=br0,3,192.168.0.1
dhcp-range=br0,192.168.0.100,192.168.0.150,255.255.255.0,1440m
dhcp-authoritative
strict-order


so are you modifying this file? Because it is not matching up with what is in your screenshots
bbolin
DD-WRT Novice


Joined: 06 Jul 2018
Posts: 11

PostPosted: Tue Jul 31, 2018 22:45    Post subject: Reply with quote
Here is all of it:

cat /tmp/dnsmasq.conf
interface=br0
resolv-file=/tmp/resolv.dnsmasq
strict-order
domain=example.com
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=50
dhcp-option=br0,3,192.168.0.1
dhcp-authoritative
dhcp-range=br0,192.168.0.100,192.168.0.149,255.255.255.0,1440m
bogus-priv
conf-file=/etc/rfc6761.conf
proxy-dnssec
stop-dns-rebind
cache-size=1000
listen-address=127.0.0.1,192.168.0.1
domain=example.com
local=/example.com/
expand-hosts
dhcp-host=00:24:1d:d7:d7:33,myth,192.168.0.50,infinite
dhcp-host=c0:3f:d5:6d:e0:c8,brent-nuc,192.168.0.102,infinite
dhcp-host=00:1E:06:33:B8:D2,front,192.168.0.131,infinite
dhcp-host=00:01:2e:28:29:14,emily,192.168.0.52,infinite
dhcp-host=00:01:2e:27:3d:ee,brent,192.168.0.51,infinite
dhcp-host=d0:66:7b:c8:a2:3a,samsungtv,192.168.0.129,infinite
dhcp-host=08:00:27:fc:be:28,check_make,192.168.0.127,infinite
dhcp-host=00:18:dd:07:07:da,HDHR4,192.168.0.140,infinite
dhcp-host=00:18:dd:04:71:12,HDHR2,192.168.0.141,infinite
dhcp-host=00:1e:06:35:43:47,oc2,192.168.0.115,infinite
dhcp-host=00:1b:78:6c:54:64,HP-printer-brent,192.168.0.199,infinite
dhcp-host=30:8d:99:d6:ec:fc,HP-printer-emily,192.168.0.142,infinite
dhcp-host=00:40:8C:B2:18:5A,axis-m1011-w,192.168.0.128,infinite
dhcp-host=C8:02:8F:10:5C:CF,dafang,192.168.0.103,infinite
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7568
Location: YWG, Canada

PostPosted: Tue Jul 31, 2018 22:49    Post subject: Reply with quote
strict-order is optional and not needed, for absolutely fastest dns replies at all times, keep it out
_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r55797 std
[QUALCOMM] DIR-862L --------------------------------> r55797 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

bbolin
DD-WRT Novice


Joined: 06 Jul 2018
Posts: 11

PostPosted: Wed Aug 01, 2018 8:50    Post subject: Reply with quote
Removed strict-order

Things appear to be working. Reboot of the client makes it show up in the webUI and ping/nslookup etc start working

Something I've noticed is how the name shows up in the webUI even if the name is defined in Additional DNSMasq Options

Android phones for example (android-7c77748e2304****). I would prefer it to use the name defined so I know what it is. It also does not have the lease time defined
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1416

PostPosted: Thu Aug 02, 2018 22:48    Post subject: Reply with quote
I am glad that it seems to be working for you.



To answer your other things, I think that may be how the computer (in this case android phone) gives the dns server its identification name. It may be the order in which it gets put into the hosts file.

I might need a screenshot or example of the lease time/other things to help more. Maybe I am just being dumb...
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6291
Location: Texas

PostPosted: Thu Aug 02, 2018 23:42    Post subject: Reply with quote
There is no
dhcp-option=br0,6,192.168.0.1
in dnsmasq.conf. That should be auto created, defines its local DNS ---- no user input needed.
However you should probably take 192.168.0.1 out of Static DNS1 on Setup page.
Put 192.168.0.1 in local DNS (same page) if you want to.

Don't think you should have these in dnsmasq.conf
listen-address=127.0.0.1,192.168.0.1
domain=example.com
local=/example.com/


domain=example.com is already there like it should be
It will be what you have 'LAN Domain' set in Services page. Also LAN & WLAN should be as 'Used Domain' same page.

I don't have that router and it could possibly be something related to the build your are using.
Although I have used local DNS for many years on several routers (many dd-wrt builds) without a problem.

I also have several android devices which most have static leases.
Their name always shows correct to what I have it set. Don't think any order makes difference as long as correct MAC for the device you name.
I have static leases on two Chromecast and one ROKU that are all connected to guest network (different subnet) without any problem.
When I connect the droid phone to the guest network the chromecast will even show the name I have given them in the google 'HOME' app.
bbolin
DD-WRT Novice


Joined: 06 Jul 2018
Posts: 11

PostPosted: Fri Aug 03, 2018 1:32    Post subject: Reply with quote
Did not add is't just there. Networking?
dhcp-option=br0,6,192.168.0.1

Removed these:
listen-address=127.0.0.1,192.168.0.1
domain=example.com
local=/example.com/

Changed this:
DNS static to local

Thanks for input will see what happens
consorts
DD-WRT User


Joined: 13 Sep 2017
Posts: 88

PostPosted: Fri Aug 03, 2018 18:29    Post subject: Reply with quote
i was going to start a new topic, but since it's related;

this thread discusses dnsmasq but it does not actually hit on using
Encrypt DNS
DNS Crypt Resolver
AdGuard DNS (for example)
i don't see the point of doing dnsmasq if you don't encrypt it too.

https://wiki.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server

my problem is on fios (using the latest dd-wrt beta) every time i enable Encrypt DNS and give it any Resolver, once i save/apply/reboot, my r7500v2 loses internet connectivity, even though it gets an IP for the WAN from the ISP (while verizon can't see anything wrong from their end). once i Disable Encrypt DSN and save/apply/reboot again - my internet comes back.

my current router is a wrt1200acV2 and AdGuard is setup and working beautifully on it (according to dnsleaktest), but when i attempt the same thing on this new r7500v2 i would ultimately like to replace my current router with - the internet drops - so what gives? i'm tempted to simply keep my current router and sell this r7500v2 because it gives me zero assurance that it's actually able to protect me from my nosy isp.


Last edited by consorts on Fri Aug 03, 2018 18:44; edited 1 time in total
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7568
Location: YWG, Canada

PostPosted: Fri Aug 03, 2018 18:43    Post subject: Reply with quote
consorts wrote:
i was going to start a new topic, but since it's related;

this thread discusses dnsmasq but it does not actually hit on using
Encrypt DNS
DNS Crypt Resolver
AdGuard DNS (for example)
i don't see the point of doing dnsmasq if you don't encrypt it too.

my problem is on fios (using the latest dd-wrt beta) every time i enable Encrypt DNS and give it any Resolver, once i save/apply/reboot, my r7500v2 loses internet connectivity, even though it gets an IP for the WAN from the ISP (while verizon can't see anything wrong from their end). once i Disable Encrypt DSN and save/apply/reboot again - my internet comes back.

my current router is a wrt1200acV2 and AdGuard is setup and working beautifully on it (according to dnsleaktest), but when i attempt the same thing on this new r7500v2 i would ultimately like to replace my current router with - the internet drops - so what gives? i'm tempted to simply keep my current router and sell this r7500v2 because it gives me zero assurance that it's actually able to protect me from my nosy isp.


maybe its adguard's dns that dont work with dnssec (thats what ur doing right)? i dislike their dns cause every time i tried it they break a bus load of things, while letting many ads and trackers through that are dns blockable just fine.. and their anycast network isnt on the scale of cloudflare, opendns etc so my latency to them is unacceptable.

why not try making ur own dns ad/track blocker with dnsmasq? instant <1ms blocking response time cause its locally done, then u can use whatever dns u want that works with encrypted dns. i started that 2 months ago with a mostly custom made one from scratch, ill have a hard time looking back now without using it especially on phones etc.

_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r55797 std
[QUALCOMM] DIR-862L --------------------------------> r55797 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

bbolin
DD-WRT Novice


Joined: 06 Jul 2018
Posts: 11

PostPosted: Fri Aug 03, 2018 18:58    Post subject: Reply with quote
New twist on dnsmasq dns. It's all working fine when it's working. But if you reboot the router like I've been doing to test things it breaks dns until all the dhcp clients are either renewed or rebooted. Good indicator of what dns is working are the listings in DHCP Clients table within dd-wrt

This might very well be a client configuration because I've got Kodi running on Libreelec installs and they appear to just show up again without renew or reboot

ping myth
ping: bad address 'myth'

After dhclient is renewed
ping myth
PING myth (192.168.0.50): 56 data bytes
64 bytes from 192.168.0.50: seq=0 ttl=64 time=1.101 ms

Wondering if there is a persistent option wether the client is connected or not

Maybe I should make lease time 1 minute Very Happy


Last edited by bbolin on Fri Aug 03, 2018 19:11; edited 2 times in total
consorts
DD-WRT User


Joined: 13 Sep 2017
Posts: 88

PostPosted: Fri Aug 03, 2018 19:00    Post subject: Reply with quote
tatsuya46 wrote:

maybe its adguard's dns that dont work with dnssec


no, whether dnssec is enabled or not makes no difference.

and i'd rather not get side tracked on to which resolver is best, i simply want to get the encrypt dns to work to ANY resolver. while i applaud your locally developed dns, i don't want to bother with all that housekeeping either. frankly i don't care about ads, i just want to make sure verizon can't spy on me.

i'm just surprised this is such a stumbling block on what was supposed to be a much better router than the one i'm using currently. i suppose it's a dd-wrt support community thing, not the router's fault, where linksys probably gets more attention from the dd-wrt community than netgear Rolling Eyes

anyway, if anyone out there actually has the encrypt dns feature enabled and working, i'd love to know your settings beyond this faq so i can figure out where i'm going wrong;

https://wiki.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server

as this faq worked perfectly at making my linksys dd-wrt install encrypt dns without any headaches and according to dnsleaktest all my dns is something very anonymous to my isp.
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6291
Location: Texas

PostPosted: Fri Aug 03, 2018 22:46    Post subject: Reply with quote
Not too sure why ya'll have so much trouble with DNSMasq.

My conf on the EA8500 running r36410.
I'm also running 'Recursive DNS Resolving' but DNSMasq works just as well if I have that turned off and let it use the DNS I have set.



root@~~~:~# cat /tmp/dnsmasq.conf
interface=br0,br1
resolv-file=/tmp/resolv.dnsmasq
strict-order
port=0
domain=mrjcd.com
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=149
dhcp-option=br0,3,10.72.28.13
dhcp-option=br1,3,10.15.26.225
dhcp-option=br0,6,10.72.28.13
dhcp-option=br1,6,10.15.26.225
dhcp-authoritative
dhcp-range=br0,10.72.28.75,10.72.28.174,255.255.255.0,1440m
dhcp-range=br1,10.15.26.226,10.15.26.245,255.255.255.224,720m
dhcp-host=00:15:F2:EB:05:44,lildeb,10.72.28.1,1440m
dhcp-host=00:14:51:03:E5:EE,Apache,10.72.28.2,1440m
dhcp-host=20:CF:30:CB:84:DF,Deb,10.72.28.3,1440m
dhcp-host=78:1F:DB:9C:53:BC,Note-8,10.72.28.4,1440m
dhcp-host=00:0A:95:B5:1C:38,1505,10.72.28.5,1440m
dhcp-host=00:14:51:16:d2:78,DogCow,10.72.28.6,1440m
dhcp-host=00:0A:95:D5:77:8C,da-Box,10.72.28.7,1440m
dhcp-host=C8:60:00:8D:89:D8,BARB-PC,10.72.28.8,1440m
dhcp-host=00:0A:95:D5:61:80,Barb,10.72.28.9,1440m
dhcp-host=20:CF:30:9B:5A:89,bigdeb,10.72.28.10,1440m
dhcp-host=54:AB:3A:19:07:3E,QTAIR7,10.72.28.12,1440m
dhcp-host=EC:88:92:6D:E8:E2,JCD-Droid-Turbo,10.72.28.16,1440m
dhcp-host=00:13:10:EC:77:24,VOLUS_Earth-Orbit47-HQ,10.72.28.47,1440m
dhcp-host=00:1D:7E:0A:80:99,VOLUS_Outpost-AP48,10.72.28.48,1440m
dhcp-host=00:14:BF:72:C8:69,Volus_Homeworld,10.72.28.50,1440m
dhcp-host=A4:2B:8C:0E:88:47,Citadel-Switch,10.72.28.51,1440m
dhcp-host=C0:56:27:08:B2:93,EA8500,10.72.28.52,1440m
dhcp-host=00:16:B6:A1:71:EA,Volus-Link53,10.72.28.53,1440m
dhcp-host=00:25:9C:C0:6A:CD,160NL-Switch,10.72.28.54,1440m
dhcp-host=1C:3E:84:8D:15:99,Will-Be-Was,10.72.28.56,1440m
dhcp-host=68:7F:74:AC:35:4E,E2100L-WDS-South,10.72.28.57,1440m
dhcp-host=68:7F:74:D7:BA:40,E2100L-WDS-North,10.72.28.58,1440m
dhcp-host=A4:5D:36:F8:AF:EC,JonSteevPrinter,10.72.28.59,1440m
dhcp-host=10:0D:7F:61:A8:A9,Grammy-WNR2000v3,10.72.28.60,1440m
dhcp-host=40:16:3B:AE:EE:E6,Tisha-TV,10.15.26.226,1440m
dhcp-host=CC:95:D7:53:CF:8B,VIZIO-TV,10.15.26.227,1440m
dhcp-host=A4:77:33:80:1A:EC,BRChromecast,10.15.26.228,1440m
dhcp-host=08:9E:08:48:4A:7F,mrjcdChromecast,10.15.26.229,1440m
dhcp-host=C8:3A:6B:AD:65:58,ROKU,10.15.26.242,1440m
bogus-priv
conf-file=/etc/rfc6761.conf
proxy-dnssec
stop-dns-rebind
interface=tun2
cache-size=2048
root@~~~:~#
consorts
DD-WRT User


Joined: 13 Sep 2017
Posts: 88

PostPosted: Sat Aug 04, 2018 12:24    Post subject: Reply with quote
mrjcd wrote:
Not too sure why ya'll have so much trouble with DNSMasq.


i'm not.

it's Encrypt DNS that's screwing up,
but thanks for going to all that trouble Confused

i'm sure other readers will benefit from it.

i don't think posters here realize that as long as your dns lookups are not encrypted, it does not matter who your dns is from - your isp can still read what sights you lookup (unless like tatsuya46 most of your dns is locally cached). so the only way to ensure privacy from your isp is to encrypt your dns to a private resolver - it's like having a vpn that works only for your dns traffic. just like a vpn, any private resolver can also resell dns traffic metadata - but you don't pay or register with them, so they don't know who you are, unlike your own isp or even most paid vpn.

below is NOT from a r7500r2, and may NOT work for you.
a detail not discussed in the faq i linked to earlier is;
your isp may continue to try to modify your router's dns
so you should fill in dns2 and dns3 with something, even
if you don't actually use those dns, so even though you
see 8844 4224 - they are NOT being used, and what is used
through the adguard encrypted "WoodyNet" is 9999 8888 4222.


Last edited by consorts on Sat Aug 04, 2018 13:16; edited 5 times in total
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6291
Location: Texas

PostPosted: Sat Aug 04, 2018 12:45    Post subject: Reply with quote
@ consorts I was really referring to original poster but BTW, when I turn on 'Encrypt DNS' it works just fine for me ..... used it for weeks on end before.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC 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 cannot attach files in this forum
You cannot download files in this forum