Only your server's forwarded ports reach it from the internet, and our network doesn't filter what comes in on them; there's no firewall panel in the client area. On a new server only SSH on Linux or Remote Desktop on Windows listens (on the first one), but every service you add later on another forwarded port is reachable from the whole internet unless your own firewall blocks it. Inside the server, SSH still listens on port 22 and Remote Desktop on 3389: the forwarding maps your public port to them.
Your other forwarded ports reach the same port numbers on the server, so a service you publish listens on one of those numbers, and that is the port to open. Ports 80 and 443 can't be forwarded. The examples below use port 10201; your ports are on the service page. Run the Linux commands below as root (or with sudo).
ufw (Debian and Ubuntu)
apt install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp
ufw allow 10201/tcp # only if you run a service on this forwarded port
ufw enable
ufw status verbose
To allow SSH only from your own IP address, add the specific rule first, then remove the general one:
ufw allow from 203.0.113.50 to any port 22 proto tcp
ufw delete allow 22/tcp
firewalld (AlmaLinux and Rocky Linux)
The default public zone already allows SSH on port 22. Keep SSH on port 22 inside the server: your first forwarded port reaches only port 22. If you move SSH anyway, use one of your other forwarded port numbers and allow it first; any other port cuts off SSH access (undo it from the console).
dnf install firewalld
systemctl enable --now firewalld
firewall-cmd --permanent --add-port=10201/tcp # only if you run a service on this forwarded port
firewall-cmd --reload
firewall-cmd --list-all
To allow SSH only from your own IP address:
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.50" service name="ssh" accept'
firewall-cmd --permanent --remove-service=ssh
firewall-cmd --reload
Windows Defender Firewall
Run these in an elevated PowerShell. To open one of your forwarded ports:
New-NetFirewallRule -DisplayName "Allow port 10201" -Direction Inbound -Protocol TCP -LocalPort 10201 -Action Allow
To allow Remote Desktop only from your own IP address:
Set-NetFirewallRule -DisplayGroup "Remote Desktop" -RemoteAddress 203.0.113.50
If you lock yourself out
Open the noVNC console (or the xterm.js console on Linux), log in with your password and undo the change:
ufw disable # Debian / Ubuntu
systemctl stop firewalld # AlmaLinux / Rocky Linux
Set-NetFirewallRule -DisplayGroup "Remote Desktop" -RemoteAddress Any # Windows
Tips
- If your home IP address changes often, restricting SSH or RDP to one address can lock you out. Consider a VPN with a fixed address, or keep key-only SSH open instead.
- Docker publishes container ports through its own firewall rules, which can bypass ufw. Bind containers to
127.0.0.1when they don't need to be public. - Check which services are listening with
ss -tlnp(Linux) orGet-NetTCPConnection -State Listen(Windows).