Code Snippets

How to check if PORT 25 blocked?

Port 25 is the original standard email SMTP port and the oldest, since it first debuted in 1982. Today, the Internet Assigned Numbers Authority (IANA), the group responsible for maintaining the internet addressing scheme, still recognizes port 25 as the standard, default SMTP port. 

SMTP stands for Simple Mail Transfer Protocol—put simply, it’s the process by which emails are sent across the Internet. Computer ports are how individual computers connect to a network and complete electronic processes. An SMTP port is a combination of both: a port designed to send email through a network and to its recipient.

Port 25


SMTP port 25 continues to be used primarily for SMTP relaying. SMTP relaying is the transmission of email from email server to email server.

In most cases, modern SMTP email clients (Microsoft Outlook, Mail, Thunderbird, etc.) shouldn’t use this port. It is traditionally blocked by residential ISPs and Cloud Hosting Providers, to curb the amount of spam that is relayed from compromised computers or servers. Unless you’re specifically managing a mail server, you should have no traffic traversing this port on your computer or server. 

Нow to check if port 25 is be blocked by your VPS provider.

The easiest way to test that theory is to check Port 25 if it is Open or Not. For that we will use Telnet.

Telnet follows a user command Transmission Control Protocol/Internet Protocol (TCP/IP) networking protocol for creating remote sessions.

First, you will need to install Telnet on your VPS.

To install Telnet on CentOS / RHEL use the following command:

yum install telnet

On Ubuntu / Debian you can use the following command:

apt install telnet

After the installation of Telnet is finished, run the following command to check port 25:

telnet smtp

* This command, is the same in all versions of Linux.

After entering the above command, if port 25 is opened you will see this in your output:

If your port 25 is closed, you will see:

When Port 25 is closed, the Telnet remains in “Trying Mode” and does not communicate with the Google server.

So, obviously if your Port 25 blocked, next you need to contact you VPS provider and understand why. There are many companies that have port 25 blocked by default and you will have to request to open it.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button