Bypass dnsomatic

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
Vicini
DD-WRT Novice


Joined: 05 Feb 2019
Posts: 1

PostPosted: Tue Feb 05, 2019 19:52    Post subject: Bypass dnsomatic Reply with quote
I thought this was possible.
I only want up range 192.168.1.200 to 249 to use OpenDns
All others to use the router assigned dns

I already have this in the firewall which is working for all ip’s as it should.

iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12877
Location: Netherlands

PostPosted: Wed Feb 06, 2019 9:26    Post subject: Reply with quote
Your router has to know which DNS server to handout to which client, that could be either by IP address (but not in this case as it is in the same subnet) or by MAC address.

What you can do is to default to OpenDNS and give static leases to clients you want to give another DNS server.
This is done with DNSMasq options see:
https://www.linksysinfo.org/index.php?threads/specific-gateway-dns-for-specific-clients.72461/

If it only is for wifi clients you can consider using a guest wifi where you specify an alternate DNS server (it is even possible to "attach" wired clients to the subnet of the guest wifi with VLAN's)

_________________
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
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6435
Location: UK, London, just across the river..

PostPosted: Thu Feb 07, 2019 6:23    Post subject: Reply with quote
iptables -t nat -I PREROUTING -i br0 -s 192.168.1.102 -p udp --dport 53 -j DNAT --to 1.1.1.1
iptables -t nat -I PREROUTING -i br0 -s 192.168.1.102 -p tcp --dport 53 -j DNAT --to 1.1.1.1

presuming you use a br0 and replace those ip's with your ip's and dns required, you can use those lines with range, or mac too

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55779 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Display posts from previous:    Page 1 of 1
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