I've set up a self-contained Moodle system on a Debian LAMP machine.
This works fine... until I try to set up a simple iptables setup to block all incoming traffic except ports 22, 80 and 443.
My iptables config (produced with iptables -L) looks like the attached screenshot.
This successfully allows access to the site (and SSH) but stops the sending of email. If I remove the DROP rule from the INPUT chain, it all starts working again. As far as I can tell, the rules should allow all outgoing traffic. Does sending via a SMTP host require additional INPUT ports to be allowed?
I've tried turning on logging and inspected the blocked traffic, but can't see any obvious reason for the issue. I'll be honest and say that I am fairly new to Linux and iptables, and googling didn't suggest anything helpful.
I'm not overly concerned as the box is NAT'd behind a dedicated firewall, but I was hoping to make it a little more protected by setting up iptables.
Any suggestions? Thanks!