Outbound NAT and torrenting through VPN allowing only one changing open port



  • Hi everyone.

    I am a Private Internet Access (PIA) customer and pfSense user. PIA only allows for one open port and that port changes about once a day, so it is not static.

    I have now almost managed to put together a script that automatically updates the inbound NAT or port forwarding, as the PIA port changes about once a day.

    Problem:
    However, in terms of outbound NAT, I still have a problem. Preferably my torrent client should use a static port, so that traffic that comes in on the VPN interface and the currently open PIA port is translated to the IP of the torrent client and its static port. Similarly, outbound traffic from the torrent client should be translated to the IP of the VPN interface and the currently open PIA port.

    I have tried to achieve the above by altering my only inbound NAT rule, which previously just changed the destination IP from the VPN interface to the torrent client, to also change the port from the currently open PIA port to the static port on the torrent client. Furthermore, I have created an outbound NAT rule, which does the opposite. It does not work.

    Previously - when the inbound NAT rule did not change the port, the manual outbound NAT rule was not created and the torrent client was temporarily configured with the same port as currently opened by PIA - it worked.

    Any ideas?

    I am thinking that either a) I have misconfigured something so that the outbound NAT rule does not work as intended or or b) the torrent client bypasses outbound NAT by reporting the static port directly back to trackers and what not. If b) is the case, what else can I do, if I want to maintain the port used by the torrent client only in the router?


Log in to reply