What you will read?
If you’re a media enthusiast, you probably know that Plex is one of the best tools for organizing and streaming your media library. However, for your Plex server to be accessible from outside your home network, you’ll need to configure your firewall settings properly. In this blog post, we’ll walk you through the steps to configure the firewall on your Ubuntu server to allow Plex access securely. Before diving into the firewall configuration, it’s crucial to understand the ports that Plex uses. By default, Plex Media Server operates on the following ports:
- TCP Port 32400: This is the primary port used by Plex for streaming.
- UDP Port 1900: Used for SSDP discovery.
- TCP Port 3005: Used for remote access and notifications.
- TCP Port 8324: Used for the Plex Web interface.
To access Plex Media Server over the network, you need to open the ports used by Plex on the firewall. By default, Plex uses port 32400 for access via a browser and other devices. Opening this port will allow you to access the Plex server on your local network or even remotely.
Check Your Firewall Status
First, you need to verify whether you have UFW (Uncomplicated Firewall) installed and running on your Ubuntu server. You can check the status of UFW with the following command:
sudo ufw status
If UFW is inactive, you can enable it using:
sudo ufw enable
Allow Plex Ports
Now that you have confirmed UFW is running, the next step is to allow the necessary ports for Plex. You can do this with the following commands:
sudo ufw allow 32400/tcp sudo ufw allow 1900/udp sudo ufw allow 3005/tcp sudo ufw allow 8324/tcp
These commands will allow incoming traffic on the specified ports, enabling Plex to communicate with your devices effectively.
Verify Your Firewall Rules
After adding the necessary rules, it’s a good idea to check your firewall settings again to ensure the changes have been applied successfully. Use the following command:
sudo ufw status
You should see entries for the ports you just added, indicating that they are allowed.
Testing Plex Access
To ensure that your Plex server is accessible from outside your local network, you can perform a simple test. Open a web browser on a device outside your network and enter the following URL, replacing your-server-ip
with your actual server IP address:
http://your-server-ip:32400/web
If the Plex Web interface loads, congratulations! Your firewall is correctly configured for Plex access.
Advanced Configuration (Optional)
If you are using a more advanced setup, such as a router with additional firewall settings, you may need to ensure that port forwarding is set up correctly on your router. Forward the same ports (32400, 1900, 3005, and 8324) to the internal IP address of your Ubuntu server.
Configuring your firewall for Plex access on an Ubuntu server is a straightforward process that significantly enhances your media streaming experience. By following these steps, you ensure that your Plex server is accessible while maintaining a secure environment. Happy streaming! For more tips and tricks on server management and media streaming, keep an eye on our blog at dropvps.com.