Skip to content

Instantly share code, notes, and snippets.

@nmaggioni
Forked from andrey-str/ufw plexmediaserver app profile.md
Last active March 29, 2026 17:44
Show Gist options
  • Select an option

  • Save nmaggioni/45dcca7695d37e6109276b1a6ad8c9c9 to your computer and use it in GitHub Desktop.

Select an option

Save nmaggioni/45dcca7695d37e6109276b1a6ad8c9c9 to your computer and use it in GitHub Desktop.
Plex Media Server UFW rule

/etc/ufw/applications.d/plexmediaserver

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
ports=1900/udp|32469/tcp

[plexmediaserver-all]
title=Plex Media Server (Standard + DLNA)
description=The Plex Media Server (with additional DLNA capability)
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp|1900/udp|32469/tcp

Once you have defined your application file tell ufw to reload the application definitions with:

ufw app update plexmediaserver

Use it with:

ufw allow plexmediaserver-all
@rakesh1988
Copy link
Copy Markdown

i agree that you have opened all the ports as mentioned in https://support.plex.tv/hc/en-us/articles/201543147-What-network-ports-do-I-need-to-allow-through-my-firewall-
still, I see the remote access is disabled.
my ufw log has few entries for blocked connection as below
Dec 7 13:53:28 XXXX kernel: [2168275.032152] [UFW BLOCK] IN=eno1 OUT= MAC=a0:d3:c1:2b:2a:7f:00:XXXXXXXXXXXX SRC=192.168.1.254 DST=192.168.1.25 LEN=293 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=1900 DPT=35513 LEN=273

Dec 7 13:50:13 XXX kernel: [2168080.032481] [UFW BLOCK] IN=eno1 OUT= MAC=a0:d3:c1:2b:XXXXXXXXXXXXXXXX SRC=192.168.1.20 DST=192.168.1.25 LEN=230 TOS=0x00 PREC=0x00 TTL=64 ID=8380 DF PROTO=UDP SPT=32414 DPT=39174 LEN=210

Am i missing anything?

@mon0theist
Copy link
Copy Markdown

Worked for me, thanks!

@MonKijim
Copy link
Copy Markdown

Worked for me too, thank you.

@wax911
Copy link
Copy Markdown

wax911 commented Nov 30, 2019

Thank you, also worked for me too 💯

@jonathan-dejong
Copy link
Copy Markdown

Works well for me as well :)
Remember that if you're not a root user (usually you should not be) you'll need sudo before each command.

@Baledin
Copy link
Copy Markdown

Baledin commented Jun 4, 2020

Fantastic, ty

@x-limitless-x
Copy link
Copy Markdown

Thank you!

@BNolet
Copy link
Copy Markdown

BNolet commented Apr 3, 2022

You are a gentleman and a scholar, hats off to you!

@naxels
Copy link
Copy Markdown

naxels commented Apr 24, 2022

Awesome, thanks!

Copy link
Copy Markdown

ghost commented Jun 15, 2022

noice

@Lueton
Copy link
Copy Markdown

Lueton commented Sep 6, 2022

thanks a lot!

@rcland12
Copy link
Copy Markdown

Thank you so much!

@arlenreyb
Copy link
Copy Markdown

Works perfectly, and I even learned how ufw app lists worked in the process. Thanks!

@cjLGH
Copy link
Copy Markdown

cjLGH commented Jan 16, 2025

Works perfectly, and I even learned how ufw app lists worked in the process. Thanks!

same, thanks for this 👍

@raphaelmaria
Copy link
Copy Markdown

Thanks, This is solved my problem with Plex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment