Check the Windows Firewall rule for RDP port 12230
Find and verify the inbound TCP 12230 rule that lets Remote Desktop reach your RunRacks server, recreate it if it was deleted and scope it without locking yourself out.
- Intermediate
- Windows VPS · Admin RDP
- 5 min read
RunRacks Windows VPS and Admin RDP servers accept Remote Desktop on TCP port 12230. Windows Defender Firewall must allow that port inbound, or nobody can connect. This guide shows how to find the rule, confirm it is enabled and correct, recreate it if it has gone missing, and narrow it to your own IP addresses safely.
Before you start
- A Remote Desktop session to the server at
203.0.113.10:12230, signed in as an administrator. - PowerShell as Administrator: right-click Start, choose Terminal (Admin) or Windows PowerShell (Admin).
- Know where the browser console is: it is in the control panel for your service in the Dashboard. It works without Remote Desktop, so it is your way back if a firewall change goes wrong.
Changing or deleting the 12230 rule can cut off your Remote Desktop session immediately. Keep the browser console ready before you edit anything, and add new rules before you remove old ones.
Find the rule for port 12230
Firewall rules and their ports are stored separately, so search by port and then show the matching rules:
Get-NetFirewallPortFilter -Protocol TCP |
Where-Object LocalPort -eq 12230 |
Get-NetFirewallRule |
Format-Table Name, DisplayName, Enabled, Direction, Action, ProfileA healthy result has at least one rule with:
- Enabled:
True - Direction:
Inbound - Action:
Allow - Profile:
Any, or one that includes the profile your network uses (usuallyPublicon a VPS).
Check which profile the server's network uses:
Get-NetConnectionProfile | Format-Table Name, InterfaceAlias, NetworkCategoryIf the rule covers only Domain and the network is Public, the rule will not apply.
Check the rule's details
Look at the address and program filters, which can also block traffic. Replace the display name with the one from the previous step:
$rule = Get-NetFirewallRule -DisplayName "Remote Desktop (TCP 12230)"
$rule | Get-NetFirewallAddressFilter | Format-List RemoteAddress
$rule | Get-NetFirewallApplicationFilter | Format-List ProgramRemoteAddress : Anymeans connections are allowed from anywhere.- A list of addresses means only those IPs can connect. Make sure your current IP is included.
Program : Anyis normal for a port rule.
Also check that no block rule overrides it. Block rules win over allow rules:
Get-NetFirewallPortFilter -Protocol TCP |
Where-Object LocalPort -eq 12230 |
Get-NetFirewallRule |
Where-Object Action -eq 'Block'This should return nothing.
Recreate the rule if it is missing
If the search found no allow rule, add one. If you are connected at the moment, an existing session may survive briefly, but new connections will fail until the rule exists, so do this from the browser console if needed.
New-NetFirewallRule -DisplayName "Remote Desktop (TCP 12230)" `
-Direction Inbound -Protocol TCP -LocalPort 12230 `
-Action Allow -Profile AnyIf an old rule exists but is disabled, enable it instead of adding a duplicate:
Enable-NetFirewallRule -DisplayName "Remote Desktop (TCP 12230)"Then confirm Remote Desktop itself still listens on 12230:
Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumberThe result should show PortNumber : 12230.
Scope the rule to your IP addresses
Limiting the rule to the addresses you connect from blocks almost all password-guessing bots. Do it only if your IP is fixed or changes rarely.
- Find your current public IP from your own PC, for example by searching what is my IP in a browser.
- Set the rule's allowed addresses, listing every location you use. This example allows one office IP and one home range:
Set-NetFirewallRule -DisplayName "Remote Desktop (TCP 12230)" `
-RemoteAddress 198.51.100.20, 192.0.2.0/24- Without closing your current session, open a new Remote Desktop connection to
203.0.113.10:12230to prove it still works. - To undo the scope at any time:
Set-NetFirewallRule -DisplayName "Remote Desktop (TCP 12230)" -RemoteAddress AnyIf your home IP changes often, keep the rule open to all addresses and rely on strong passwords and account lockout instead, or use a VPN.
Check it works
From your own PC, test the port:
Test-NetConnection 203.0.113.10 -Port 12230TcpTestSucceeded : True means the firewall allows you in. On the server you can confirm the listener is up:
Get-NetTCPConnection -LocalPort 12230 -State ListenTroubleshooting
- Rule exists but the port test fails: the profile does not match the network, a block rule overrides it, or your IP is outside the scoped addresses. Run the checks above.
- Locked out after a change: open the browser console from the Dashboard, sign in and run the reset command
Set-NetFirewallRule ... -RemoteAddress Anyor recreate the rule. More help is in Fix a firewall change that locked you out of RDP. - Two rules for 12230: harmless, but confusing. Keep one and remove the duplicate with
Remove-NetFirewallRule -Name <Name>using theNamecolumn from the search. - Port test works, but sign-in fails: the firewall is fine. Check your username and password in the Dashboard.
Next steps
- Allow only your own address step by step: Allow only your IP on RDP port 12230.
- Open other ports safely: Open a port in Windows Firewall.
- Review the basics: RunRacks RDP port 12230.
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Security
Linux Security: Using aide for File Integrity Monitoring on VPS
AIDE builds a checksum database of your system files and reports anything that changed. This guide installs it, creates a baseline, tunes the rules and schedules daily checks on a Linux VPS.
- Advanced
- Linux VPS
- 6 min read
Security
iptables basics: list, allow, drop and save rules
Learn how iptables chains and rule order work, then build a small ruleset that allows SSH and web traffic, drops everything else and can be edited by line number.
- Intermediate
- Linux VPS
- 6 min read
Security
RDP Hardening: Using Local Security Policy to Limit User Rights
Restrict what RDP users can do on a Windows VPS by editing user rights in Local Security Policy — who may log on remotely, who holds admin rights, and which dangerous privileges stay with Administrators only.
- Intermediate
- Windows VPS · Admin RDP
- 6 min read