# SMTP server on VPS and port 25 opening

**URL:** <https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740>\
**Category:** Bare Metal et VPS\
**Tags:** vps\
**Created:** [December 15, 2025, 1:07pm UTC](https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740 "2025-12-15T13:07:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/system/32/5_2.png) [@system](https://community.ovhcloud.com/u/system)\
**Post date:** [December 15, 2025, 1:07pm UTC](https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740/1 "2025-12-15T13:07:00Z")

</div>

I would like to setup an SMTP and IMAP server on my VPS machine. I setup appropriate DNS records, installed Postfix and Dovecot and... it seems that I am unable to reach my machine's port 25 from the outside and therefore I am not able to send mails to my server.  
  
I double checked that port 25 is opened locally (I can invoke telnet localhost 25 from the server) and double checked UFW and iptables rules. I also asked OVH support about blocking the incoming port 25 - they claim that "OVHcloud does not block any ports". However telnet to my machine's 25 port gives me 'Connection timed out' which suggests that the problem is with OVH and not my machine.  
  
Have anyone tried to do the same? BR

---

<div class="post-metadata">

**Author:** ![fritz2cat](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/fritz2cat/32/29833_2.png) [@fritz2cat](https://community.ovhcloud.com/u/fritz2cat)\
**Post date:** [December 15, 2025, 1:55pm UTC](https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740/2 "2025-12-15T13:55:28Z")

</div>

Hello,

OVH does not block any ports. Can you telnet to it, using the public IP address instead of 127.0.0.1 ?

Moreover you complain about _incoming_ connections, so there is a high chance that the culprit is your own firewall.

---

<div class="post-metadata">

**Author:** ![system](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/system/32/5_2.png) [@system](https://community.ovhcloud.com/u/system)\
**Post date:** [December 16, 2025, 8:21am UTC](https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740/3 "2025-12-16T08:21:10Z")

</div>

I can telnet to my machine using the public IP address only from within this machine itself. Using my laptop (or any other machine) I am not able to telnet to it and the error is the connection timeout.  
I learned that this is probably not related related to my firewall as I would have another type of error in such a case which is "Connection refused"

---

<div class="post-metadata">

**Author:** ![fritz2cat](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/fritz2cat/32/29833_2.png) [@fritz2cat](https://community.ovhcloud.com/u/fritz2cat)\
**Post date:** [December 16, 2025, 8:35am UTC](https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740/4 "2025-12-16T08:35:01Z")

</div>

Please check your OVH management portal, section Network \> IP addresses.

Double check if you have not activated the firewall there ?

---

<div class="post-metadata">

**Author:** ![FabL](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/fabl/32/298_2.png) [@FabL](https://community.ovhcloud.com/u/FabL)\
**Post date:** [October 2, 2026, 2:12am UTC](https://community.ovhcloud.com/t/smtp-server-on-vps-and-port-25-opening/740/5 "2026-10-02T02:12:19Z")

</div>

**💡 TL;DR: Fix the "Timeout" on port 25 (SMTP) on an OVHcloud VPS**  
Can't receive emails or reach port 25 from outside on your VPS? **OVHcloud does not block port 25 natively on its VPSes.** If you can connect locally (`telnet localhost 25`) but get a "Connection timed out" error from outside, the issue is almost always a firewall rejecting the packets.

**How to fix this:**

1. **Check the OVHcloud network firewall (Network Firewall):** Go to your client area \> _Network_ \> _Public IP addresses_. Ensure the Edge Network Firewall is either disabled or explicitly configured to allow port 25 over TCP.
2. **Check the operating system firewall (OS):** Make sure your internal firewall (UFW on Ubuntu/Debian, or firewalld/iptables) permits incoming traffic on port 25 (`sudo ufw allow 25/tcp`).

* * *

### Visual troubleshooting guide

**📚 Official guides to help you secure and configure your VPS:**

- [Configure the network firewall (Edge Firewall)](https://docs.ovhcloud.com/fr/dedicated/firewall-network/)
- [How to configure the UFW firewall on a VPS](https://docs.ovhcloud.com/fr/vps/conseils-securisation-vps/#etape-4-configurer-le-pare-feu-ufw)
- [Securing a VPS (General best practices)](https://docs.ovhcloud.com/fr/vps/conseils-securisation-vps/)
