DNS 2 and DNS 3 being automatically added by ISP DNS

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Author Message
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 265
Location: UK

PostPosted: Fri May 27, 2016 11:49    Post subject: DNS 2 and DNS 3 being automatically added by ISP DNS Reply with quote
I'm running pi-hole adblocker with my Raspberry Pi, it works by running as a DNS server

Connect it to the router and point the routers DNS to the Raspberry Pi's IP

Works fine

But under DHCP DNS in DD-WRT, I have 3 DNS boxes, under Local DNS I have 1

Even if I set all of them to the Pis IP address, under Status>WAN I see DNS 2 and DNS 3 still set as my ISPs DNS

How to I change those DNS IPs?



_________________
WRT160NL
Sponsor
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 1033
Location: Texas

PostPosted: Fri May 27, 2016 12:16    Post subject: Reply with quote
It does that because you have same DNS IP listed more than once and is only look at as 1 valid DNS address.

You can put in others such as openDNS.
I also suggest, in Services, use 'Query DNS in Strict Order'
Which will also look to the first DNS listed and only others if first cannot resolve.
Another option is use fake DNS addresses -
Some IP in your own subnet, that doesn't go anyehere could work for this ----
but of course if you 'pi' is not working for some reason then you won't be able to go anywheres....

I would use all DNSmasq capabilities.....your 'pi' can still do DNS or wherever you have DNS pointed to.
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 265
Location: UK

PostPosted: Fri May 27, 2016 12:28    Post subject: Reply with quote
mrjcd wrote:
It does that because you have same DNS IP listed more than once and is only look at as 1 valid DNS address.

You can put in others such as openDNS.
I also suggest, in Services, use 'Query DNS in Strict Order'
Which will also look to the first DNS listed and only others if first cannot resolve.
Another option is use fake DNS addresses -
Some IP in your own subnet, that doesn't go anyehere could work for this ----
but of course if you 'pi' is not working for some reason then you won't be able to go anywheres....

I would use all DNSmasq capabilities.....your 'pi' can still do DNS or wherever you have DNS pointed to.


Thanks, that sorted the 2 and 3 DNS

All guides say to disable DNSMasq for DNS for using the Pi for DNS, are you saying it would be better to leave it enabled?

I'm not totally clued up on DNSMasq, so getting a little lost trying to set this up

Also, I wonder if you know why, if I set my main PC with a static IP, and DNS, even if that DNS is the routers IP, or the Pi's IP, I can not ping the DNS server, which is "pi.hole"

But if I set it to DHCP, I can?

_________________
WRT160NL


Last edited by Detection on Fri May 27, 2016 21:54; edited 1 time in total
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 1033
Location: Texas

PostPosted: Fri May 27, 2016 12:45    Post subject: Reply with quote
Detection wrote:
....wonder if you know why, if I set my main PC with a static IP, and DNS, even if that DNS is the routers IP, or the Pi's IP, I can not ping the DNS server, which is "pi.hole"


If your PC is set to DHCP it will get IP + DNS your router gives it.
If set on your PC and there is nothing to stop it then that's what it would use.
I would suggest assigning it a static IP from Services page on your dd-wrt router if you want it to never change.

If the 'pi' configuration says don't use DNSmasq on a router???¿¿¿ -- then I guess you better not.

On newer builds using DNSmasq 'Query in Strict Order' would probably even force your computer static IP & DNS to use
only the routers set DNS ... or you could certainly use a firewall on your router to intercept DNS and redirect it to whatever you wanted.
But I would not set a static IP on the PC -- better to set it up on your router Smile
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 265
Location: UK

PostPosted: Fri May 27, 2016 13:06    Post subject: Reply with quote
mrjcd wrote:
Detection wrote:
....wonder if you know why, if I set my main PC with a static IP, and DNS, even if that DNS is the routers IP, or the Pi's IP, I can not ping the DNS server, which is "pi.hole"


If your PC is set to DHCP it will get IP + DNS your router gives it.
If set on your PC and there is nothing to stop it then that's what it would use.
I would suggest assigning it a static IP from Services page on your dd-wrt router if you want it to never change.

If the 'pi' configuration says don't use DNSmasq on a router???¿¿¿ -- then I guess you better not.

On newer builds using DNSmasq 'Query in Strict Order' would probably even force your computer static IP & DNS to use
only the routers set DNS ... or you could certainly use a firewall on your router to intercept DNS and redirect it to whatever you wanted.
But I would not set a static IP on the PC -- better to set it up on your router Smile


I don't see anywhere on the services page to set specific IPs for specific clients

When I say I'm setting a static IP and DNS on the PC, the IP makes no difference as long as it is on the same range, but the DNS I am setting is the routers IP address, and the router is set to use the Pi as DNS, so it should be using the Pi for DNS

But even if I set the Pi as DNS on the PC, it still won't work

It only seems to work if I enable DHCP, which gives my machine the wrong IP, I have stuff set up to work with a static IP on this machine, so DHCP isn't really an option

I don't see anywhere to set IPs for clients in DD-WRT, any ideas?

EDIT - My bad, I found it lol, I`ll try that

edit - Doesn't work, I add the MAC, IP, HOSTNAME etc, and press apply, and it just wipes out everything I have added and leaves it empty

_________________
WRT160NL


Last edited by Detection on Fri May 27, 2016 13:11; edited 1 time in total
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 1033
Location: Texas

PostPosted: Fri May 27, 2016 13:11    Post subject: Reply with quote
After you set what IP, correct MAC, and name, you want in 'Sevices' for your clients you
should reboot router and PC so they clear the old junk.
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 265
Location: UK

PostPosted: Fri May 27, 2016 13:12    Post subject: Reply with quote
mrjcd wrote:
After you set what IP, correct MAC, and name, you want in 'Sevices' for your clients you should reboot router and PC so they clear the old junk.


Edited my post, it's not working

Soon as I press Apply or Save, it clears everything I have entered, and leaves it blank again

EDIT -Working now, not having a good networking day today lol

_________________
WRT160NL
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 1033
Location: Texas

PostPosted: Fri May 27, 2016 13:16    Post subject: Reply with quote
Detection wrote:
Soon as I press Apply or Save, it clears everything I have entered, and leaves it blank again
Do one set at a time:
Fill in MAC, Hostname, IP, lease time and SAVE

Since you have DNSmasg unchecked on your main page I really don't know if static lease will work.

What build are you using?
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 265
Location: UK

PostPosted: Fri May 27, 2016 13:27    Post subject: Reply with quote
mrjcd wrote:
Detection wrote:
Soon as I press Apply or Save, it clears everything I have entered, and leaves it blank again
Do one set at a time:
Fill in MAC, Hostname, IP, lease time and SAVE

Since you have DNSmasg unchecked on your main page I really don't know if static lease will work.

What build are you using?


27506

It's OK I got it working thanks, yea it's happy with DNSMasq for DNS being disabled, it changed my PC IP immediately to the one I set in services

Now I have the machine using DHCP, I can also ping pi.hole successfully too

Although I'd like to know why I can't do that using the exact same settings, but with static on the PC

Thanks for your help

_________________
WRT160NL
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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