Forums

Resolved
0 votes
Hi,

If I open the port for Plex in the firewall it always opens the default port for Plex. Port 32400. I like to use another port which is exposed to the internet. If I use a separate Plex server then this is not problem because I use port forwarding. If I use Plex on ClearOS it is another matter. I have to set this up via ip tables but it must be done manually. How is this done?


iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80400 -j REDIRECT --to-port 32400


Is this correct?
Wednesday, December 08 2021, 02:26 PM
Share this post:
Responses (7)
  • Accepted Answer

    Friday, December 10 2021, 12:26 PM - #Permalink
    Resolved
    0 votes
    Yes, that mus be priority one if you expose services to the internet.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 10 2021, 11:33 AM - #Permalink
    Resolved
    0 votes
    Just make sure you have a secure password.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 10 2021, 08:58 AM - #Permalink
    Resolved
    0 votes
    For some reason both options are not working for the full 100%. The Plex interface is reporting that it is not connected but Plex is reachable.

    Also noticed that Plex has some sort of relay service because when I close the Plex port it is still working (half). I can play movies via my phone over 5G but the interface is not working properly.

    Best option is to use the default port and open it in the firewall. Not sure how safe it is. It is well known that Plex is using port 32400.

    Any thoughts?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 08 2021, 05:17 PM - #Permalink
    Resolved
    0 votes
    Trying the second option. I'll have test and see if that works okay. For now thank you.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 08 2021, 04:04 PM - #Permalink
    Resolved
    0 votes
    Marcel van Leeuwen wrote:

    You don't have to use the default port for Plex only on your local network. So if you do port forward from 48200 --> 32400 with port forwarding app this will work fine. The server is then located on your LAN not on ClearOS. In settings > server > remote access you set port 48200.

    What if Plex runs on ClearOS. I set port 48200 in settings > server > remote access. The default port 32400 of Plex has to re-routed to 48200??
    You have misunderstood. Try port forwarding to your ClearOS LAN IP, changing ports. It may just work.

    Otherwise, set up the external port in Plex and just open that port in the firewall (TCP and whatever port number).
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 08 2021, 04:01 PM - #Permalink
    Resolved
    0 votes
    You don't have to use the default port for Plex only on your local network. So if you do port forward from 48200 --> 32400 with port forwarding app this will work fine. The server is then located on your LAN not on ClearOS. In settings > server > remote access you set port 48200.

    What if Plex runs on ClearOS. I set port 48200 in settings > server > remote access. The default port 32400 of Plex has to re-routed to 48200??
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 08 2021, 03:35 PM - #Permalink
    Resolved
    0 votes
    Hi Marcel,
    Unfortunately that won't help you as you still have to keep port 32400 open or it will block you as the INPUT chain is after the PREROUTING chain.
    I have never tested this but can you try a port forward to your ClearOS LAN IP? Alternatively, you can directly change the remote port in Plex via the menu at Settings > Server > Remote Access > Advanced which would be easier.
    The reply is currently minimized Show
Your Reply