Article 12.2 - Windows Firewall — PowerShell Rules
Short answerUse PowerShell cmdlets such as Get-NetFirewallRule, New-NetFirewallRule, Enable-NetFirewallRule, and Remove-NetFirewallRule to manage Windows Defender Firewall on your Windows VPS. VPSGrid provides unmanaged hosting — you administer the guest OS.
Overview
This article focuses on PowerShell firewall management for VPSGrid Windows VPS. For the GUI walkthrough, see How to Enable or Disable Windows Firewall Rules.
Before you start
- Connect with RDP as Administrator
- Open Windows PowerShell as Administrator
- Know which TCP/UDP ports your apps need (for example RDP
3389, HTTP80, HTTPS443)
Do not disable the firewall entirely on an internet-facing VPS. Prefer allowing only required inbound ports. If you lock yourself out of RDP, use the noVNC/console in the VPSGrid client area to fix rules.
Commands
# List enabled inbound rules (summary)
Get-NetFirewallRule -Direction Inbound -Enabled True |
Select-Object Name, DisplayName, Profile, Action |
Format-Table -AutoSize
# Find rules related to Remote Desktop
Get-NetFirewallRule -DisplayName '*Remote Desktop*' |
Get-NetFirewallPortFilter |
Format-Table -AutoSize
# Allow a custom TCP port (example: 8080)
New-NetFirewallRule -DisplayName 'Allow TCP 8080' `
-Direction Inbound -Protocol TCP -LocalPort 8080 `
-Action Allow -Profile Any
# Allow HTTP and HTTPS for a web server
New-NetFirewallRule -DisplayName 'Allow HTTP 80' `
-Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow -Profile Any
New-NetFirewallRule -DisplayName 'Allow HTTPS 443' `
-Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow -Profile Any
# Enable / disable an existing rule by display name
Enable-NetFirewallRule -DisplayName 'Allow TCP 8080'
Disable-NetFirewallRule -DisplayName 'Allow TCP 8080'
# Remove a rule you created
Remove-NetFirewallRule -DisplayName 'Allow TCP 8080'
# Confirm firewall profiles
Get-NetFirewallProfile |
Select-Object Name, Enabled |
Format-Table -AutoSizeRun PowerShell as Administrator. VPSGrid support does not execute guest OS commands for unmanaged Windows VPS plans.
Common ports on a Windows VPS
- 3389/TCP — Remote Desktop (keep allowed if you use RDP)
- 80/TCP and 443/TCP — web sites (IIS or other listeners)
- 1433/TCP — SQL Server (do not expose to the internet unless required and secured)
Important notes
- VPSGrid is unmanaged — guest OS firewall and application exposure are your responsibility.
- Opening a firewall port is not enough if the Windows service is not listening on that port.
- After changing rules, test from an external network (not only from inside the VPS).
VPSGrid context
VPSGrid sells unmanaged KVM VPS with Administrator access on Windows templates. You manage Windows Defender Firewall, RDP hardening, updates, and applications. VPSGrid manages hypervisor infrastructure, primary IP connectivity, power controls, and billing.
Frequently Asked Questions
Should I turn Windows Firewall off?
No. Keep it on and allow only the ports you need. Turning it off increases exposure on a public IP.
I blocked RDP by mistake. How do I recover?
Use the noVNC/console from the VPSGrid client area, open PowerShell as Administrator, and re-enable the Remote Desktop firewall rules.
GUI or PowerShell — which should I use?
Either works. This article is PowerShell-focused. Use the Windows Firewall Basics article for the graphical console.
Related Articles
Need More Help?
Open a ticket at billing.vpsgrid.net with your service ID, primary IP, and the exact PowerShell commands already tried.
Was this answer helpful?