I setup a firewall in my email server using iptable It was working fine and then later, i split out the firewall by setting up a stand alone firewall using iptable. It works fine, which user can access the mail server. But the mail server down after 2 days, after checking on it, i realized that my mail server becomes open relay! (i checked it at
www.dnsreport.com). And all the time, lot of mails are trying to relay it to my mail server. I then turn off the firewall, and back to my old day setting, which run the firewall in my mail server. Then, the open relay issue solved! I have no idea what goes wrong with my iptable, and here is the different between 2 iptable:
iptable in my mailserver:
iptable -A INPUT -p tcp --dport 143 -j ACCEPT
iptable -A INPUT -p udp --dport 53 -j ACCEPT
iptable -A INPUT -p tcp --dport 53 -j ACCEPT
iptable -A INPUT -p tcp --dport 25 --syn -j ACCEPT
iptable in firewall
iptable -A PREROUTING -t nat -p tcp -d $ext_ip --dport 25 -j DNAT --to $imail_server:25
iptable -A PREROUTING -t nat -p tcp -d $ext_ip --dport 143 -j DNAT --to $mail_server:143
Is that by setting NAT, the mail server will become Open Relay?