Port 25: SMTP

Port 25 (TCP) is used by SMTP. Server-to-server email delivery. Many home and cloud providers block outbound 25 to stop spam.

25Port
TCPProtocol
smtpIANA service name
EmailCategory

Port range

25 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Only open port 25 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 25 in a firewall

ufw         sudo ufw allow 25/tcp
iptables    sudo iptables -A INPUT -p tcp --dport 25 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=25/tcp
Windows     New-NetFirewallRule -DisplayName "SMTP 25" -Direction Inbound -Protocol TCP -LocalPort 25 -Action Allow

Check if port 25 is open

nc -vz example.com 25
Test-NetConnection example.com -Port 25   # PowerShell
sudo ss -tulpn | grep ':25 '   # what is listening locally (Linux)

Other email ports

Frequently asked questions

What is port 25 used for?
SMTP. Server-to-server email delivery. Many home and cloud providers block outbound 25 to stop spam.
Is port 25 TCP or UDP?
TCP.