log everything except few
Hi,
I wanted to log all traffic which are going out from my server , except for some ports...
I tried with the following rule
iptables -I OUTPUT -p tcp --dport ! 80 -j LOG
iptables -I OUTPUT -p tcp --dport ! 25 -j LOG
But it is not working as expected, because, first rule logs packet destined to port 25 and second rule logs packet destined to port 80. I don't want to log packets destined to port 80 and 25. I want to however log rest packest.
How do I do that ?
|