VNC usually uses TCP port 5900. Add the VNC display number to that port. So display :0 uses 5900, display :1 uses 5901, and so on.
TLDR: VNC commonly runs on 5900, while Microsoft RDP uses 3389. If you connect to a VNC server called officepc:1, you are probably using port 5901. For a small office with 20 remote users, RDP often feels faster on Windows, while VNC is handy when you need simple screen sharing across mixed systems like Linux, macOS, and Windows.
Contents
- 1 What port does VNC use?
- 2 Why does VNC have display numbers?
- 3 What port does RDP use?
- 4 VNC vs RDP: the quick difference
- 5 When should you use VNC?
- 6 When should you use RDP?
- 7 Security: please do not expose these ports raw
- 8 How to connect to a VNC port
- 9 Firewall rules for VNC and RDP
- 10 Which one is better?
- 11 Final takeaway
What port does VNC use?
VNC stands for Virtual Network Computing. It lets you see and control another computer over a network. Think of it as a long pair of invisible arms. You move your mouse. The faraway computer moves too.
The default VNC port is:
- TCP 5900 for display :0
- TCP 5901 for display :1
- TCP 5902 for display :2
The pattern is simple. Start with 5900. Then add the display number.
So if someone says, “Connect to my server on VNC display 2,” your brain can say, “Cool. That is probably port 5902.” Nice. For once, networking does not feel like a locked filing cabinet in a basement.
Why does VNC have display numbers?
VNC came from a world where one machine could run more than one graphical session. Each session gets a display number. Each display maps to a port.
Here is the simple version:
- :0 means the first display.
- :1 means the second display.
- :2 means the third display.
So the port list becomes easy:
- 5900 + 0 = 5900
- 5900 + 1 = 5901
- 5900 + 2 = 5902
Some web-based VNC tools also use ports like 5800 or 6080. That depends on the software. For example, some noVNC setups use a web browser and a proxy. In that case, the browser may connect through a different port, while the VNC service sits behind it.
What port does RDP use?
RDP stands for Remote Desktop Protocol. It is Microsoft’s remote desktop system. Its default port is:
- TCP 3389
- UDP 3389
TCP does the reliable talking. UDP can help with smoother performance. Together, they can make remote Windows sessions feel quicker.
If VNC is like watching and controlling a shared screen, RDP is more like opening a proper remote work session. It can redirect printers. It can pass audio. It can resize better. It often handles Windows apps with less fuss.
VNC vs RDP: the quick difference
VNC and RDP both let you control a computer from somewhere else. But they do it in different ways.
| Feature | VNC | RDP |
|---|---|---|
| Default port | 5900 and up | 3389 |
| Best fit | Screen sharing | Windows remote work |
| Speed | Can feel slower | Often faster on Windows |
| Platform support | Great across systems | Best with Windows |
| Security by default | Varies a lot | Usually stronger |
VNC sends screen updates. It watches pixels. Then it sends changes to your viewer. That makes it simple and flexible.
RDP sends higher-level desktop data. It does not just throw pixels at you all day. That is one reason it often feels faster. It can also feel more “native” when you use Windows.
Image not found in postmetaWhen should you use VNC?
Use VNC when you want a simple view of the actual screen. It is great for support. It is also useful for Linux servers with a desktop installed.
Pick VNC when:
- You need to see exactly what the person sees.
- You support Linux, macOS, and Windows machines.
- You want a basic remote control tool.
- You are working inside a private network.
- You use a secure tunnel, like SSH or VPN.
VNC is also common for Raspberry Pi projects. Many people use it to manage small devices without plugging in a monitor. That feels neat. Until you forget the password. Then it feels less neat.
When should you use RDP?
Use RDP when the remote machine is Windows and users need a smooth desktop. RDP is made for this job.
Pick RDP when:
- You manage Windows PCs or Windows servers.
- You want better performance over slower links.
- You need clipboard sharing.
- You need printer redirection.
- You want cleaner multi-monitor support.
RDP is common in offices. A user can connect from home to a work PC or to a remote server. The session often feels sharp. Not always perfect, but usually better than basic VNC.
Security: please do not expose these ports raw
Do not leave VNC port 5900 open to the internet. Also do not leave RDP port 3389 open without proper protection. Bots scan these ports all day. They do not get tired. They do not need coffee.
It drives me crazy that some routers still make port forwarding look harmless. “Just open 5900,” they say. Great. Now the whole internet can knock on your remote desktop door.
Safer options include:
- Use a VPN before connecting.
- Use SSH tunneling for VNC.
- Use strong passwords and account lockouts.
- Limit access by IP address where possible.
- Enable Network Level Authentication for RDP.
- Change default ports only as a small extra step, not your main defense.
Changing 5900 to another port may reduce noise. It is not real protection by itself. A scanner can still find it. Security through “please do not notice me” is not a plan.
How to connect to a VNC port
Most VNC viewers let you enter a host and port. Sometimes they use display format instead.
Examples:
- 192.168.1.50:5900 connects to port 5900.
- 192.168.1.50:1 may mean display 1, which maps to 5901.
- server.example.com:5902 connects to port 5902.
This can be annoying. One VNC app treats :1 as display 1. Another treats it like port 1 unless you type the full port. Expect to waste time on this at least once. Maybe twice if it is Monday.
Firewall rules for VNC and RDP
If a connection fails, check the firewall. The service may be running. The network may still block it.
For VNC, allow the correct TCP port:
- 5900 for display 0
- 5901 for display 1
- 5902 for display 2
For RDP, allow:
- TCP 3389
- UDP 3389, if supported
Only allow these from trusted networks. A home IP. A VPN subnet. A management network. Not “anywhere.” Anywhere is how trouble starts.
Which one is better?
RDP is usually better for Windows remote desktop work. It feels smoother. It has more business features. It handles user sessions well.
VNC is better for simple screen sharing and mixed systems. It is easy to understand. It works in many places. It shows the real screen, which is perfect for support.
Here is the plain choice:
- Use VNC for cross-platform screen control.
- Use RDP for Windows productivity.
- Use a VPN for remote access over the internet.
- Do not expose 5900 or 3389 without protection.
Final takeaway
VNC uses TCP 5900 by default. Each extra display adds one to the port number. RDP uses 3389 for TCP and often UDP.
If you want simple remote screen control, VNC is a solid pick. If you want a polished Windows remote desktop, RDP usually wins. Either way, lock it down. Remote desktop is useful, but an open port with a weak password is just an invitation with bad lighting.
