OKAll services are operational
InfrawireInfrawire LogoDocumentation

Open a port in Windows Firewall (VPS)

For a service on your Windows VPS (IIS site, game server, API) to be reachable from the internet, you usually need to allow the port in Windows Defender Firewall, in addition to any rules at your provider.

Before you start

  • Connect via Remote Desktop: see Connect with RDP.
  • Know the port number and protocol (TCP or UDP).
  • Open only what you need (least privilege).

Method 1: GUI wizard

  1. Open Windows Defender Firewall with Advanced Security (wf.msc).
  2. Inbound RulesNew Rule…
  3. PortTCP (or UDP) → Specific local ports: e.g. 80, 443, or 8080.
  4. Allow the connection.
  5. Select profiles (Domain, Private, Public — on a VPS, Public is often required).
  6. Name it clearly, e.g. HTTP IIS 80.

Method 2: PowerShell (TCP 80 and 443)

Open PowerShell as Administrator:

PowerShell
New-NetFirewallRule -DisplayName "HTTP TCP 80" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow New-NetFirewallRule -DisplayName "HTTPS TCP 443" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow

Custom port example:

PowerShell
New-NetFirewallRule -DisplayName "MyApp TCP 5000" -Direction Inbound -Protocol TCP -LocalPort 5000 -Action Allow

Verify something is listening

PowerShell
Get-NetTCPConnection -State Listen | Where-Object { $_.LocalPort -eq 80 }

Or:

PowerShell
netstat -ano | findstr :80

Security reminders

  • Opening a port exposes the service: keep updates, strong passwords, and TLS for web where possible.
  • Confirm cloud security groups if traffic never reaches the VM.

Troubleshooting

  • Still unreachable: ensure the app listens on 0.0.0.0 or the public interface, not only 127.0.0.1.
  • RDP issues: do not remove system RDP rules; use provider console if locked out.