How do I open port 25 (or any other port)?
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?