Jump to content
Not connected, Your IP: 3.147.86.246
matteoar1

ANSWERED Make Plex server available externally forever

Recommended Posts

Hello,
I cant manage to access my Plex server with VPN, port 63132 is ready for use in client area:
670027504_Screenshot2024-03-03alle12_04_38.png.f4b6fa046cc6435518b2885b9b11b0ff.png
Plex settings:1364312653_Screenshot2024-03-03alle12_01_32.png.08b0573b27bb60b345e44d52b07e8f21.png

If I click "retry" in Plex setting it works (I can access to my library externally with no problems) but after a few seconds It won't work.

Can you help me? I already read this topic but I didn't help me. I think that I set up things correctly.

Share this post


Link to post
@matteoar1

Hello!

We get a "connection refused" (error 111) when a packet is sent to your VPN client port 63162. The packet reaches your node and the connection is actively reset. It's possible that a firewall rejects the packet (instead of silently dropping it) or that nothing listens to port 63162 and the system is configured to reset any attempted connection when the destination port doesn't exist.
 
2 hours ago, matteoar1 said:

I can access to my library externally with no problems but after a few seconds It won't work.


This fact seems to confirm that the problem is with Plex. Unfortunately we can't see a reason, with the current information, to explain how it's possible that Plex works fine for some time and then stops working (maybe some firewall rule which is enforced with some delay? but this sounds like a wild speculation...). Can you please run anything else listening to VPN interface port 63162, while the system is connected to the VPN, and check what happens?

Kind regards
 

Share this post


Link to post

I don’t have any firewall active.

I tried to set the 63162 to my torrent client and it tells me that it is open.

So is the problem Plex? Can I do something to fix it?
 

Share this post


Link to post
@matteoar1

Hello!

At least you now know that your VPN and system settings are correct and that the VPN remote inbound port forwarding system works properly. We would like to see, while the system is connected to the VPN and Plex is running, which interface(s):port Plex listens to. How to print such info varies from system to system: can you tell us your Operating System name and version?

Kind regards
 

Share this post


Link to post
1 hour ago, matteoar1 said:

I'm running on a Mac mini with M2. My OS is macOS 14.3.1 (23D60) (Sonoma).
Thanks for your help.


Hello!

While the system is connected to the VPN and Plex is running please open a terminal and enter the following command:
sudo lsof -i -n -P | grep -i plex

Then copy and paste in your next message the whole output.
 
1 hour ago, matteoar1 said:

I see that someone suggest to use this method. I'm not a pro user, I don't know what these steps do. Do you suggest to follow this method?


The method suggests enabling IP forwarding and redirecting all packets destined for Plex to the physical network interface port 32400, as if Plex were a very peculiar server unable to listen on the VPN interface. If that's the case yes, you will need that, but we refuse to think that Plex is so junky with this basic feature. Furthermore the method uses pf for packet mangling and therefore it may interfere with Network Lock, which uses pf too. According to other customers (but please note that we do not use Plex) this method is not applied in recent Plex releases and everything works as it should.

Kind regards
 

Share this post


Link to post

I did't undestand anything you said after 

Quote
The method suggests to enable IP forwarding and route all the packets aimed at Plex to the physical network interface port 32400
I'm sorry but use things using online tutorial, I don't understand how things works. I hope that you can help me.

BTW this is the command output.
 

Plex\x20M   728         matteo   18u  IPv6 0x5e8f1037afa692f5      0t0    TCP *:32400 (LISTEN)

Plex\x20M   728         matteo   19u  IPv4 0x5e8f1037af0fb9ed      0t0    TCP 127.0.0.1:32401 (LISTEN)

Plex\x20M   728         matteo   68u  IPv4 0x5e8f1032e3456bb5      0t0    UDP *:*

Plex\x20M   728         matteo   69u  IPv4 0x5e8f1032e3464fb5      0t0    UDP *:*

Plex\x20M   728         matteo   73u  IPv4 0x5e8f1032e42d33b5      0t0    UDP *:32413

Plex\x20M   728         matteo   74u  IPv4 0x5e8f1032e42cfbb5      0t0    UDP 127.0.0.1:61427

Plex\x20M   728         matteo   75u  IPv4 0x5e8f1032e42d0fb5      0t0    UDP 127.0.0.1:61623

Plex\x20M   728         matteo   77u  IPv4 0x5e8f1032e42d2bb5      0t0    UDP *:1901

Plex\x20M   728         matteo   79u  IPv4 0x5e8f1032e3466bb5      0t0    UDP *:*

Plex\x20M   728         matteo   80u  IPv4 0x5e8f1032e9153bb5      0t0    UDP *:*

Plex\x20M   728         matteo   81u  IPv4 0x5e8f1032e90f3bb5      0t0    UDP *:*

Plex\x20M   728         matteo   82u  IPv4 0x5e8f1032e3466fb5      0t0    UDP *:*

Plex\x20M   728         matteo   84u  IPv4 0x5e8f1032e3463bb5      0t0    UDP *:*

Plex\x20M   728         matteo   87u  IPv4 0x5e8f1032e3467fb5      0t0    UDP *:32414

Plex\x20M   728         matteo   88u  IPv4 0x5e8f1032e346a7b5      0t0    UDP *:32410

Plex\x20M   728         matteo   89u  IPv4 0x5e8f1032e42173b5      0t0    UDP *:32412

Plex\x20M   728         matteo   90u  IPv4 0x5e8f1032e42d1fb5      0t0    UDP *:*

Plex\x20M   728         matteo   91u  IPv4 0x5e8f1032e889afb5      0t0    UDP *:*

Plex\x20M   728         matteo   92u  IPv4 0x5e8f1032e34667b5      0t0    UDP *:*

Plex\x20M   728         matteo   93u  IPv4 0x5e8f1032e430bbb5      0t0    UDP *:*

Plex\x20M   728         matteo   94u  IPv4 0x5e8f1032e88517b5      0t0    UDP *:*

Plex\x20M   728         matteo   95u  IPv4 0x5e8f1032e8a5ffb5      0t0    UDP *:*

Plex\x20M   728         matteo   96u  IPv4 0x5e8f1032e912f3b5      0t0    UDP *:*

Plex\x20M   728         matteo   97u  IPv4 0x5e8f1032e8897bb5      0t0    UDP *:*

Plex\x20M   728         matteo   98u  IPv4 0x5e8f1032e9a5b7b5      0t0    UDP *:*

Plex\x20M   728         matteo   99u  IPv4 0x5e8f1032e430d3b5      0t0    UDP *:*

Plex\x20M   728         matteo  100u  IPv4 0x5e8f1032e8b3ffb5      0t0    UDP *:*

Plex\x20M   728         matteo  101u  IPv4 0x5e8f1032e42cffb5      0t0    UDP 192.168.1.54:49703

Plex\x20M   728         matteo  102u  IPv4 0x5e8f1037ab7af345      0t0    TCP 192.168.1.54:49839->192.168.1.59:9080 (ESTABLISHED)

Plex\x20M   728         matteo  103u  IPv4 0x5e8f1037ab7d10dd      0t0    TCP 10.21.70.144:58585->192.46.236.7:443 (ESTABLISHED)

Plex\x20M   728         matteo  104u  IPv4 0x5e8f1037ac16e2fd      0t0    TCP 10.21.70.144:58867->192.168.253.254:49152 (SYN_SENT)

Plex\x20M   728         matteo  105u  IPv4 0x5e8f1032e8a827b5      0t0    UDP *:*

Plex\x20M   728         matteo  106u  IPv4 0x5e8f1032e42d27b5      0t0    UDP 192.168.1.54:61025

Plex\x20M   728         matteo  107u  IPv4 0x5e8f1032e42d2fb5      0t0    UDP 192.168.1.54:56090

Plex\x20M   728         matteo  108u  IPv6 0x5e8f1032e8da72f5      0t0    TCP 192.168.1.54:32400->192.168.1.59:43906 (ESTABLISHED)

Plex\x20M   728         matteo  109u  IPv4 0x5e8f1032e9199bb5      0t0    UDP *:*

Plex\x20S   894         matteo    4u  IPv4 0x5e8f1037af0e62fd      0t0    TCP 127.0.0.1:49233 (LISTEN)

Plex\x20T   936         matteo   12u  IPv4 0x5e8f1037af0f0565      0t0    TCP 127.0.0.1:32600 (LISTEN)

Share this post


Link to post
@matteoar1

Hello!

Plex ignores your setting (port 63162 does not appear anywhere).

From the documentation, we can infer that the "public port" is only used to announce it through Plex centralized system to clients to facilitate connections, authentication and other purposes, and then it is required that some Plex upstream (the router or system packet mangling tool) re-directs incoming packets to port 32400.

Try to re-map port 63162 to your port 32400. If Plex announces to clients public port 63162, clients will contact AirVPN server IP address on port 63162 and the server will forward the packets to your Mac utun interface port 32400. Since Plex listens to port 32400 of all interfaces in IPv4 and IPv6:
Plex\x20M   728         matteo   18u  IPv6 0x5e8f1037afa692f5      0t0    TCP *:32400 (LISTEN)
(about why lsof in BSD and Linux shows an IPv4 and IPv6 socket only as IPv6 see here)

then your Plex should become reachable. In order to do so just add "32400" to the "Local" field of your remote port 63162, in your AirVPN account port panel.

Kind regards
 

Share this post


Link to post
30 minutes ago, Staff said:

In order to do so just add "32400" to the "Local" field of your remote port 63162, in your AirVPN account port panel.
2013838703_Screenshot2024-03-03alle18_30_54.png.b252f7d58550ac10f7069c9442814059.png1692208130_Screenshot2024-03-03alle18_31_43.png.d7b7f40945164dea43388eb4b0444471.png

I have the same error.
I don't know if there is anything else you can do to help me.

Is there a way to let Plex bypass the airVPN?
 

Share this post


Link to post
@matteoar1

Hello!

We're very sorry, we have nothing else to suggest you. Please consider to contact Plex support and community and provide them with all the information you gave us and include Plex log which can contain some precious information.

Kind regards
 

Share this post


Link to post

Thank you @Staff for your support. I was writing a support request to Plex staff and I noticed that now it seems to work. I didn't change any setting in Plex and in AirVPN port forwarding panel. Maybe I only had to wait (?) 😅. I'm hoping that now will it work properly "forever" but in the case it will not I'll know that it doesn't depend on AirVPN.

I relaunched the command, don't know if it changed something or not.
Thank you again.

Plex\x20M   728         matteo   18u  IPv6 0x5e8f1037afa692f5      0t0    TCP *:32400 (LISTEN)
Plex\x20M   728         matteo   19u  IPv4 0x5e8f1037af0fb9ed      0t0    TCP 127.0.0.1:32401 (LISTEN)
Plex\x20M   728         matteo   68u  IPv4 0x5e8f1032e3456bb5      0t0    UDP *:*
Plex\x20M   728         matteo   69u  IPv4 0x5e8f1032e3464fb5      0t0    UDP *:*
Plex\x20M   728         matteo   73u  IPv4 0x5e8f1032e42d33b5      0t0    UDP *:32413
Plex\x20M   728         matteo   74u  IPv4 0x5e8f1032e42cfbb5      0t0    UDP 127.0.0.1:61427
Plex\x20M   728         matteo   75u  IPv4 0x5e8f1032e42d0fb5      0t0    UDP 127.0.0.1:61623
Plex\x20M   728         matteo   77u  IPv4 0x5e8f1032e42d2bb5      0t0    UDP *:1901
Plex\x20M   728         matteo   79u  IPv4 0x5e8f1032e3466bb5      0t0    UDP *:*
Plex\x20M   728         matteo   80u  IPv4 0x5e8f1032e9153bb5      0t0    UDP *:*
Plex\x20M   728         matteo   81u  IPv4 0x5e8f1032e90f3bb5      0t0    UDP *:*
Plex\x20M   728         matteo   82u  IPv4 0x5e8f1032e3466fb5      0t0    UDP *:*
Plex\x20M   728         matteo   84u  IPv4 0x5e8f1032e3463bb5      0t0    UDP *:*
Plex\x20M   728         matteo   87u  IPv4 0x5e8f1032e3467fb5      0t0    UDP *:32414
Plex\x20M   728         matteo   88u  IPv4 0x5e8f1032e346a7b5      0t0    UDP *:32410
Plex\x20M   728         matteo   89u  IPv4 0x5e8f1032e42173b5      0t0    UDP *:32412
Plex\x20M   728         matteo   90u  IPv4 0x5e8f1032e42d1fb5      0t0    UDP *:*
Plex\x20M   728         matteo   91u  IPv4 0x5e8f1032e889afb5      0t0    UDP *:*
Plex\x20M   728         matteo   92u  IPv4 0x5e8f1032e34667b5      0t0    UDP *:*
Plex\x20M   728         matteo   93u  IPv4 0x5e8f1032e430bbb5      0t0    UDP *:*
Plex\x20M   728         matteo   94u  IPv4 0x5e8f1032e88517b5      0t0    UDP *:*
Plex\x20M   728         matteo   95u  IPv4 0x5e8f1032e8a5ffb5      0t0    UDP *:*
Plex\x20M   728         matteo   96u  IPv4 0x5e8f1032e912f3b5      0t0    UDP *:*
Plex\x20M   728         matteo   97u  IPv4 0x5e8f1032e8897bb5      0t0    UDP *:*
Plex\x20M   728         matteo   98u  IPv4 0x5e8f1032e9a5b7b5      0t0    UDP *:*
Plex\x20M   728         matteo   99u  IPv4 0x5e8f1032e430d3b5      0t0    UDP *:*
Plex\x20M   728         matteo  100u  IPv4 0x5e8f1032e8b3ffb5      0t0    UDP *:*
Plex\x20M   728         matteo  101u  IPv4 0x5e8f1032e42cffb5      0t0    UDP 192.168.1.54:49703
Plex\x20M   728         matteo  102u  IPv4 0x5e8f1037af0e9c55      0t0    TCP 10.19.134.206:62968->192.46.236.7:443 (ESTABLISHED)
Plex\x20M   728         matteo  103u  IPv6 0x5e8f1032e8416af5      0t0    TCP 192.168.1.54:32400->192.168.1.59:45428 (ESTABLISHED)
Plex\x20M   728         matteo  104u  IPv4 0x5e8f1037ad7dd785      0t0    TCP 192.168.1.54:54652->192.168.1.59:9080 (ESTABLISHED)
Plex\x20M   728         matteo  105u  IPv4 0x5e8f1032e8a827b5      0t0    UDP *:*
Plex\x20M   728         matteo  106u  IPv4 0x5e8f1032e42d27b5      0t0    UDP 192.168.1.54:61025
Plex\x20M   728         matteo  107u  IPv4 0x5e8f1032e42d2fb5      0t0    UDP 192.168.1.54:56090
Plex\x20M   728         matteo  108u  IPv6 0x5e8f1032e8da72f5      0t0    TCP 192.168.1.54:32400->192.168.1.59:43906 (ESTABLISHED)
Plex\x20M   728         matteo  109u  IPv4 0x5e8f1032e9199bb5      0t0    UDP *:*
Plex\x20M   728         matteo  110u  IPv4 0x5e8f1037ad818c0d      0t0    TCP 10.19.134.206:54941->192.168.253.254:49152 (SYN_SENT)
Plex\x20M   728         matteo  111u  IPv6 0x5e8f1032e8da3af5      0t0    TCP 192.168.1.54:32400->192.168.1.59:45284 (ESTABLISHED)
Plex\x20M   728         matteo  120u  IPv6 0x5e8f1032e9c4e2f5      0t0    TCP [::1]:32400->[::1]:54822 (ESTABLISHED)
Plex\x20S   894         matteo    4u  IPv4 0x5e8f1037af0e62fd      0t0    TCP 127.0.0.1:49233 (LISTEN)
Plex\x20T   936         matteo   12u  IPv4 0x5e8f1037af0f0565      0t0    TCP 127.0.0.1:32600 (LISTEN)
Have a nice day.

Share this post


Link to post
7 minutes ago, matteoar1 said:

Thank you @Staff for your support. I was writing a support request to Plex staff and I noticed that now it seems to work. I didn't change any setting in Plex and in AirVPN port forwarding panel. Maybe I only had to wait (?) 😅. I'm hoping that now will it work properly "forever" but in the case it will not I'll know that it doesn't depend on AirVPN.


Hello!

We're very glad to know it! Alas, it is still inexplicable that previously it worked only for a limited time or it did not work at all, and now it works reliably. It could be something to do with how Plex picks the preferred network interface, who knows, but from lsof it was clear that it listens on all interfaces. Maybe their support team can shed some light on this strange incident.

Kind regards

P.S. The new lsof output is consistent with the previous one, no changes.

Share this post


Link to post

I have the very same problem:  Plex server become accessible just for a copule of secs, then it goes back to unavailable.   
I have been trying this since yesterday:  yestrday I wasn't even able to have it working for a couple of sces, today, even if I din't change anyting, I have the server working for a couple of secs like mattear1 was mentioning.

Share this post


Link to post
1 hour ago, MHq said:

I have the very same problem:  Plex server become accessible just for a copule of secs, then it goes back to unavailable.   
I'm have been trying this since yesterday:  yestrday I wasn't even able to have it working for a couple of sces, today, even if I din't change anyting, I have the server working for a couple of secs like mattear1 was mentioning.


Hello!

Please let us and the community know in case Plex support or community find a solution to this problem, thanks in advance! The OP had his problem suddenly solved without an explanation.

Kind regards
 

Share this post


Link to post

Well, it happened again:  all at once it connected and my server is fully available outside since 3 hours.  Port is configured as follows: I remapped Plex port, but am quite sure it doesn't make any difference without remapping...anyway give it a try.  


 

Share this post


Link to post
Posted ... (edited)

I went through this thread for the same issue on a Windows 11 machine and the Eddie client.  The key step seems to be waiting a bit, possibly up to 24 hours. Copy/pasting some of the notes I made for myself below:

* Don't touch port forwarding on router
* Create Port Forwarding on AirVPN page, set P2P flag, set local port to 32400.
* Go to Plex Settings | Remote Access and set "Manually specify public port" flag and port to the one AirVPN allocated you.
* Wait! This doesn't immediately work for some reason. I had made these changes and then gone to bed. In the morning it was suddenly working. So unfortunately it might take a day to see some effect.

OBS: I had also enabled the AirVPN port in the windows firewall for TCP. This might not have been necessary, but can be a thing to try if its not working after waiting 24 hours.
* Heres the directions I followed from a [Reddit page]

Quote

Add a Windows firewall rule for your Plex port:

    Click on the Windows icon.

    Type wf.msc and hit Enter.

    Click on Inbound Rules.

    Under the Actions column, click on New Rule.

    Select Port, then click Next.

    Select TCP and Specific local ports.

    Enter the port number you were assigned, then click Next.

    Select Allow the connection, then click Next.

    Check the boxes next to Private and Public, then click Next.

    Enter a name, for example "Plex port XXXXX", then click Finish.

 


Cheers to this thread! its working!

 

Edited ... by anderssj

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...