Remote access without open ports.
Leaving remote desktop (RDP) or SSH access open to the internet is like leaving the office door open to the street. Anyone who looks for it finds it, and tries passwords non-stop until one works. Here is how to tell whether yours is open, how to close it and what to use to keep working from home. It is written for you and for whoever looks after your IT.
It doesn't ask you for any details and doesn't keep anything. It's better to do it with whoever looks after your IT.
Do this, in this order.
-
1. Why it is dangerous
Remote desktop (RDP) and SSH are used to control a computer from afar. If they are open to the internet, anyone can knock on that door, from any country and at any hour. Criminals use programs that scan the internet looking for them and try leaked or very common passwords. If they get in, they are inside your network as if they were an employee: they can copy data and encrypt the computers to demand a ransom. INCIBE lists remote desktop exposed to the internet, with weak passwords and no protection, among the usual ways ransomware gets in. That is why it is best for it not to be visible from outside.
-
2. How to tell whether yours is open
There are four ways to check, from the easiest to the most technical. One: ask whoever looks after your IT whether any computer can be reached from the internet. Two: log in to the office router and look for “port forwarding”, “NAT” or “virtual server” (the name varies by device). If there is a rule pointing to port 3389 (the remote desktop port) or 22 (the SSH port), it is open. Also check whether UPnP is switched on, which allows programs to open ports on their own. Three: from outside your network, for example using your phone's mobile data and not the office wifi, use a port checker to confirm that your office's public address does not respond (check only your own address). Four: look at the computer's logs. If you see many failed login attempts from places you do not know, someone is knocking at the door.
-
3. What AIM SHIELD looks at and what it doesn't
If you have the business panel and have verified your domain, the external surface can check every week the names of your domain that can be seen from the internet on websites (ports 80 and 443): expiring certificates, missing security headers and administration panels in plain view. It is a function that AIM SHIELD turns on and it only looks at verified domains. It does not scan ports, so it cannot tell you whether you have remote desktop or SSH open. For that, use the router and the checks from the previous step. For the score of your website and your email, use the security snapshot.
-
4. Close it in the router
On the router, remove the forwarding rules towards remote desktop and SSH, and switch off UPnP if you do not need it. Do it with whoever looks after your IT, and warn anyone who works from home beforehand, because they will not be able to get in until they have the alternative. Changing the port number, on its own, fixes nothing: it is still an open door. If your computer is on another company's server, ask them to close the access from the internet and to allow entry only from your private network.
-
5. What to use instead
There are three options that do not require leaving ports open. First: a modern VPN. It is an encrypted tunnel between your laptop and the office. You enter the tunnel first, with your username and a second step, and only then do you see the remote desktop, which is no longer on the internet. INCIBE recommends using remote desktop only through a VPN. Second: zero-trust access with two-step verification. Each person reaches only the computers they need, from a device you recognise, without opening anything on the router. Third: a remote support tool that does not open ports. Your computer goes out to find the connection, instead of waiting for it, and whoever is helping you connects by that route. It is suitable for one-off support. Never install it or open it because someone calls you, even if they say they are from your bank or your provider: only with your IT person and when you ask for it yourself. With any of the three, switch on two-step verification and choose one that your IT person knows how to maintain and update. If you really cannot avoid remote desktop, make sure it is only inside the VPN.
-
6. Passwords and lockout after failed attempts
Set long, different passwords for each person, with no generic users such as “admin” and no shared accounts. Switch on two-step verification on all remote access. Set up account lockout after a few failed attempts, so that anyone guessing passwords is shut out. Review who has access and remove anyone who no longer needs it, especially anyone who has left the company. To create and check passwords, see our tools.
-
7. Logs: who gets in and when
Keep a log of every remote connection: who, since when, at what time, and whether it succeeded or failed. Review it from time to time, looking for anything odd, such as logins at night, from another country or many failures in a row. If needed, note down when access is switched on and off, and leave switched off any access you do not use. If you see anything odd, change that person's passwords from another computer and follow the incident steps.
The names of the router's menus change depending on the make and model. If you can't find one, look for the setting by name in the device's manual.
NIS2 and ENS.
For NIS2, this counts as evidence for measure j) of Article 21(2): the use of multi-factor authentication. In the Esquema Nacional de Seguridad (ENS, Spain's National Security Scheme), these measures cover a similar subject. This is only a guide to help you find your bearings: complying with one standard is not complying with the other.
NIS2 measure j): the use of multi-factor authentication or continuous authentication solutions, secured voice, video and text communications and secured emergency communication systems within the entity, where appropriate.
- Authentication mechanism (the organisation's users) (op.acc.6). It asks for two-factor authentication to log in from the internet (reinforcement R8). It says that remote access must be authorised, encrypted, switched off if not used constantly, and must leave logs (reinforcement R9).
- Protection of integrity and authenticity (mp.com.3). It asks for encrypted virtual private networks when communication leaves your own network (reinforcement R1).
- Activity log (op.exp.8). It asks you to record who did what, when and with what result, and to review the logs looking for anything odd (reinforcement R1).
Keep it as evidence in your NIS2 file and in your Continuity plan.
Your list to tick off.
This list is just for you: it is ticked on the screen and is not saved anywhere. If you close the page, it is deleted.
See also: Backups · Security snapshot · Lock down your accounts
Frequently asked questions
Why isn't it enough to change the remote desktop port?
Because it is still an open door to the internet. Programs that look for ways in can try many ports, not only the usual one. Changing it does not protect you. What protects is that it cannot be seen.
Does a VPN make me completely safe?
No. INCIBE warns that no solution is completely safe. A VPN greatly reduces what can be seen from the internet, but it needs good passwords, two-step verification and updates, like anything else.
What is zero-trust access?
A system in which nobody gets into the whole network: each person accesses only the computers they need, after verifying who they are and from which device. There is no need to leave ports open on the router.
And a remote support tool?
It lets someone help you with your computer at a specific moment. The computer goes out to find the connection instead of waiting for it, so it doesn't open ports. Use it with someone you trust, with two-step verification, and close it when you finish. Never install or open it because someone calls you, even if they say they are from your bank or your supplier: it is the door to the fake technician scam. Only with your own IT person and only when you ask for it.
Does your external surface tell me whether I have remote desktop open?
No. It looks at your domain's websites (ports 80 and 443) and does not scan ports. To find out, look at the router, ask your IT person or check your address from outside the office.
Is there any figure for how many attacks get in this way?
We give none, because we have not found an official figure that we can verify. INCIBE does cite remote desktop exposed to the internet among the usual ways ransomware gets in.
Is what I tick on the list stored?
No. The page asks for no details and saves nothing.
Official sources
- INCIBE: anti-ransomware service (opens in a new tab)
- INCIBE: cybersecurity for remote working (guide for business owners) (opens in a new tab)
- National Security Scheme: Royal Decree 311/2022, Annex II (BOE) (opens in a new tab)
- NIS2 Directive, art. 21.2(j) (opens in a new tab)
Consulted on 1 November 2026. Information and advice, not legal advice. This page is only in Spanish.