Incoming SMTP mail and iptables firewall
Do I need to open port 25 for incoming with something liike:
iptables -A INPUT -p tcp –dport 25 -j ACCEPT
…and if I do are there any risks other than the possibility of receiving some spam?
3 Replies
If its a send only system, then there is no reason why you should open port 25 to the public, better to keep it closed.
In my case, I use CentOS 7, which uses firewalld/systemd, so I am not sure about the iptables command.
@patrick_here:
I have setup postfix on my linode.
Do I need to open port 25 for incoming with something liike:
iptables -A INPUT -p tcp –dport 25 -j ACCEPT
…and if I do are there any risks other than the possibility of receiving some spam?
It could be even worse: You could receive real email (non-spam) that you have to handle.:D
Do you really want to receive email at the yourusername@yourmachine address?
Enabling postfix and allowing port 25 automatically makes such address to be reachable.