Debian / Ubuntu / Kali / Mint / Raspbian / Elemetary OS
Opening ports on a VPS depends on the operating system installed on the server. For example, To open port 25 on a VPS (virtual server) and check it, you will need to follow these steps:
Connect to the VPS via an SSH client (such as PuTTY for Windows or Terminal for macOS and Linux) using the VPS credentials.
Update the packages and install the necessary utilities using the commands:
sudo apt update
sudo apt install ufwOpen port 25 with the command:
sudo ufw allow 25Check the current state of ufw (firewall management utility) with the command:
sudo ufw statusThere are several ways to check port 25.
You can use the Telnet utility by running the command:
telnet localhost 25
If the connection is successful, the port is up and ready to accept connections.You can also use the netstat command to check if the server is listening on port 25. Run the command:
sudo netstat -tuln | grep 25
If the output contains the string "LISTEN", it means that the port is open and the server is ready to accept connections on this port.
To open port 25 (SMTP) on CentOS using firewalld, follow these steps:
Add port 25 to the list of allowed ports:
sudo firewall-cmd --zone=public --add-port=25/tcp --permanent
Restart firewalld for the changes to take effect:
sudo systemctl restart firewalld
Check that port 25 is added to the list of allowed ports:
sudo firewall-cmd --list-ports
After completing these steps, port 25 will be open and available for use on your CentOS server.
You can also check port 25 using online utilities, for example, through the website Open Port Check Tool - Test Port Forwarding on Your Router
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article