mtchang / rt-n56u

Automatically exported from code.google.com/p/rt-n56u
0 stars 0 forks source link

Running iptable command #1029

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there

I am a complete amateur to this kind of thing so any help would be appreciated. 
I initially installed your firmware as it made my 5g signal much better on 65u. 
I now have a google chromecast (which has hardcoded dns servers) and would like 
it to point to my a specific dns sevrers to access geoblocked sites.

The commands I want to run are:

iptables -I PREROUTING -t nat -p udp -d 8.8.4.4 --dport 53 -j DNAT 
--to-destination [UnoDns server]

iptables -I PREROUTING -t nat -p udp -d 8.8.8.8 --dport 53 -j DNAT 
--to-destination [UnoDns server]

Now I have no idea what to do. Do I have to do it through terminal? or can I 
edit one of the scripts? What will I have to exactly do?
Is this command even correct?

Thanks

Original issue reported on code.google.com by tarassol...@gmail.com on 14 Oct 2013 at 2:34

GoogleCodeExporter commented 9 years ago
http://my.router/Advanced_Tweaks_Content.asp
I think, you may use script "Run after WAN up/down events"

Original comment by Dr.Sydorenko.O on 15 Oct 2013 at 12:10

GoogleCodeExporter commented 9 years ago
I am in the same boat with Chromecast.

If you were able to get it to work with this firmware, could you please share 
how?

Original comment by jho...@gmail.com on 9 Dec 2013 at 7:11

GoogleCodeExporter commented 9 years ago
You would follow the instructions to get SSH server up and running 
(instructions in the commonTips page: 
https://code.google.com/p/rt-n56u/wiki/CommonTips).

After logging in via SSH, I was able to force openDNS on all devices connected 
to the router via the following commands:

iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to 
208.67.222.222
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to 
208.67.222.222
iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to 
208.67.220.220
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to 
208.67.220.220

Hope that helps.

Original comment by ohka...@gmail.com on 30 Jan 2014 at 7:49