Debian firewall drop all but except Postfix doesn't work

0

I set up my Linux firewall but it doesn't work to let my email-client connect to the server when the rule "drop everything" is activated. I also changed the order of the rules with no effect. Here is the configuration:

iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:webmin
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:imaps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:submission
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:urd
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:imap2
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ftp
DROP       all  --  anywhere             anywhere

Do you have any idea what's the reason for that?

opa-rudi

Posted 2019-02-17T09:06:41.743

Reputation: 1

Do you have an OUTPUT or FORWARD chain at all? All I see here is an INPUT chain, which wouldn't be able to see a response (since the server can't send) – Canadian Luke – 2019-02-17T17:13:45.563

Yes. I have declared them:

Chain FORWARD (policy ACCEPT)
DROP all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
ACCEPT all -- anywhere anywhere – opa-rudi – 2019-02-17T20:56:48.350

No answers