How do I open port 25 (or any other port)?

Linode Staff

How do I open a port on my Linode? I'm currently trying to open port 25.

2 Replies

Allowing traffic to either enter or leave your Linode is done with iptables. If you are unfamiliar with iptables then check out the following guide as it covers iptables in detail and will show you how to open or close specific ports:

https://linode.com/docs/security/firewalls/control-network-traffic-with-iptables/#block-or-allow-traffic-by-port-number-to-create-an-iptables-firewall

The following iptables rule should help you get started:

sudo iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT

You can also use ufw as an alternative to using iptables. UFW is covered here:

https://linode.com/docs/security/firewalls/configure-firewall-with-ufw/

We wanted to update this post with a link about our policy regarding mail server ports for new Linode customers. You can find more information about this in the below Community site post.

I just created my first Linode and I can't send emails. Why?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct