I am having a problem finding out which rule of my ipchains firewall is not letting a some email go through. I just set up sendmail and a pop3 server and that all works fine when my firewall is down. When it is up though, emails are not going through.
I have tried to make a “logging firewall”. In other words, I would like to log EVERYTHING for a brief period of time, then examine the logs to see what rule denies or rejects what I am looking for. I thought it would be something like this:
ipchains -F
ipchains -P input DENY
ipchains -P output REJECT
ipchains -P forward REJECT
ipchains -A input -s xxx.xxx.xxx.xxx -j REJECT -l
ipchains -A input -d xxx.xxx.xxx.xxx -j REJECT -l
ipchains -A output -s xxx.xxx.xxx.xxx -j REJECT -l
ipchains -A output -d xxx.xxx.xxx.xxx -j REJECT -l
ipchains -A forward -s xxx.xxx.xxx.xxx -j REJECT -l
ipchains -A forward -d xxx.xxx.xxx.xxx -j REJECT -l
This does not appear to be working though. Is there a better way to do this?? Thanks for the help.