remotedesktopoverinternet.com A guide by Firezone

Use Remote Desktop over the internet safely

Remote Desktop works well on a LAN, and it is dangerous on a public IP address. This guide explains why you must never expose port 3389, and it compares the safe ways to reach a Windows PC from any network.

Set up RDP with a Device PoolBook a demo

How RDP reaches a workstation with no open portAn internet scanner tries port 3389 and the firewall refuses it. A support laptop and a workstation each connect outbound to the Firezone control plane. The laptop then sends RDP through an encrypted tunnel that passes the firewall to the workstation.Office or home networkFirezonerefusedoutboundsign intunnelRDPInternet scannertries port 3389Firewallno inbound ruleWorkstationClient, RDP turned onSupport laptopFirezone ClientControl planesign-in and Policy
  1. Port 3389 stays closed

    The firewall has no inbound rule for RDP. A scanner on the internet gets no answer.

  2. The workstation dials out

    The Firezone Client on the workstation makes an outbound connection to the control plane.

  3. The technician signs in

    The control plane checks that a Policy gives the Group of the technician access to this workstation.

  4. RDP goes through the tunnel

    The two Clients set up a WireGuard tunnel through the firewall. Only TCP/3389 passes.

How Remote Desktop works

Remote Desktop is a feature of Windows that shows the screen of one computer on a different computer. It uses the Remote Desktop Protocol, or RDP.

The computer that you control is the host. It listens on TCP port 3389, and it can also use UDP port 3389 for a smoother picture. The computer in your hands runs a Remote Desktop client and connects to that port.

On one LAN, this works with no more setup. To use Remote Desktop over the internet, the client needs a route to port 3389 on a host that usually sits behind a router. The way that you make that route decides how safe the setup is.

Why you must never expose port 3389

The fast fix is a port forward on the router, from a public port to port 3389 on the PC. Do not do this.

  • Scans. Automated scanners test every public IPv4 address for port 3389. A new host gets its first sign-in attempts in a short time.
  • Brute force. Bots try common user names and passwords without a stop. One weak password on one account is enough.
  • Credential attacks. Attackers try passwords from old data breaches. People use the same password in many places, so many attempts succeed.
  • Protocol flaws. RDP has had flaws that let an attacker run code before sign-in. A host on the internet is open to the next flaw on the day of its release.

An attacker who signs in gets a full desktop inside your network. Exposed RDP is one of the most common entry points for ransomware.

A different public port does not fix the problem. Scanners test all ports, and they recognize RDP on any of them.

Safe ways to use RDP over the internet

There are three safe designs. Each one keeps port 3389 off the public internet.

A VPN

The remote user connects to a VPN first and then starts Remote Desktop to the private address of the host. Port 3389 is reachable only from inside the tunnel.

A VPN is safe when you keep the VPN gateway up to date. The usual weakness is scope. Most VPN setups give the user a route to the full network, not only to one PC on one port.

An RD Gateway

Remote Desktop Gateway is a role of Windows Server. The Remote Desktop client connects to the RD Gateway over HTTPS on port 443, and the RD Gateway forwards the session to the host. It gives you RDP without VPN software on the client.

An RD Gateway can limit which users reach which hosts. It is also a public Windows server that you must patch, license, and monitor. Add MFA to it, because it accepts sign-in attempts from the internet.

Zero trust access

With zero trust access, the host or an agent near it makes an outbound connection. The user signs in with an identity provider. A rule gives that user access to that host on that port, and to no other thing.

No port is open to the internet, and a user who can reach one PC cannot reach the PC next to it.

Harden the Remote Desktop host

Do these steps with any of the three designs. They make secure RDP a property of the host, not only of the network.

  • Turn on Network Level Authentication. With Network Level Authentication, the user must authenticate before the host starts a full session. Current versions of Windows turn it on by default.
  • Limit who can sign in. Put only the users who need access in the Remote Desktop Users group. Do not use a shared administrator account.
  • Use strong sign-in. Use long passwords and MFA where you can add it.
  • Set an account lockout policy. A lockout after a small number of failed attempts slows down a brute force attack.
  • Install updates. Keep Windows current on the host and on the client.
  • Check the firewall. Make sure that the router has no port forward to 3389, and that the host has no public IP address.

How Firezone gives RDP access with no open port

Firezone is an open source zero trust access platform built on WireGuard. For Remote Desktop to workstations, it uses a Device Pool. A Device Pool gives one Firezone Client access to other Clients, with no Gateway and no inbound firewall rule.

  1. Install the Firezone Client on the workstation and on the computer of the person who connects. Turn on Remote Desktop on the workstation.
  2. Create a Device Pool. Its members can be a static list, the devices of a Group, your own devices, or all devices.
  3. Add a traffic restriction of TCP/3389. Add UDP/3389 if you want the UDP transport of RDP. All other traffic to the workstation is dropped.
  4. Write a Policy that gives one Group, such as Support, access to the Device Pool.

Each workstation has a stable name such as field-workstation-01.firezone.network. The technician types that name in the Remote Desktop client. The two Clients make outbound connections only and set up a WireGuard tunnel between them. If a direct connection is not possible, the encrypted traffic goes through a Firezone relay.

Firezone controls who can reach port 3389. Windows still authenticates the user, so keep Network Level Authentication and your account rules. The workstation must be online, because Firezone cannot wake a machine that sleeps.

For Windows servers in a data center or a cloud network, use a Gateway and an IP Resource limited to TCP/3389. The servers then need no Client.

Open port 3389, legacy VPN, RD Gateway, and Firezone

The four approaches differ in what the internet can reach and in how narrow the access is.

Open port 3389Legacy VPNRD GatewayFirezone
What the internet can reachThe Remote Desktop hostThe VPN gatewayThe RD Gateway, on port 443Nothing
Safe from scans of port 3389NoYesYesYes
Access limited to RDP on named hostsNoPartialUsually a full subnetYesWith authorization policiesYesTCP/3389 on a Device Pool
Sign-in with your identity providerNoYesMost productsPartialNeeds more setupYesOIDC or an email code
No public server to patchNoThe host is publicNoThe VPN gatewayNoA Windows serverYes
Works with the built-in Remote Desktop clientYesYesYesYes
No more software on the two computersYesPartialA VPN client on one sideYesNoA Firezone Client on each side

The table describes the usual design of each category. A specific product or setup can be different. Read the documentation of the product before you decide.

Common questions

Is it safe to use Remote Desktop over the internet?

Yes, if port 3389 is not open to the internet. Put Remote Desktop behind a VPN, an RD Gateway, or zero trust access, and turn on Network Level Authentication. A direct port forward to the host is not safe.

Is it enough to change the RDP port from 3389?

No. A different port removes some noise from the logs, but scanners test all ports and recognize the protocol. The host is still on the internet, with the same passwords and the same flaws.

Can I use RDP without VPN software?

Yes. An RD Gateway carries RDP over HTTPS, so the client needs no VPN. Zero trust access is a second option. It uses a small client, but it gives access to one host on one port and not to a full network.

Does Network Level Authentication make an open port 3389 safe?

No. Network Level Authentication makes the user authenticate before a full session starts, which reduces the attack surface. Attackers can still try passwords against the host. Use it together with a closed port, not as a replacement.

Do I need a static IP address for Remote Desktop over the internet?

Not with an outbound design. With a Firezone Device Pool, each workstation has a stable name and a stable tunnel address. The public address of the network can change at any time.

Does Firezone sign me in to Windows?

No. Firezone decides which devices can reach the workstation on the network. The workstation still asks for a Windows account and applies its own password and MFA rules.

Close port 3389 and keep Remote Desktop

Firezone is zero trust access built on WireGuard. Install the Client on each side, create a Device Pool for TCP/3389, and write a Policy for your support Group. No port forward and no public server. The Starter plan is free.

See plans and pricingBook a demo