On a fresh install of Ubuntu 16.04, I have this set in Iptables:
but the port scanner at Mxtoolbox shows this:
I’ve already applied the config, rebooted, reverted the config (shows the same as the screenshot above), but 25 and 587 remain open (I can even telnet into an SMTP session in 587)
What am I missing here?
Bueller?.. Bueller?.. Bueller?
Operating system Ubuntu Linux 16.04.1
Webmin version 1.810
Virtualmin version 5.04
You have the default set to ‘accept’ for incoming connections. Essentially the FW is NOT on at ALL.
Below your rules, Change “set default action” to drop for the incoming section.
Forward and outgoing sections can be left as accept.
To be safe, I like to put a DROP ALL rule at the bottom of the rule list. Just create new rule, click on drop, leave all else blank. Will make a rule that will drop all traffic that has not met any rule above it.
You forgot to allow “if connection state is RELATED, ESTABLISHED”. the server cannot resolve any DNS or send email unless this rule is in place (outgoing chain remains empty)