Back to articles
Cloud VPS HostingAvertHostNovember 14, 202612 min read

Windows VPS with RDP: How to Connect and Secure Remote Desktop

How to connect to a Windows VPS over RDP from Windows, macOS and Linux, and a step-by-step hardening checklist with PowerShell commands, RDS licensing and DPDP access controls.

A Windows VPS with RDP is a virtual Windows Server that you log in to and use through Remote Desktop, as if it were a PC on your desk. Connecting takes a minute: you need the server's IP address, a username and password, and the Remote Desktop client that is already on your Windows laptop. Keeping it safe takes more work, because an RDP port that is open to the whole internet starts receiving automated login attempts within hours.

This guide covers both parts: how to connect from Windows, macOS and Linux, and a step-by-step hardening checklist with the PowerShell commands to run on Windows Server 2016, 2019 and 2022. It also covers licensing for multiple users, performance for teams working from different Indian cities, and the access controls the DPDP Act expects you to have in place.

How to connect to a Windows VPS over RDP

What you need before you connect

When a Windows VPS is created, the provider gives you three things. Keep them in a password manager, not in an email thread or a WhatsApp chat:

  • Public IP address of the server, for example 203.0.113.25 (an example address used in this guide).
  • Username, usually Administrator on a fresh Windows Server.
  • Password, which you should change at the first login.

RDP listens on TCP port 3389 by default, and also uses UDP 3389 for a smoother session when the network allows it. If the provider or a firewall has moved RDP to another port, you add it after the IP with a colon, for example 203.0.113.25:50389.

Before the first login, check that the port is reachable from your office. On a Windows machine, open PowerShell and run:

Test-NetConnection -ComputerName 203.0.113.25 -Port 3389

If TcpTestSucceeded is True, the server is listening. If it is False, the cause is usually an office firewall that blocks outbound 3389, a wrong IP, or a server that is still being provisioned.

From Windows

  1. Press Win + R, type mstsc and press Enter.
  2. Enter the IP address (and port, if it is not 3389) and click Connect.
  3. Enter the username and password when asked.
  4. The first time, you will see a certificate warning. This is normal for a new server, because Windows uses a self-signed certificate for RDP. Check the certificate fingerprint (see the hardening section) before you tick "Don't ask me again".

You can also start a session straight from the command line, which is handy in scripts or shortcuts:

mstsc /v:203.0.113.25:3389

Click Show Options in the client to save the connection as an .rdp file. Do not save the password in a shared file that other people can open.

From macOS

Install Microsoft's official client from the Mac App Store. It was called Microsoft Remote Desktop and is now named Windows App. Add a PC, enter the IP and port, then add your user account. Under the display settings you can choose whether to use Retina resolution; turning it off makes the session lighter on slow connections.

From Linux

Remmina (GUI) and FreeRDP (command line) both work well. With FreeRDP:

xfreerdp /v:203.0.113.25:3389 /u:Administrator /dynamic-resolution /cert:tofu

On newer distributions the command may be xfreerdp3. The /cert:tofu option trusts the server certificate the first time and warns you if it ever changes.

First login: five things to do immediately

Before you install any application, spend ten minutes on these steps. They close the most common gaps on a new server.

  1. Change the password to a long passphrase (16+ characters). Press Ctrl + Alt + End inside the RDP session and choose "Change a password".
  2. Create a named admin account so that each person logs in as themselves, not as a shared Administrator:
    $pw = Read-Host -AsSecureString "Password"
    New-LocalUser -Name "priya.admin" -Password $pw -FullName "Priya (admin)"
    Add-LocalGroupMember -Group "Administrators" -Member "priya.admin"
  3. Rename the built-in Administrator account after you have logged in once with the new account and confirmed it works. Attackers try "Administrator" first.
    Rename-LocalUser -Name "Administrator" -NewName "srv-local-7k2"
  4. Install all pending updates. On Windows Server 2019 and 2022 you can run sconfig and pick the "Install updates" option, or use Settings, then Windows Update. Reboot when asked.
  5. Set the time zone to India Standard Time so that logs line up with your office clock:
    Set-TimeZone -Id "India Standard Time"

How to secure RDP on a Windows VPS: the hardening checklist

Work through this list in order. Keep your current RDP session open while you change network settings, and make sure you know how to reach the provider's web console in case you lock yourself out.

1. Confirm Network Level Authentication (NLA) is on

NLA makes the user authenticate before a full Windows session is created. This cuts the load from bots and blocks a whole class of pre-login attacks. Check it:

Get-CimInstance -Namespace root/cimv2/TerminalServices -ClassName Win32_TSGeneralSetting -Filter "TerminalName='RDP-tcp'" | Select-Object UserAuthenticationRequired

A value of 1 means NLA is required. If it shows 0, turn it on:

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1

2. Allow RDP only from known IP addresses

This is the single most effective step. If your team connects from an office with a static IP, or through a VPN, allow only those addresses. Create a scoped rule first, then disable the default "allow from anywhere" rules:

New-NetFirewallRule -DisplayName "RDP - office only" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 198.51.100.10,198.51.100.0/28 -Action Allow
New-NetFirewallRule -DisplayName "RDP UDP - office only" -Direction Inbound -Protocol UDP -LocalPort 3389 -RemoteAddress 198.51.100.10,198.51.100.0/28 -Action Allow
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"

Replace the example addresses with your own. Many Indian broadband connections use dynamic IPs that change after a router restart, so a static IP from your ISP or a VPN is usually needed for this to work reliably.

3. Put RDP behind a VPN or gateway when users are spread out

If staff log in from home, from client sites or from mobile data, IP allowlists become hard to maintain. Two common options:

  • A VPN such as WireGuard or OpenVPN. Users connect to the VPN first, and RDP is only reachable on the private VPN address. The RDP port is then closed to the public internet.
  • Remote Desktop Gateway. A Windows Server role that carries RDP inside HTTPS on port 443, with its own access policies. It is part of Remote Desktop Services, so check the licensing section below before you deploy it.

4. Change the default port (noise reduction, not security)

Moving RDP off 3389 does not stop a determined attacker, because port scanners find it anyway. It does reduce the volume of automated attempts and keeps logs cleaner. Microsoft documents the procedure in Change the listening port for Remote Desktop. The safe order is: open the firewall for the new port, change the port, restart the service, and connect on the new port before you close the old session.

New-NetFirewallRule -DisplayName "RDP 50389" -Direction Inbound -Protocol TCP -LocalPort 50389 -RemoteAddress 198.51.100.10 -Action Allow
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value 50389
Restart-Service TermService -Force

Your session will drop when the service restarts. Reconnect with mstsc /v:203.0.113.25:50389.

5. Set an account lockout policy

Lockout slows down password guessing. Check the current policy and then set one:

net accounts
net accounts /lockoutthreshold:5 /lockoutwindow:30 /lockoutduration:30

This locks an account for 30 minutes after five wrong passwords in 30 minutes. Be aware that lockout on a server exposed to the internet can also lock out your real users during an attack, which is another reason to restrict RDP by IP or VPN first.

6. Limit who can log in over RDP

Only members of Administrators and the "Remote Desktop Users" group can connect. Give staff who only use an application a standard account, not an admin one:

Add-LocalGroupMember -Group "Remote Desktop Users" -Member "accounts.ravi"
Get-LocalGroupMember -Group "Remote Desktop Users"

Review this list every month and remove people who have left.

7. Add multi-factor authentication

Windows Server does not ask for a second factor on RDP out of the box. Third-party credential providers (for example Duo for Windows Logon) add an OTP or push approval at login. For a server that holds accounting or customer data, MFA plus an IP restriction is a sensible baseline.

8. Verify the server certificate

Note the RDP certificate thumbprint on the server and compare it with the one your client shows on first connect:

Get-CimInstance -Namespace root/cimv2/TerminalServices -ClassName Win32_TSGeneralSetting -Filter "TerminalName='RDP-tcp'" | Select-Object SSLCertificateSHA1Hash

If the fingerprint ever changes without a reason you know about, stop and investigate before entering a password.

9. Watch the logs: who is trying to log in

Windows records every failed login as Security event 4625, and every successful RDP login as event 4624 with logon type 10. Two quick checks you can run weekly:

# Failed logins in the last 24 hours
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=(Get-Date).AddHours(-24)} | Measure-Object
# Top 10 source IPs of failed logins
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 1000 |
ForEach-Object { $_.Properties[19].Value } |
Group-Object | Sort-Object Count -Descending | Select-Object -First 10 Count, Name

If you see hundreds or thousands of failures from unknown IPs, your RDP port is open to the world and the allowlist or VPN step is overdue. If you see successful type-10 logins at odd hours from IPs you do not recognise, treat it as an incident: change passwords, check the user list, and restore from a known-good backup if needed.

Multiple users on one Windows VPS: RDS licensing

This is the part that surprises many small businesses. Windows Server allows two simultaneous RDP sessions for administration without extra licences. That covers an IT person and a developer managing the server.

If more people need to use the server at the same time, for example five staff working in Tally or another accounting package, you need the Remote Desktop Session Host role and a Remote Desktop Services Client Access Licence (RDS CAL) for each user or device. Microsoft's RDS CAL documentation explains the per-user and per-device models. Without CALs, the role works only for a limited grace period and then stops accepting connections.

When you compare Windows VPS plans, ask the provider in writing:

  • Is the Windows Server licence included in the monthly price?
  • Are RDS CALs included, available as an add-on, or must you bring your own?
  • Is SQL Server licensing separate, if your application needs it?

Also check the application's own licence. Accounting and ERP vendors often have separate terms for use on a remote or cloud server, so confirm with the vendor before you move multiple users.

Making RDP feel fast for teams across India

RDP sends screen updates, so latency between the user and the server matters more than raw bandwidth. A server hosted in India usually gives Indian users a much shorter round trip than one in Europe or the US. Measure it from each office rather than trusting any number on a website:

ping 203.0.113.25
Test-NetConnection -ComputerName 203.0.113.25 -Port 3389 -InformationLevel Detailed

Inside the Remote Desktop client, these settings help on slow or mobile connections:

  • Experience tab: choose "Detect connection quality automatically", or pick a lower setting and turn off desktop background and visual styles.
  • Display: use a smaller resolution and 16-bit colour on poor links.
  • Allow UDP 3389 in the server firewall (scoped to your IPs) so the client can use the faster UDP transport.
  • Size the server properly. If the session feels slow even on a good network, check Task Manager on the server. Windows Server with a few active users needs enough RAM; a server that is constantly paging to disk will feel sluggish no matter where it is hosted.

RDP, data protection and the DPDP Act

If your Windows VPS holds personal data of Indian customers or employees (invoices, ledgers, HR records), the Digital Personal Data Protection Act, 2023 expects you to take reasonable security safeguards against a breach. For a remote desktop server, that translates into practical controls you can show an auditor or a client:

  • Individual accounts for each user, no shared logins, and a record of who has access.
  • Restricted network access (IP allowlist or VPN) and MFA for administrators.
  • Disable drive and clipboard redirection where staff should not copy data to personal laptops. In Group Policy: Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Device and Resource Redirection, then enable "Do not allow drive redirection".
  • Idle session time limits under the Session Time Limits policy, so abandoned sessions do not stay open.
  • Retained logs of logins (events 4624 and 4625) for an agreed period.
  • Tested backups, so a ransomware infection through RDP does not mean lost data. See our cloud backup strategy guide for a simple plan.

Hosting the server in an Indian data centre also keeps the data within the country, which many clients now ask about. Our article on the DPDP Act and hosting data in India covers this in more detail.

How AvertHost can help

AvertHost's Windows cloud VPS runs on KVM virtualization with NVMe storage in our Delhi data centre, a Tier-IV facility, with a 99.9% uptime SLA. You get administrator access over Remote Desktop and can choose a fully licensed Windows Server 2022, 2019 or 2016 image. Plans include network-level DDoS mitigation, 1 Gbps connectivity and 24x7 managed support, with our team monitoring server health and handling security patches and infrastructure updates. Billing is in rupees, hourly or monthly. The access controls in this guide (IP allowlists, NLA, named accounts, MFA) are still worth applying on any server you run.

If you are still deciding whether your workload needs Windows at all, read Windows VPS in India: when you need it first.

Frequently asked questions

Is RDP safe to use on a Windows VPS?

Yes, if you do not leave it open to the whole internet with only a password. Keep NLA on, restrict access to known IPs or a VPN, use strong unique passwords with an account lockout policy, add MFA for admins and install updates monthly.

How many people can use one Windows VPS over RDP at the same time?

Two administrators can be connected at once without extra licences. For more simultaneous users you need the Remote Desktop Session Host role and an RDS CAL per user or per device, and a server sized for that many sessions.

Should I change the RDP port from 3389?

It is worth doing because it cuts automated noise in your logs, but it is not a security control on its own. An IP allowlist or VPN does far more to protect the server.

I locked myself out after changing the firewall. What now?

Use the provider's web-based console (VNC or similar), which does not depend on RDP, to log in and correct the rule. Always test a new RDP rule from a second session before closing the first one.