What's new

ASUS RT-N66U iptable Chromecast help

  • 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!

Kryspy

Occasional Visitor
Hi,

I have been fighting with this and I think I am doing something wrong.

I live in Canada and therefore need iptables to use Chromecast with Hulu Plus and Netflix US.

I put this into /jffs/scripts/nat-start

#!/bin/sh
sleep 1
iptables -I PREROUTING -t nat -p udp -s 192.168.1.125 --dport 53 -j DNAT --to-destination 69.42.56.54

iptables -I PREROUTING -t nat -p udp -s 192.168.1.130 --dport 53 -j DNAT --to-destination 69.42.56.54

I have 2 Chromecasts so one iptable for each. When I reboot the router these do not work. If I manually telnet in and type sh /jffs/scripts/nat-start then it works.

What am I doing wrong?

Kryspy
 
make sure you do have NAT enabled on the router
and check script permissions ?

try chmod a+x /jffs/scripts/nat-start
 
Last edited:
I'll take a look at the NAT status when I get home from work. Pretty sure I did the chmod on the script but I'll re-run it to make sure.

Kryspy
 
Well I checked then NAT was enabled and it was. Permissions were also set.

Do these iptables belong in nat-start or somewhere else?

Kryspy
 
Well I checked then NAT was enabled and it was. Permissions were also set.

Do these iptables belong in nat-start or somewhere else?

Kryspy

If it's in the nat table (like your rules are - see the "-t nat"), then it must be in nat-start.
 
Okay. Another question, is the nat-start script saved as such or do I have to name it nat-start.sh ? Reason I ask is after thye router has started if I manually type: sh /jffs/scripts/nat-start in terminal it works.

Kryspy
 
Okay. Another question, is the nat-start script saved as such or do I have to name it nat-start.sh ? Reason I ask is after thye router has started if I manually type: sh /jffs/scripts/nat-start in terminal it works.

Kryspy

I have a nat-start script named just like that and it works.

does this work

/jffs/scripts/nat-start

that should work too. I am guessing that when you can run the script directly it should be fine.
 
Changing sleep 1 to sleep3 seems to have solved the issue.

Thanks to all and to RMerlin for awesome firmware.


Update: Works but was crushing my DNS settings for everything else. Moving it to firewall-start instead solved the problem. Also changed the device IP to those of Google which the Chromecast are hard coded to.

So my script now reads:

#!/bin/sh
sleep 3

iptables -I PREROUTING -t nat -p udp -d 8.8.4.4 --dport 53 -j DNAT --to-destination 69.42.56.54

iptables -I PREROUTING -t nat -p udp -d 8.8.8.8 --dport 53 -j DNAT --to-destination 69.42.56.54


Kryspy
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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