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!

firewall start script problem / transmission port closed after every reboot

Nilugeator

New Around Here
Hi all,

I use an AC86U, firmware 384.13, with openvpn and transmission client.

My goal is to use only VPN for transmission.

For that, transmission is running on my router, and I binded it into 192.168.2.30
I set a policy based routing (strict) for 192.168.2.30 going through VPN

I had to forward port on my VPN provider, folowing my airvpn provider tutorial:
https://airvpn.org/faq/port_forwarding/
and
https://airvpn.org/forums/topic/9270-how-to-forward-ports-in-dd-wrt-tomato-with-iptables/


So basicaly I forwarded 26740 port on airvpn web GUI and I put this into my firewall- start script :

#!/bin/sh
iptables -I FORWARD -i tun11 -p udp -d 192.168.2.30 --dport 26740 -j ACCEPT
iptables -I FORWARD -i tun11 -p tcp -d 192.168.2.30 --dport 26740 -j ACCEPT
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 26740 -j DNAT --to-destination 192.168.2.30
iptables -t nat -I PREROUTING -i tun11 -p udp --dport 26740 -j DNAT --to-destination 192.168.2.30

And of course I made this script executable, with putty i send a :
chmod a+rx /jffs/scripts/firewall-start

Nevertheless, my problem is that after every reboot of my router, my 26740 port is definitively closed (tested with transmission port checking or canyouseeme)

So every time, I had to set again with putty :
/jffs/scripts/firewall-start

And then port is opened again

Maybe firewall start script wont launch at startup? why and how to know that?
Maybe firewall start script launch at startup but something after it close my 26740 port? Why and how to know it?

Thank you very much for any help/idea about that
 
Try: dos2unix /jffs/scripts/firewall-start
and test again. Remove CR at end of line in firewall-start
 

Similar threads

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