What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

How to change WAN DNS port?

user2k10

Occasional Visitor
[Solved] How to change WAN DNS port?

I have my WAN DNS 1 + 2 set to the OpenDNS Family Shield addresses.

1: 208.67.222.123
2: 208.67.220.123

I want to make use of port 443 that the OpenDNS servers listen on.

I want to change the default port from 53 to 443, how can I achieve this?

Do I enter 208.67.222.123:443 and 208.67.220.123:443 in the GUI?

Do I add a rule to the PREROUTING table to change the destination port?

Do I add something to dnsmasq.conf.add?

Thanks!
 
Last edited:
No I am not, what I am looking for is in my question. Thank you for your input.
 
did opendns decide to start using 443 for their unencrypted services?
 
They don't specify the port (let it default) in the system generated dnsmasq.conf, so yes, you should be able to do it in dnsmasq.conf.add

Just add the line

Code:
port=443

Not sure if you will need any other changes....I'd give just this a try first.
That won't work. That is the port that dnsmasq will listen on for the LAN requests.

You'll need some kind of iptables entry with DNAT. Maybe something like this??

iptables -t nat -A OUTPUT -d 208.67.222.123 --dport 53 -j DNAT --to-destination 208.67.222.123:443
 
Last edited:
I solved this by creating /jffs/scripts/dnsmasq.postconf that contains the following:

Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh

[ ! -f "$CONFIG" -o ! -w "$CONFIG" ] && exit 0

# Find resolv-file option
resolv=$(awk -F "=" '/resolv-file/ {print $0}' $CONFIG)

# Disable resolv-file option
pc_replace $resolv "no-resolv" $CONFIG

# Append server lines
pc_append "server=208.67.222.123#443" $CONFIG
pc_append "server=208.67.220.123#443" $CONFIG

exit 0
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top