Virtual Network Computing / RFB remote desktop. Display :0 is 5900, :1 is 5901 and so on. macOS Screen Sharing uses it too.
Virtual Network Computing / RFB remote desktop. Display :0 is 5900, :1 is 5901 and so on. macOS Screen Sharing uses it too.
Expose only to trusted sources. Do not expose VNC. Many servers use weak 8-character passwords or none, and scanners regularly find open desktops, including industrial HMIs. Tunnel it over SSH or a VPN.
Registry dates for this port: registered 2006-03.
sudo ss -tlnp 'sport = :5900'sudo lsof -nP -i :5900sudo netstat -tlnp | grep ':5900 'netstat -ano | findstr :5900Get-NetTCPConnection -LocalPort 5900 -State Listen | Select LocalAddress,OwningProcessnc -vz -w 5 HOST 5900Test-NetConnection HOST -Port 5900Replace 203.0.113.10 with the address or network you trust. With ufw, make sure the default incoming policy is deny.
sudo ufw allow from 203.0.113.10 to any port 5900 proto tcpsudo iptables -A INPUT -p tcp --dport 5900 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 5900 -j DROPsudo nft add rule inet filter input ip saddr 203.0.113.10 tcp dport 5900 accept
sudo nft add rule inet filter input tcp dport 5900 dropNew-NetFirewallRule -DisplayName 'TCP 5900 trusted' -Direction Inbound -Protocol TCP -LocalPort 5900 -RemoteAddress 203.0.113.10 -Action AllowAll port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.