Forums

Resolved
0 votes
I am running the Plex media server at home on ClearOS Community. I have the port 32400 open for the server to be accessible to the internet.
I want to change the port, but it seems like Plex can only work on 32400. The help at Plex says to make a route in your router to NAT from ext ip:newport to plexserverip:32400

I have tried to setup port forwarding from newport to internalip:32400 and configure plex.tv settings to see my server at newport and it doesn't work.

any suggestions?

thanks
Thursday, July 02 2015, 01:55 PM
Share this post:
Responses (6)
  • Accepted Answer

    Friday, July 03 2015, 03:02 PM - #Permalink
    Resolved
    0 votes
    It must be possible to change the port. Can I suggest you ask on the Plex forums when they are up again (they were hacked a couple of days ago and are down as a precaution).

    If you can't, there is a firewall trick you can pull. Assuming Plex uses TCP, you can add a custom rule:
    iptables -t nat -I PREROUTING -p tcp --dport 34200 -j REDIRECT --to-port 32400
    This will redirect port 34200 traffic to port 32400. This will also leave 32400 open and you can't close this in the PREROUTING chain which is where it needs to be closed. You can, however, pull a trick by redirecting it to a black hole:
    iptables -t nat -I PREROUTING -p tcp --dport 34200 -j DNAT --to some_IP_not_on_your_LAN_but_in_a_private_subnet
    The reply is currently minimized Show
  • Accepted Answer

    Friday, July 03 2015, 01:04 PM - #Permalink
    Resolved
    0 votes
    Hi Nick,
    I have it working just fine on port 32400 with opening that port on the firewall.

    The issue is that I want to change the port from 32400 to 34200. Plex doesn't allow you to change the port in the program. They recommend using NAT to forward wan:34200 to int:32400 which I can't do, as Plex is on the gateway. the only way I can think to do this is to put a DLink router infront of my ClearOS machine and make the ClearOS machine a server instead of a gateway.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 02 2015, 08:09 PM - #Permalink
    Resolved
    0 votes
    Because it is on your gateway, do not port forward. Only open the port. The instructions to port forward through a router only apply if Plex is running on a box behind a router.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 02 2015, 07:38 PM - #Permalink
    Resolved
    0 votes
    ClearOS is my gateway and Plex is running on it. Plex seems to be hard coded to use 32400. The Advanced option in Plex config seems to tells plex.tv what port to communicate with the plex server.

    So according to plex, you need to port forward from newport to 32400 on the gateway.

    editing /etc/clearos/plex.conf to a new port didn't seem to work. executed lsof -i :32401 (new port) and nothing was there. Checked lsof -i :32400 and it was still showing as listening.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 02 2015, 07:27 PM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:

    If ClearOS is your gateway you do not need to forward any ports, just open 32400. You can probably change the port by editing /etc/clearos/plex.conf or choosing the Advanced option in the Plex webconfig.


    Hummm' interesting thing to investigate! Everybody knows that port 32400 is used for Plex services.., indeed nice if we could change the default port.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 02 2015, 06:18 PM - #Permalink
    Resolved
    0 votes
    If ClearOS is your gateway you do not need to forward any ports, just open 32400. You can probably change the port by editing /etc/clearos/plex.conf or choosing the Advanced option in the Plex webconfig.
    The reply is currently minimized Show
Your Reply