TCP port forwarding not working

I’m trying to run a P2P program that needs TCP port forwarding. When I connect to PIA (Both Canadian and European servers), the port it gives me doesn’t work. I spent too many hours trying to get it working, so this is my last resort.  

On windows 7 with the PIA client, I have “port forwarding” checked in the settings, and the port number shows up on the tooltip. But the port it gives doesn’t work; the online port checkers say it’s closed, the PFportchecker program says it’s closed, and most importantly, my P2P program can’t connect to the port.

I also tried getting it set up on my linux VM. I was able to connect PIA after using the openVPN installer. Following advice from a different thread, I got the terminal to return a port number by imputing:

curl -d "user=USERNAME&pass=PASSWORD&client_id=$(cat ~/.pia_client_id)&local_ip=LOCAL_IP"

But the port it gives doesn’t work either. Online port testers say it’s closed, and my P2P program can’t connect to the port. 

My P2P program works on both windows 7 and my Linux VM when the port is assigned to my local IP on the router settings. It consistently works when PFportchecker says the port is open.



  • Posts: 861
    Can you expand on what you are trying to say in your last paragraph?
  • To get my P2P program to work, I have to go to my router settings (Verizon) and assign a custom TCP port to my IPv4 address. This is the only way to get my P2P program working.

    I guess I first need to explain this:
    After assigning a port to my computer (60000 for example), Online port testers still say that port 60000 is closed. But I'm able to run my P2P program using port 60000, and while it's running, online port testers say port 60000 is open. This leads me to believe that online port testers only check for active connections in a port, not if it's open/available. 

    What I've found is that PFportchecker (
    is able to tell me when ports (such as 60000) are open/available. Whenever it said the port was open, my P2P program would work. And whenever it said the port was closed, my P2P program wouldn't work.

    So... when I'm connected to PIA, the fact that 
    PFportchecker says the port is closed leads me to believe it's not a problem with my P2P client. 
  • Posts: 861
    You are heading in the right direction.

    First, let me caution you on something.  Never open ports on your router when you are trying to use the VPN from your computer.  There is no need and it can lead to security problems, defeating the whole purpose of using a VPN.  Remember, you are creating a tunnel from your computer to PIA.  All your router sees is a udp connection on port 1194 (for example).

    Anyway, regarding ports being open...  When you get a port assigned by PIA, plug that into your torrent client and let it go a few seconds on a torrent.  Then check with your tools to see if the port is open.  Far as I can tell PIA doesn't open the port unless you are actually trying to use it.

    I use

    Reading your first post you do say that it seems your torrent client can't connect to the port.  That isn't the way the open port works but it could be the firewall on your computer is blocking the incoming connection.
  • Well, I have noticed the problem too. It was working fine, but then, all of the sudden it stopped. I run it through openVPN on my linux box so i was using script to get port number. Once tunnel was created script was always returning the same port number number, no matter how many times I was running the script under same connection.
    I have noticed that since yesterday script is returning different port number every singe time I run it. And I checked this for different servers supporting port forwarding, it is the same
  • "Far as I can tell PIA doesn't open the port unless you are actually trying to use it"

    Are you certain of this, or are you basing this on what online port testers say? With a normal connection, online port testers will say the port is closed even if you manually assigned the port to your computer in the router settings. 

    Anyways... In my torrent clients, I input the port PIA gave me, and let it seed for over 30 minutes. Then I tried multiple online port testers, including the one you linked, and none of them said it was open. The torrent clients' built-in port testers said it was closed too. I tried this on multiple PIA servers (Toronto and Germany), and with multiple clients (Vuze, utorrent, Transmittions). I had my firewall turned off while I was doing these tests, but even without turning firewall off, by default it notifies you when it blocks something, so I don't think it's the problem

    I'm also having the same problem hede0n mentioned, where the script to get a port for linux is returning different ports each time, though this might be intended.

  • Posts: 4,013
    Having a port reserved for you does not mean it is open. It merely means it is ready to be opened. If there is not at that moment a program actually using the port, it will appear closed to any tool I have ever heard of.

    When you enable port forwarding via the PIA client or the script, it just makes the port available for you to use. It does not try to send data to anything that would make it open. (And this is how it should work anyway. It would cause all manner of problems for it to send data that you did not tell it to send via your programs, and many would wonder what sort of data was being sent and the paranoia would climb to an all-time high.)
  • Posts: 861
    different ports each time you request is the proper result far as I know.

    and Omni answered your question about when the port opens.
  • Did you ever get this working? I'm having the same problem. I'm connected to one of the servers that supports port forwarding, got the port out of the tooltip, put it in Deluge, torrent running away...and no incoming connections. Deluge itself says the port isn't available, and neither does the web site linked above. I also tried setting the port for Deluge's outgoing port (as well as incoming) just to see if it wasn't getting "triggered", but I still see it as closed. I'm not even sure what else to try, any suggestions?
  • Posts: 861
    you need to check with a remote port scanner to confirm whether the port is open or not.  The checks done by torrent clients are checking with UPnP and NAT-PMP which are not applicable in this case. (those check your router, which you should NOT be opening ports on when using the PIA app on your computer)

    try this page

    also, make sure your firewall isn't blocking access to your torrent client.
Sign In or Register to comment.