Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

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

    Scheduled Pinned Locked Moved NAT
    1 Posts 1 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      siralos
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.