Port Forward with PIA VPN

1 post / 0 new
choder's picture
Port Forward with PIA VPN

I have PIA running on my R7000 with Advancedtomatoe.  I am trying to forward some incoming ports.

Can this be donw with the following for port 8000 and internal ip

Do I add this to the firewall rule under the advanced -> scripts -> Firewall?  

How do I know what Tun# to use?

Do these settings only apply after a reboot of the router?

iptables -I FORWARD -i tun11 -p udp -d --dport 8000 -j ACCEPT
iptables -I FORWARD -i tun11 -p tcp -d --dport 8000 -j ACCEPT
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 8000 -j DNAT --to-destination
iptables -t nat -I PREROUTING -i tun11 -p udp --dport 8000 -j DNAT --to-destination