nexus12345
New Around Here
The port forwarding routes on my router disappear after every 2-3 days. I usually have to run the nat-script again to get the routes added and ports open up again for a few hours/days. I have checked the NVRAM <50% used. JFFS <10% used.
Router : AC86U
Merlin Ver. : 386.1_2 ( Upgraded and then complete reset with power removed and reconfigured from base)
The script below adds routes that open port from VPN connection.
#!/bin/sh
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 49589 -j DNAT --to-destination 172.16.0.78
iptables -t nat -I PREROUTING -i tun11 -p udp --dport 49589 -j DNAT --to-destination 172.16.0.78
iptables -I FORWARD -i tun11 -p udp -d 172.16.0.78 --dport 49589 -j ACCEPT
iptables -I FORWARD -i tun11 -p tcp -d 172.16.0.78 --dport 49589 -j ACCEPT
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 32400 -j DNAT --to-destination 172.16.0.78
iptables -t nat -I PREROUTING -i tun11 -p udp --dport 32400 -j DNAT --to-destination 172.16.0.78
iptables -I FORWARD -i tun11 -p udp -d 172.16.0.78 --dport 32400 -j ACCEPT
iptables -I FORWARD -i tun11 -p tcp -d 172.16.0.78 --dport 32400 -j ACCEPT
Router : AC86U
Merlin Ver. : 386.1_2 ( Upgraded and then complete reset with power removed and reconfigured from base)
The script below adds routes that open port from VPN connection.
#!/bin/sh
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 49589 -j DNAT --to-destination 172.16.0.78
iptables -t nat -I PREROUTING -i tun11 -p udp --dport 49589 -j DNAT --to-destination 172.16.0.78
iptables -I FORWARD -i tun11 -p udp -d 172.16.0.78 --dport 49589 -j ACCEPT
iptables -I FORWARD -i tun11 -p tcp -d 172.16.0.78 --dport 49589 -j ACCEPT
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 32400 -j DNAT --to-destination 172.16.0.78
iptables -t nat -I PREROUTING -i tun11 -p udp --dport 32400 -j DNAT --to-destination 172.16.0.78
iptables -I FORWARD -i tun11 -p udp -d 172.16.0.78 --dport 32400 -j ACCEPT
iptables -I FORWARD -i tun11 -p tcp -d 172.16.0.78 --dport 32400 -j ACCEPT