I use this in iptables: (want to allow 25 port only for localhost)
iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT iptables -A INPUT -p tcp --dport 25 -j DROP
It works perfect, but I stopped to receive forwarded mail (it was working OK before).
I have a rule in mail config -> email sent to [email protected] -> forwarded to my gmail
What should I change/add in my iptables to allow this forwarding but port 25 to be closed for public? Maybe add google IP or something else?