Author Topic: force devices to use the router DNS setting  (Read 104 times)

Amerigo

  • Calf
  • *
  • Posts: 1
force devices to use the router DNS setting
« on: July 16, 2018, 03:19:33 pm »
I have a WZR-HP-G300NH. Is it possible to prevent devices from overriding the router DNS setting? In the devices there is DNS setting that can be used instead of the one setup on the router configuration page. I have my router DNS set to OpenDNS, but it seems this setting can be bypassed. How can I force the devices to use the router DNS setting?

Thanks

davo

  • Really Big Bull
  • VIP
  • *
  • Posts: 5876
Re: force devices to use the router DNS setting
« Reply #1 on: July 17, 2018, 06:59:58 am »
If you use the DDWRT firmware then this is possible.

Go to Administration tab Commands sub tab
In the Commands text box, enter:

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)

Click Save Firewall (note: your WAN interface will be restarted)
PM me for TFTP / Boot Images / LSRecovery.exe file.