What is port 25565 used for?
The default Minecraft Java Edition server port. Bedrock Edition uses UDP 19132.
Should port 25565 be open?
Usually open to the internet. This port is meant to be reachable publicly on servers that offer the service. Forward TCP 25565 on your router to the server’s local IP, then test with your public IP. Enable a whitelist for private servers.
See what is listening on port 25565
# Linux
sudo ss -tlnp | grep ':25565 '
# macOS
sudo lsof -nP -i TCP:25565 -sTCP:LISTEN
# Windows (PowerShell)
Get-NetTCPConnection -LocalPort 25565 -State Listen
Open or block port 25565 in a firewall
# Ubuntu / Debian (ufw)
sudo ufw allow 25565/tcp
sudo ufw deny 25565/tcp
# Windows (PowerShell, as administrator)
New-NetFirewallRule -DisplayName "Port 25565" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action Allow
On cloud servers, also open the port in the provider’s security group or network firewall. At home, a service behind a router needs a port-forwarding rule to the device’s local IP.
Test it from outside
A port can be open on the server but blocked upstream. The Port Checker connects from the internet, so it shows what the world sees. From your own machine, use nc -vz example.com 25565 (macOS/Linux) or Test-NetConnection example.com -Port 25565 (Windows).