How to Open a Port in Your VPS Firewall
Open a port on your VPS: first in the panel firewall, then in ufw or firewalld. Learn how the two layers work together and how to test the port.
To open a port on your VPS, add it in the panel's Firewall page (Create rule, then Open a port) and also allow it in the firewall inside your server, such as ufw allow 8080/tcp. Your service must be listening on that port too. At the recommended Balanced protection level the panel does not block your ports, so the usual reason a port seems closed is the firewall inside the server or a service that is not listening.
Two firewalls, two jobs
| Panel firewall (Firewall page) | Firewall inside your server | |
|---|---|---|
| Where it works | At the network edge, before traffic reaches your server. | Inside the operating system (ufw, firewalld, Windows Firewall). |
| Main job | Filters attacks (DDoS) and applies your open ports, lists and limits. | Decides which services accept connections. |
| Default | Always on. The recommended protection level is Balanced. | Depends on your system and on what you configured. |
In Balanced and Reinforced levels, every port still answers even if it is not in your list. Adding a port to Open ports lets the shield inspect it better, and it is required in Strict mode, where only the ports you opened receive traffic. If you enabled a firewall inside the server, you must open the port there too.
Step 1: Open the port in the panel
- Sign in at dashboard.solumecore.com and click Firewall in the left menu.
- If you have several servers, pick yours in the Choose a server selector. Servers using the SolumeCore shield show this firewall.
- Click Create rule at the top right (or open the Rules tab and click Open a port).
- In the first step, What, choose Open a port and continue.
- In Details, either click a shortcut (Minecraft Java 25565, Minecraft Bedrock 19132, Website 80 and 443, SSH 22, Remote Desktop 3389, FiveM 30120, TeamSpeak 9987, Rust 28015) or type the port number in Port. You can enter several separated by commas, like
80, 443. - Choose the Protocol: TCP (websites, SSH, most services), UDP (many games and voice chat) or Both. If you are unsure, check your software's documentation.
- Optional: tick Also turn on the connection guard for TCP ports (the shortcuts tick it for you; if you type the port by hand it starts unticked). It protects the start of each connection against scans and SYN floods, with a tiny delay on the first connection.
- Read the sentence under This is how it'll work to check the result, then continue.
- In Where, choose the server or servers to apply it to and click Create rule.
You will see Rule created on 1 server. The port now appears in the Rules tab under Open ports, with its protocol and a switch for the Connection guard.
Use a template instead
For common cases, the Templates tab has ready-made sets of rules. Web server opens 80 and 443 and guards 443. Minecraft opens 25565 and 19132/UDP. Remote Desktop (Windows) opens 3389 and turns on its brute-force filter. SSH only from my IP opens 22, adds your IP to the trusted list and turns on the SSH guard. You can also apply them from your server's Network & domain tab.
Step 2: Allow the port inside the server
If you enabled a firewall inside your server (see Secure your new VPS), allow the port there. Replace 8080 with your port.
sudo ufw allow 8080/tcp
sudo ufw statussudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-portsNew-NetFirewallRule -DisplayName "Allow TCP 8080" -Direction Inbound -Protocol TCP -LocalPort 8080 -Action AllowFor UDP use /udp instead of /tcp (or -Protocol UDP on Windows).
Step 3: Check that your service is listening
A port only answers if a program is waiting on it. On Linux, run:
sudo ss -tulpn | grep 8080The address should be 0.0.0.0 or * (all interfaces). If it says 127.0.0.1, the service only accepts local connections: change its configuration so it listens on all addresses.
Step 4: Test from outside
From another computer (not from the server itself), test the port:
nc -vz 203.0.113.10 8080Test-NetConnection 203.0.113.10 -Port 8080A message such as succeeded or open (or TcpTestSucceeded : True on Windows) means the port answers. Note that UDP ports cannot be tested this way; check them with the program that uses them.
Strict mode: open ports first
In the Overview tab you can choose the protection level: Balanced (recommended), Reinforced or Strict. In Strict, only the ports you opened receive traffic. The panel warns you before switching and lists the ports that will stay open.
Before switching to Strict, open every port you use, including SSH (22, or your custom port). With no open ports, nothing reaches your server, and you could lose SSH access. If that happens, switch back to Balanced from the Firewall page.
Close a port
In the Rules tab, click the trash icon on the port's row and confirm Close port. In Strict mode, whatever uses that port stops working immediately. In Balanced mode it just loses the extra inspection. Remember to also remove it in the firewall inside the server if you no longer want it open (sudo ufw delete allow 8080/tcp).
If you moved SSH to another port
Tell the panel firewall, so it keeps protecting SSH: in the Rules tab, under Where your services listen, click Change next to SSH and enter the new port. This only informs the firewall: moving SSH itself is done in /etc/ssh/sshd_config.
Troubleshooting
- The port still seems closed: go through the steps in order. The most common causes are the firewall inside the server, a service that is not running, or a service listening only on
127.0.0.1. - You see "Strict mode with no open ports": open the ports you use, or go back to Balanced.
- Your server is not in the selector: the firewall protects servers with a dedicated IP. A server still being installed will not appear until it has its IP.
- The Firewall page looks different from this guide: some servers use a different firewall view. Open a ticket from the panel and we will tell you how to manage your ports.
- Cannot connect at all: follow What to do if you can't connect to your VPS.
FAQ
Is a port closed by default on my VPS?
Not in the panel: the default level, Balanced, lets all ports answer. A port can still be unreachable because of the firewall inside your server or because nothing is listening on it.
Do I need to open the port in both places?
If you use a firewall inside the server (ufw, firewalld or Windows Firewall), yes. The panel only requires it in Strict mode.
How do I open port 25565 for Minecraft on my VPS?
Use the Minecraft Java shortcut in the wizard (or the Minecraft template), then run sudo ufw allow 25565/tcp if you use ufw.
What is the difference between TCP and UDP?
TCP is used by websites, SSH and most services. UDP is used by many games and voice chat. If you choose Both, the rule is created for both protocols.
Can I apply the same rule to several servers?
Yes. In the Where step of the wizard, tick every server you want.
Related articles
- Secure your new VPS
- What to do if you can't connect to your VPS
- How to connect to your VPS via SSH
- Firewall and DDoS protection
Want a server with DDoS protection included? Check out our VPS plans.