Browse the documentation

Open a Port on Your Windows VPS

On a FreshPerf VPS, no inbound port is blocked by default. If an application installed on your Windows VPS (game server, business software, website…) cannot be reached from the Internet, the block almost always comes from the server's Windows firewall. This article explains how to open a port and check that it answers.

The examples use port 8080 over TCP. Replace it with the port and protocol (TCP or UDP) given in your application's documentation.


1. Check the client area firewall

  1. In your client area, open your Windows VPS.
  2. Open Networking, then Firewall.
  • No rules: all traffic is allowed, there is nothing to do here. Go to the next step.
  • Block rules exist: add an Accept rule for your port, with the right Protocol and the port under Destination ports, then move it above the block rules.

Note: in the client area firewall, a port range is written 8000:8100. In Windows, it is written 8000-8100.

See also Configure Firewall Rules from the Client Area.


2. Open the port in the Windows firewall

Connect to the VPS with Remote Desktop: see Connect to Your Windows VPS via Remote Desktop (RDP).

With PowerShell

Open PowerShell as an administrator, then create an inbound rule:

New-NetFirewallRule -DisplayName "My application (TCP 8080)" -Direction Inbound -Protocol TCP -LocalPort 8080 -Action Allow
  • Several ports or a range: -LocalPort 8080,8443 or -LocalPort 8000-8100.
  • For a UDP port, replace -Protocol TCP with -Protocol UDP.
  • If the application uses both TCP and UDP, create one rule per protocol.

The rule applies immediately, without a restart. To remove it later:

Remove-NetFirewallRule -DisplayName "My application (TCP 8080)"

With the graphical interface

  1. Press Windows + R, type wf.msc, then press Enter. The Windows Defender Firewall console opens.
  2. Click Inbound Rules, then New Rule.
  3. Choose Port.
  4. Choose TCP or UDP, then Specific local ports, and enter your port.
  5. Choose Allow the connection.
  6. Leave all three profiles ticked.
  7. Name the rule, then click Finish.

⚠️ Warning: do not disable or delete the Remote Desktop rules: you would lose your RDP access. If that happens, the client area's KVM console (Tools → KVM console) lets you fix it.


3. Check that the application is listening

On the VPS, in PowerShell:

Get-NetTCPConnection -State Listen -LocalPort 8080

For a UDP port:

Get-NetUDPEndpoint -LocalPort 8080
  • No result: the application is not running or does not use this port. Check its configuration.
  • Local address 127.0.0.1: the application only listens on the server itself. Configure it to listen on all addresses (0.0.0.0) or on the VPS's public IPv4.

4. Test from outside

From another Windows computer, open PowerShell:

Test-NetConnection -ComputerName 192.0.2.10 -Port 8080

Replace 192.0.2.10 with your VPS's IPv4 address. The line TcpTestSucceeded : True confirms that the port is open and the application answers.

This test only works for TCP: for a UDP port, test directly with the client application.


Troubleshooting

Find the situation that matches your problem below.

TcpTestSucceeded : False

Check, in this order:

  1. that the application listens on the port (step 3).
  2. the Windows firewall rule: right port, right protocol, Allow action.
  3. the rules under Networking → Firewall in the client area.
  4. that you are testing the VPS's IPv4 address: Windows VPS cannot be reached over IPv6.

The application closes or its files disappear

Microsoft Defender may have quarantined the application. Open Windows Security, then Protection history, to check.

The problem persists

Contact FreshPerf support with the port, the protocol and the application involved.