Linux Remote Access
Linux Remote Access
Section titled “Linux Remote Access”Enable secure remote streaming from your Linux server.
Enable Remote Access
Section titled “Enable Remote Access”- Open Plex Web:
http://localhost:32400/web - Settings → Remote Access
- Enable manual port: 32400
- Click Retry
Firewall Configuration
Section titled “Firewall Configuration”sudo ufw allow 32400/tcpsudo ufw allow 32410:32414/udpsudo ufw statusfirewalld
Section titled “firewalld”sudo firewall-cmd --permanent --add-port=32400/tcpsudo firewall-cmd --permanent --add-port=32410-32414/udpsudo firewall-cmd --reloadiptables
Section titled “iptables”sudo iptables -A INPUT -p tcp --dport 32400 -j ACCEPTsudo iptables -A INPUT -p udp --dport 32410:32414 -j ACCEPTsudo iptables-save | sudo tee /etc/iptables/rules.v4Port Forwarding
Section titled “Port Forwarding”Configure your router:
- External Port: 32400
- Internal Port: 32400
- Protocol: TCP
- IP: Your server’s IP
# Find your IPip addr show | grep "inet " | grep -v 127.0.0.1Dynamic DNS
Section titled “Dynamic DNS”ddclient
Section titled “ddclient”sudo apt install ddclientsudo nano /etc/ddclient.confprotocol=duckdnsuse=web, web=checkip.dyndns.orgserver=www.duckdns.orglogin=your-tokenpassword=your-domain.duckdns.orgsudo systemctl enable ddclientsudo systemctl start ddclientReverse Proxy (Nginx)
Section titled “Reverse Proxy (Nginx)”server { listen 443 ssl; server_name plex.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/plex.yourdomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/plex.yourdomain.com/privkey.pem;
location / { proxy_pass http://localhost:32400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }}Testing
Section titled “Testing”# Localnc -zv localhost 32400
# External (use online port checker)curl -I http://YOUR_PUBLIC_IP:32400