25/TCPSMTP
Email · Well-known port · OSI layer 7
Mail delivery between mail servers. Inbound access is only needed on a real mail server listed in the MX record.
IANA: officially registered as smtp
You decide which services we may enable for analytics, personalization, and external content.
We use cookies and similar technologies on our website to personalize content, embed external media, and better understand how individual areas are used.
Necessary cookies
These entries support essential functions such as security, stability, and form processing.
Optional sections
Your data may be processed with your consent or on the basis of legitimate interests. In the cookie settings, you can reject or explicitly allow each optional category.
Some services process personal data in third countries. By consenting, you also agree to this transfer. You can find more information in our Privacy Policy.
You can reopen and change your selection at any time. · 1.0.2
Port 25 (TCP) is the traditional SMTP port used to deliver emails between mail servers. The tool shows you the key details and generates suitable firewall commands.
Built by Justin Schuessler
Try the commands on your own VPS, with root access and your own firewall.
Add multiple ports one at a time, up to 12.
Email · Well-known port · OSI layer 7
Mail delivery between mail servers. Inbound access is only needed on a real mail server listed in the MX record.
IANA: officially registered as smtp
Firewall commands
Open port
sudo ufw allow 25/tcpFor Ubuntu and Debian. ufw creates the rule for both IPv4 and IPv6. If ufw is disabled, allow SSH first (sudo ufw allow 22/tcp), then enable it with sudo ufw enable, or you'll lock yourself out.
On a ZAP-Hosting VPS with an active network firewall, you also need to allow the port in the Customer Panel.
Port 25 explained
On port 25, a mail server receives emails from other mail servers and delivers its own emails to them. The DNS MX record identifies the server responsible for a domain. Port 25 is no longer intended for sending email from an email client; use port 587 or port 465 instead. You only need inbound port 25 if you run a mail server, for example with Postfix or Exim.
SMTP was described in RFC 821 in 1982 and is one of the oldest internet protocols. The current specification is RFC 5321. IANA lists port 25 as “smtp”. SMTP originally ran without encryption; today, servers can upgrade the connection to TLS using STARTTLS.
The biggest risk with port 25 is an open relay: a misconfigured server forwards mail from any sender, is quickly abused to send spam, and ends up on blocklists. Only allow relaying for authenticated users and your own networks. Many hosting providers and ISPs block outgoing traffic on port 25 to prevent spam from compromised systems. For your own mail server, you also need correct DNS records such as MX, SPF, DKIM, and DMARC, as well as a suitable reverse DNS record.
More ports
These ports are often part of the same setup. Click one to see its explanation and firewall commands.
View all well-known ports and the complete IANA list
Port list source: IANA Service Name and Transport Protocol Port Number Registry, as of October 22, 2026. iana.org
Discover more
Calculate the network address, broadcast address, subnet mask, and usable host range from a CIDR address, and convert between CIDR and IP ranges (IPv4 and IPv6).
Built by Jakub Martyniak
Interactively learn the 7 layers of the OSI model: click layers, assign terms such as switch, ARP, or port 443, and explore animated encapsulation, a quiz, and a cheat sheet for the IHK exam.
Built by Justin Schuessler
Interactively learn the 4 layers of the TCP/IP model (DoD model) according to RFC 1122, with OSI model mapping, animated encapsulation, a port quiz, and a cheat sheet.
Built by Justin Schuessler
Check whether specific ports are open on an IP or hostname—select a protocol or game instead of scanning all ports at once.
Built by Sebastian Rademacher
FAQ
Quick answers about port 25.
With ufw, sudo ufw allow 25/tcp is enough. With firewalld, run sudo firewall-cmd --permanent --add-port=25/tcp followed by sudo firewall-cmd --reload. Only open the port for incoming traffic if the server actually runs a mail server that accepts mail for your domain.
Many hosting providers and ISPs block outgoing connections on port 25 to prevent spam from compromised computers. For sending email from clients and applications, use port 587 or 465 with authentication instead. To run your own mail server, you usually need to request that your provider unblock the port.
No. Mail clients such as Outlook or Thunderbird send mail through port 587 or 465 using a username and password. Port 25 is intended for mail exchange between mail servers.
An open relay is a mail server that forwards emails from any sender to any recipient. Spammers find these servers quickly, and your IP ends up on blocklists. Test your configuration after every change.
Any more questions?
Contact SupportWith a ZAP-Hosting VPS, you have root access, can set up services and firewall rules yourself, and can immediately see which ports are open.
No setup. No risk. Online in seconds.
Looking for more tools? View all network tools