---
title: "How do I open or block a port with the firewall? | Rdp.Vision"
description: "Add rules in the firewall card on the server page. They are checked top to bottom and the first match wins; anything no rule matches is let in. Never block 3389 on Windows or 22 on Linux."
url: https://rdp.vision/help/firewall-rules
---

[Help center](https://rdp.vision/help)Security

# How do I open or block a port with the firewall?

1 min read|Updated Nov 20, 2026

Short answer

Add rules in the firewall card on the server page. They are checked top to bottom and the first match wins; anything no rule matches is let in. Never block 3389 on Windows or 22 on Linux.

-   **Inbound** rules cover traffic to your server, **outbound** rules traffic from it.
-   Rules are checked **top to bottom, the first match wins**. Without your own rules, everything is let in.
-   **Templates** add common rule sets in one click.

## Allow Remote Desktop only from your IP

1.  01
    
    Allow your IP
    
    Inbound, Allow, TCP, port 3389, from your own IP address.
    
2.  02
    
    Block everyone else
    
    Below it: Inbound, Block, TCP, port 3389, from anywhere. The allow rule has to stay above.
    

Locked out after your IP changed? Use **Reset to default** in the firewall card.

Port

Used for

3389

Remote Desktop on Windows

22

SSH on Linux

25

Outgoing mail: always blocked against spam. Use port 587 or 465.

Windows has its own firewall inside the system too. If a program is unreachable although our firewall allows it, check Windows Defender Firewall on the server.

Did this solve it?

[The full guide

How to Secure a Windows RDP Server: 8 Steps That Matter

4 min read](https://rdp.vision/blog/secure-windows-rdp)

## Related questions

[Why do I see so many failed logins on my RDP?](https://rdp.vision/help/restrict-rdp-to-my-ip)

[Still stuck? Message support](https://t.me/rdpvisionsupport_bot)

[The full guide

How to Secure a Windows RDP Server: 8 Steps That Matter

4 min read](https://rdp.vision/blog/secure-windows-rdp)

Still stuck?

A person checks your server and answers on Telegram.

[Message support](https://t.me/rdpvisionsupport_bot)
