Press "Enter" to skip to content

How to check if port 25 is open in Linux VPS hosting server?

A mail server is extremely important as an infrastructure service. In order to prevent IP from being used to send spam and being blacklisted, many email service providers usually do not open port 25 by default. Therefore, if you want to deploy your own post office service, you must open port 25. Next, I’ll show you how to check if your server can open SMTP port 25.

First, you can use the telnet command to test if the SMTP 25 port is open in your Linux or macOS terminal. For example, if you want to use QQ email to test whether the port is open, you can follow the instructions below:

telnet smtp.qq.com 25

If there is no response for a long time or the prompt times out, the outbound direction of the port being checked is not open. The tips might be similar to the following:

Trying 14.18.175.202…
Trying 183.47.101.192…
Trying 2408:8756:2cf2:19::11…
telnet: Unable to connect to remote host: Network is unreachable

If the prompt is similar to the following:

Trying 203.205.232.7…
Connected to smtp.qq.com.
Escape character is '^]'.
220 newxmesmtplogicsvrszb6-0.qq.com XMail Esmtp QQ Mail Server.

It means that the outbound port 25 of your server has been successfully opened.

In addition to checking whether port 25 is open in the outbound direction, it is also necessary to check the inbound direction. You can use the nc command and listen to the smtp 25 port to view any incoming mail. Here is an example of using the nc command to detect an inbound port:

nc -l 25

Then, enter the IP and port 25 into the port scan tool on this page https://tool.chinaz.com/port to check if the inbound direction is enabled.

How to determine if port 25 of the server is open

If your server doesn’t open SMTP port 25, you can find out the possible reason by following these steps:

  • Check if the server provider closes SMTP port 25 by default. If it is off by default, you may need to apply to the service provider for opening
  • Check if the firewall has closed SMTP port 25

Note that in the mail server, both inbound and outbound SMTP ports 25 are required. If these ports are not open, you cannot receive or send email on this mail server.

If you’re looking for a cheap and stable VPS server, then I recommend Kamatera. I’ve been using it for 3 years. Whether I’m building a WordPress blog or an e-commerce website, it’s very stable. The minimum price is only $4/month, and for new users, you can try it out.

Kamatera servers offer a 30-day free trial, open 25 ports
Leave a Reply

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