Firewall Trouble

Server Version#: 4.30.2

I’m trying to tighten up the security on my sever a little bit. I figured the bare minimum I should do is just Reject all incoming SSH connections.

I’m using UFW on Ubuntu 20.04. All I did was Allow all outgoing traffic, and then deny all incoming traffic to TCP port 22.

After this, my Remote Access refused to connect for Plex. Local connections worked just fine. Shutting off UFW brought everything back.

I’ve checked the ports that Plex needs open and TCP 22 doesn’t seem to come into play at all.

What am I missing?

Is this server publicly accessible? If it’s only connected to your private network, I personally would not firewall it off like this. Also, you can just turn off SSH if you are not using it. Another option would be to only allow key based authentication.

Regarding your UFW setup: Could you post your rules/the output of ufw status verbose?

The server is used by my family so it does need to be accessible remotely.
I didn’t think of just turning off SSH, thanks.

After doing the verbose status, I realised that although I specified to Allow all outogoing connections, I didn’t realized that Incoming was set to deny by default. After changing that to Allow everything worked.

Thanks for sending me in the right direction!

Here’s a support article listing the ports required for various Plex services. Port 32400 TCP is the default for used for remote access.

Careful, these ports are needed open on the local server machine.
They are not needed to be open in the network gateway/router.

Indeed, and it says so in the article as well. The OP’s original question was regarding configuring ufw, Ubuntu’s software firewall.