Port 25: SMTP

TCP 25 is the port for Simple Mail Transfer Protocol (server-to-server relay). Required on inbound mail servers (MX hosts); otherwise keep it closed. Never run an open relay.

Port 25 at a glance
ServiceSimple Mail Transfer Protocol (server-to-server relay)
ProtocolTCP
Exposure riskMedium: expose with care
Secure alternativeSTARTTLS on the same port; clients should submit on 587 or 465
RangeWell-known (0–1023): binding needs root/admin on Unix

Your public IP is pre-filled. The test connects over TCP from NetKit's server, so it shows what the internet sees.

What port 25 does

Mail servers deliver messages to each other on port 25. Receiving mail servers must accept connections here. Most residential ISPs and cloud providers (AWS, Google Cloud, Azure) block outbound 25 by default to stop spam from compromised machines.

Should port 25 be open?

Required on inbound mail servers (MX hosts); otherwise keep it closed. Never run an open relay. Where you can, use STARTTLS on the same port; clients should submit on 587 or 465 instead.

Find what's listening on port 25

  • Linux: sudo ss -tulpn | grep :25
  • macOS: sudo lsof -nP -i :25
  • Windows: netstat -ano | findstr :25, then look up the PID in Task Manager.

Open or block it in a firewall

  • ufw: sudo ufw allow 25/tcp (or deny)
  • firewalld: sudo firewall-cmd --add-port=25/tcp --permanent && sudo firewall-cmd --reload
  • Windows: New-NetFirewallRule -DisplayName "Port 25" -Direction Inbound -Protocol TCP -LocalPort 25 -Action Allow

Port assignment per the IANA Service Name and Transport Protocol Port Number Registry. Test several ports at once with the port scanner, or any port with the open port checker.

Questions about port 25

What is port 25 used for?
Simple Mail Transfer Protocol (server-to-server relay). Mail servers deliver messages to each other on port 25. Receiving mail servers must accept connections here. Most residential ISPs and cloud providers (AWS, Google Cloud, Azure) block outbound 25 by default to stop spam from compromised machines.
Is port 25 TCP or UDP?
TCP. SMTP uses TCP port 25.
Is it safe to open port 25?
Medium: expose with care. Required on inbound mail servers (MX hosts); otherwise keep it closed. Never run an open relay. Secure alternative: STARTTLS on the same port; clients should submit on 587 or 465.
How do I check if port 25 is open?
Use the checker on this page: it connects to your host on TCP 25 from the internet. Locally, run nc -vz host 25 (macOS/Linux) or Test-NetConnection host -Port 25 (PowerShell). To see what is listening on your own machine, run ss -tulpn | grep :25 (Linux) or netstat -ano | findstr :25 (Windows).

← Port 23 (Telnet) · Port 53 (DNS) →