Force IPV6 DNS server, disable (or block) IPV4 DNS

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page 1, 2  Next
Author Message
hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Wed Feb 08, 2023 4:16    Post subject: Force IPV6 DNS server, disable (or block) IPV4 DNS Reply with quote
As the subject goes... is it possible, reasonable, or wise to force DNS requests via IPV6 to NextDNS?

I'm behind CGNAT so it's virtually impossible to use their "link IP" method like I used to use (before CGNAT), but they do have other options (DoT, DoH, or IPV6) as a work-around solution which don't require linking your IPV4 IP. I see in other posts that dd-wrt will not support DoT and DoH so that seems to leave me with one hope/option of using IPV6.

It seems like turning on IPV4 AND IPV6 is easy, but it seems like both will be running together instead of forcing DNS via IPV6, right? If they work together, then I assume most DNS will bypass NextDNS... so can I force IPV6 DNS?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Wed Feb 08, 2023 6:53    Post subject: Reply with quote
DDWRT supports DoT and DoH just fine.
See: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=323896

But if you only specify an IPv6 DNS server than that is used.
You can set a DNS server on the IPv6 tab.

On Basic setup page enable "Ignore WAN DNS" and do not put anything in Static DNS 1,2 and 3

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Wed Feb 08, 2023 12:20    Post subject: Reply with quote
I like to do it like this:

in dnsmasq additional options:

Code:
no-resolv
bogus-priv
strict-order
server=2a07:a8c1::
server=45.90.30.0
server=2a07:a8c0::
server=45.90.28.0



and then you can put as much ipv4 and ipv6 dns servers you want. Usually dns6 servers has low latency...
Back days I told that every router has dns6 fields along with dns4 fields... but he was not willing to put dns6 on setup page...
hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Wed Feb 08, 2023 14:13    Post subject: Reply with quote
Very cool! I see I was making some bad assumptions.
I will give these options a try.
hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Thu Feb 09, 2023 6:59    Post subject: Reply with quote
I tried the setup per the snap shot... but my nextdns profile hostname (static) seems to change IPs rather quickly... so the IP you define in the additional options isn't static in the same way 1.1.1.1 is very static....

So... I'm confused and at a loss here.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Thu Feb 09, 2023 8:40    Post subject: Reply with quote
If you mean that your WAN IP address is changing then you can use DDNS
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Thu Feb 09, 2023 9:50    Post subject: Reply with quote
hatcreek68 wrote:
I tried the setup per the snap shot... but my nextdns profile hostname (static) seems to change IPs rather quickly... so the IP you define in the additional options isn't static in the same way 1.1.1.1 is very static....

So... I'm confused and at a loss here.


but you must add ID to dnsmasq so that nextdns knows what should block... it works as a proxy...

add to dnsmasq

Code:
add-cpe-id=yourID
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Thu Feb 09, 2023 10:19    Post subject: Reply with quote
sorry... I just saw you want to use DoT/DoH

go to your nextdns page


and you will see examples with your servers with your ID for DoH/DoT/DoQ

hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Thu Feb 09, 2023 19:36    Post subject: Reply with quote
Thanks for being patient with me here... so as one solution to my issue... can I ask(beg) for support for DoT / nextDNS setup... it's still not working so must not be clear to me, or not setup correctly yet.

- I see this format for DoT... URL pg 17 ... server-tls 9.9.9.9:853 -host-name: dns.quad9.net (and using Use Additional Servers Only, ENABLE)

So for DoT I should just put:
server-tls 45.90.xx.xx:853 -host-name: 25xxx.dns.nextdns.io
(I'm just putting my nextdns IPv4 server as a guess here...?) and then my hostname?

↑ Except I tried this... and it either broke DNS totally and could only ping by IP, or still gave the error "using nextDNS with no profile"; away from home, just recall it didn't work.

I have not tried DoH since DoT failed... but it should just be:
server-https https://9.9.9.9/dns-query format... so...
server-https https://dns.nextdns.io/24xxx ? and just put this in add't config in smartDNS?

IPv6... I tried NO ipv4 DNS settings, and only my nextDNS IPv6 DNS under basic setup / ipv6... but this failed, and in testing, I can't ping ipv6 addresses in ANY configuration (even when WAN is working) so I gave up on IPv6 for now.

I'm also wondering if maybe I'm just running too new of a version for my R6700 router... am i just hitting bugs and not config issues.
hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Thu Feb 09, 2023 19:56    Post subject: Reply with quote
Mile-Lile wrote:
I like to do it like this:

in dnsmasq additional options:

Code:
no-resolv
bogus-priv
strict-order
server=2a07:a8c1::
server=45.90.30.0
server=2a07:a8c0::
server=45.90.28.0




Oh man - I've never noticed there is a router tab to click on in nextDNS and if gives you this format, plus your ID as the last line as you said later. I'll try this when I get home as (i hope) the easiest way to close out this problem... and get nextDNS working like it used to already be working...

Still a thorn in my side that I can't figure out DoH/DoT setup, but having it work with any solution is better than broken.
hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Fri Feb 10, 2023 4:46    Post subject: Reply with quote
I found settings that work... see snapshots
---
But since the network demons never let you rest... new issues.

ISP 1: CGNAT, dynamic IP: settings per snapshot are working. But of coarse, this gateway is now deactivated since I was in the middle of upgrading to business service (same Co., new gateway/modem), but I got to play with both for a while and saw that when I just switch the upstream gateway... one worked, one did not.

ISP 2: CGNAT, static IP "business internet"; exact same settings per snapshot DO NOT WORK and apparently the gateway is able to override my DNS, and override "ignore WAN DNS"... and force me to ISP/openDNS server which breaks nextDNS

---

So... new post or new question.... how to actually ignore ISP DNS? when the setting isn't enough? Or did ISP 1 just work by accident and I have something mis-configured still?
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Fri Feb 10, 2023 7:00    Post subject: Reply with quote
it should work no metter if you are behind CGNAT... it is not important if your IP changes (static ot dynamic) becasue you are identified with your ID which is same all the time for profile (you can have multiple profiles on the same account). SmartDNS DOH/DOT with nextdns servers worked for me just fine on ddwrt...

but I suggest you to try NextDNS CLI but just during setup when setup wizard asks you dou you want to use nextdns for cache choose NO...
it will choose best dns6 low latency and works just like charm...
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Fri Feb 10, 2023 7:04    Post subject: Reply with quote
above will work with encrypted.... but if you want to mess with ddns use setup page


egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Fri Feb 10, 2023 7:16    Post subject: Reply with quote
On Setup page MTU is set to manual, which is very uncommon maybe you need that but ususally Automatic will work.

Shortcut Forwarding Engine is SFE, a better choice usually is CTF and FA for Flow acceleration

Local DNS is set to 127.0.0.1 also very uncommon usually default 0.0.0.0 is the right choice for routers in Gateway mode, this actually means that DNSMasq will query itself as upstream resolver and thus creates a loop.

Static DNS 1, 2 and 3 are empty and Ignore DNS WAN is enabled so there are actually no upstream resolvers.

This can be overridden manually but why not start with a sound default configuration.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
hatcreek68
DD-WRT Novice


Joined: 29 Nov 2016
Posts: 27

PostPosted: Fri Feb 10, 2023 14:59    Post subject: Reply with quote
I returned to normal settings per EGC, turned off smartdns and dnsmasq add'l settings and just tried to get linked IP settings working, and they don't (even though they used to), which is mostly what started this whole thread.

Per the snap shot settings and trying various DNS servers as static dns 1 (1.1.1.1, 8.8.8.8, 9.9.9.9 and my nextDNS ipv4....) everything is getting redirected or trapped by T-mobile to use openDNS... (as reported by https://whoismydns.com/ and nextdns setup page) the only successful change I can make is force it to adguard public dns servers... i assume this works b/c adguard uses opendns.

So - if my ISP is locking to openDNS / blocking other DNS... something like DoH should be the answer? Setting this up can finally break through T-mobile network and get nextDNS to post as my DNS provider (same verification as above), but I can't get the settings right to actually link to my profile.

eg. - this for smartdns add'l config is not working.
server-https https://45.90.28.0/dns-query -host-name: https://dns.nextdns.io/24xxxx
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking 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