There was a problem loading the comments.

Open firewall ports on your VPS (Linux and Windows)

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

If a service on your VPS works locally but is not reachable from the internet, the most common reason is a firewall rule. This article shows how to open ports on GARMTECH KVM VPS (Linux or Windows).

Important safety note

  • Do not block your own access: before applying firewall changes, make sure SSH (Linux) or RDP (Windows) stays open.
  • If you are connected over SSH, keep the session open while you apply changes.

Step 1: Identify what port you need

Common examples:

  • Web server: 80 (HTTP), 443 (HTTPS)
  • SSH: 22
  • Remote Desktop (Windows): 3389
  • Custom apps: check your application configuration

Linux VPS: UFW (Ubuntu/Debian)

Check status:

sudo ufw status verbose

Allow a port (examples):

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

Allow a custom port (example: 25565):

sudo ufw allow 25565/tcp

Enable UFW if it is disabled:

sudo ufw enable

Linux VPS: firewalld (CentOS/RHEL/AlmaLinux/Rocky)

Check current rules:

sudo firewall-cmd --list-all

Open ports permanently (examples):

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=ssh

Or open a custom port:

sudo firewall-cmd --permanent --add-port=25565/tcp

Reload to apply:

sudo firewall-cmd --reload

Windows VPS: Windows Defender Firewall

Option A (GUI):

  1. Open Windows Defender Firewall with Advanced Security.
  2. Go to Inbound RulesNew Rule…
  3. Select PortTCP (or UDP if needed).
  4. Enter the port number (example: 80 or 443).
  5. Choose Allow the connection.
  6. Select profiles (Domain/Private/Public) as needed.
  7. Name the rule and finish.

Option B (Command line):

netsh advfirewall firewall add rule name="Allow HTTP" dir=in action=allow protocol=TCP localport=80
netsh advfirewall firewall add rule name="Allow HTTPS" dir=in action=allow protocol=TCP localport=443

Step 3: Verify from outside

  • Make sure the application is listening on the port (not only on 127.0.0.1).
  • Verify the service is running.
  • Test connectivity from another network/device.

Related articles

  • How to access your VPS (SSH / RDP)
  • Reinstall VPS and reset root/administrator password

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Tags

© GARMTECH