How to set up secure remote access (RDP) on your MU server
Make remote access to your MU server truly secure: restrict RDP by IP, change the default port, enforce strong passwords and add layers against brute force without losing the convenience of administration.
RDP (Remote Desktop Protocol) is the doorway through which you administer your MU server — and that's exactly why it's the favorite target of anyone trying to break in. Leaving port 3389 open to the entire internet, with an "Administrator" account and a mediocre password, is practically an invitatio
RDP (Remote Desktop Protocol) is the doorway through which you administer your MU server — and that's exactly why it's the favorite target of anyone trying to break in. Leaving port 3389 open to the entire internet, with an "Administrator" account and a mediocre password, is practically an invitation: there are botnets that scan entire IP ranges looking for exposed RDP and testing thousands of passwords per hour. A MU server compromised this way means a stolen database, duplicated items, leaked player accounts and, quite often, ransomware. The good news is that you can keep all the convenience of Remote Desktop while closing off nearly all of that attack surface with a few well-placed layers.
This guide shows how to turn an "open and vulnerable" RDP into a hardened remote access, layer by layer. If you're still building out the server's infrastructure, first take a look at the step-by-step guide on how to create a MU Online server; here we'll assume Windows is already up and you access it via RDP today.
Prerequisites
- Windows server (Windows Server 2016/2019/2022 are the most common on MU VPS setups).
- An account with administrator privileges.
- Access to the KVM/VNC console in your VPS provider's panel — the safety net in case you lock yourself out. Confirm that it works before you start.
- Your public administration IP (check it at "my ip"). If it changes frequently, consider getting a static IP, a VPN, or a second "bastion" server with a static IP.
- 30 to 40 minutes without players depending on the server, or at least an off-peak time slot.
Overview of the defense layers
Remote access security isn't a single setting, it's a stack. Each layer on its own can be bypassed; together, they greatly raise the cost of an attack. We'll apply them in this order:
| Layer | What it does | Effort | Impact |
|---|---|---|---|
| IP restriction in the firewall | Only your IP can reach RDP | Low | Very high |
| Strong password + rename admin account | Removes obvious targets | Low | High |
| Account lockout | Stops local brute force | Low | High |
| Changing the default port | Reduces automated scans | Medium | Medium |
| NLA (Network Level Authentication) | Authenticates before opening a session | Low | High |
| VPN / bastion | Takes RDP off the internet | High | Very high |
| Event auditing (4625) | Detects and reacts to attacks | Medium | Medium |
Order matters: start with IP restriction, which gives the biggest gain for the lowest risk, and keep stacking from there.
Step 1: restrict RDP to your IP in the firewall
This is the single most effective measure. Instead of leaving 3389 open to 0.0.0.0/0, allow only your IP. In an elevated PowerShell/Command Prompt (replace 203.0.113.10 with your real IP):
netsh advfirewall firewall add rule name="ADMIN - RDP restrito" dir=in action=allow protocol=TCP localport=3389 remoteip=203.0.113.10
If you administer from two or three fixed locations (home, work), you can list several IPs separated by commas in remoteip. Next, remove or disable any old rule that opens RDP to everyone:
netsh advfirewall firewall show rule name=all dir=in | findstr /i "3389 Desktop Remote"
Identify generic "Remote Desktop" rules and restrict their scope (or disable them), leaving only your IP-based rule in effect.
Step 2: harden the access accounts
Bots assume there's an account named Administrator/Administrador. Take that target off the map.
- Open
lusrmgr.msc(Local Users and Groups). - Rename the default Administrator account to something non-obvious (e.g.,
gm_root_2024). - Create a separate administration account, also with a non-obvious name, and use it day to day.
- Set a strong password: 16+ characters, mixing uppercase, lowercase, numbers and symbols. No server name, "mu123", dates or keyboard patterns.
Enforce the password policy in secpol.msc → Account Policies → Password Policy:
- Minimum length: 14
- Complexity: Enabled
- Maximum age: 90 days (or per your routine)
Step 3: enable account lockout
Without lockout, an attacker can test passwords endlessly. Configure it in secpol.msc → Account Policies → Account Lockout Policy:
| Setting | Suggested value (example, adjust to your routine) |
|---|---|
| Account lockout threshold | 5 attempts |
| Lockout duration | 15 minutes |
| Reset counter after | 15 minutes |
With this, after 5 wrong passwords the account locks for 15 minutes, making brute force impractical. Just be careful not to lock yourself out: that's why IP restriction (Step 1) comes first — it keeps bots from consuming your attempts.
Step 4: ensure NLA (Network Level Authentication) is on
NLA requires the user to authenticate before the desktop session is created, which saves resources and blocks a range of attacks. On modern Windows versions it's usually enabled by default, but confirm it:
SystemPropertiesRemote.exe→ Remote tab → check "Allow connections only from computers running Remote Desktop with Network Level Authentication".
Quick check via PowerShell:
Get-ItemProperty "HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name UserAuthentication
A value of 1 indicates NLA is active. If it's 0, enable it through the interface above.
Step 5: change the default RDP port
Changing 3389 to another port is security through obscurity — it doesn't replace the previous layers, but it greatly reduces the noise from automated scans that only hit 3389. The exact number is up to you; use an uncommon high port (the value below is just an example and varies by environment).
- Edit the registry at
HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp, thePortNumberkey (set it in decimal, e.g.,53389):
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name PortNumber -Value 53389
- Open the new port in the firewall, still restricted to your IP:
netsh advfirewall firewall add rule name="ADMIN - RDP porta custom" dir=in action=allow protocol=TCP localport=53389 remoteip=203.0.113.10
- Restart the Remote Desktop service (or the server). From then on, connect by specifying the port in the client:
YOUR_IP:53389.
Step 6: audit access attempts
Enable logon auditing to see who's trying to get in. In secpol.msc → Local Policies → Audit Policy, enable "Audit logon events" for failure (and success too, if you want to track your own access).
In the Event Viewer (eventvwr.msc) → Windows Logs → Security, event 4625 records logon failures, including the source IP. You can automate blocking repeat-offender IPs with a scheduled script that reads these events and creates firewall rules:
# Blocks IPs with many logon failures in the last few hours (example, adjust the limits)
$limite = 10
$desde = (Get-Date).AddHours(-2)
$falhas = Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=$desde} -ErrorAction SilentlyContinue
$ips = $falhas | ForEach-Object {
($_.Properties | Where-Object { $_.Value -match '^\d+\.\d+\.\d+\.\d+$' }).Value
} | Group-Object | Where-Object { $_.Count -ge $limite }
foreach ($grupo in $ips) {
$ip = $grupo.Name
if (-not (Get-NetFirewallRule -DisplayName "AUTOBLOCK RDP - $ip" -ErrorAction SilentlyContinue)) {
New-NetFirewallRule -DisplayName "AUTOBLOCK RDP - $ip" -Direction Inbound -Action Block -RemoteAddress $ip -Protocol TCP
Write-Output "$(Get-Date) blocked $ip with $($grupo.Count) failures"
}
}
Schedule it with Task Scheduler to run periodically. If you've already restricted by IP in Step 1, this script becomes a useful second line of defense, mainly while the port is still reachable from outside.
Step 7: the most secure option — take RDP off the internet with a VPN
The security ideal is for RDP to not be reachable from the internet. With a VPN (WireGuard and OpenVPN are the typical choices), you:
- Install the VPN server on the VPS itself or on a small bastion host.
- Make RDP listen only on the internal/private interface.
- Completely close the RDP port to the public IP in the firewall.
- Access the server by first connecting to the VPN and then opening RDP over the internal IP.
That way, to an external attacker, the RDP port simply doesn't exist. Alternatively, Windows Remote Desktop Gateway lets you publish RDP over HTTPS (443) with centralized authentication, which also eliminates the direct exposure of 3389. Both approaches take more work, but they're the gold standard for production servers.
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Can't connect after changing the port | Firewall has no rule for the new port | Create the new-port rule before closing the old one; connect with IP:port |
| I got locked out | IP rule with the wrong IP / IP changed | Log in through the KVM console and adjust the rule's remoteip |
| My own account keeps locking | Lockout too aggressive + exposed RDP | Restrict by IP first; adjust the lockout threshold |
| Bots still appear in event 4625 | Port changed but still open to everyone | Changing the port doesn't replace IP restriction; apply both |
| Client complains about "authentication" | NLA required and an old client | Update the RDP client or reassess the NLA requirement |
| VPN connects but RDP won't open | RDP isn't listening on the internal interface | Adjust the binding/port and the firewall rule for the VPN network |
Launch checklist
- Provider's KVM/VNC console tested and working
- RDP restricted to my IP in the firewall
- Default Administrator account renamed
- Strong password (14+ characters) and password policy active
- Account lockout configured
- NLA confirmed as active
- Default port changed and new port tested before closing the old one
- Logon auditing enabled and event 4625 being monitored
- Repeat-offender IP blocking script/routine scheduled (if applicable)
- Migration to VPN/bastion evaluated to take RDP off the internet
- Backup of the firewall rules exported
- Documentation of the new access procedure stored in a safe place
With these layers in place, your MU server's remote access is no longer the weakest link. The combination of IP restriction, hardened accounts, lockout and — in the best case — a VPN reduces the attack surface to the point of making an RDP intrusion economically unviable for the overwhelming majority of automated attackers.
Frequently asked questions
Is it safe to leave port 3389 open to any IP?
No. Port 3389 exposed to the world is scanned by bots around the clock looking for weak passwords. Restrict RDP to your IP in the firewall and, ideally, change the default port. If your IP changes, use a VPN or a bastion host with a static IP.
Does changing the RDP port really improve security?
Only a little, and on its own it isn't enough. Changing the port reduces the noise from automated scans, but it's security through obscurity. The real gain comes from restricting by IP, strong passwords, account lockout and, when possible, two-step authentication via a gateway.
I lost RDP access after changing the rules. How do I recover?
Use the KVM/VNC console from your VPS provider's panel, which doesn't depend on RDP. Through it you fix the firewall rule, re-enable the port or revert the change. That's why you should never touch RDP without the console at hand.
Is it worth using a VPN instead of exposing RDP?
Yes, it's the most secure approach. With a VPN (WireGuard, OpenVPN) you close the RDP port to the internet and only reach the server after joining the private network. RDP then listens only on the internal interface.
How do I lock down against brute-force password attempts?
Configure the Windows Account Lockout Policy to lock the account after a few wrong attempts and monitor the Event Viewer (event 4625) to block repeat-offender IPs. Combine this with IP restriction in the firewall to drastically reduce the attack surface.