Skip to content
Advertisement

iptables LOG and DROP in one rule

I am trying to log outgoing connections with iptables. What I want is, drop and accept connection while logging them also. I have found that -j option takes DROP/REJECT/ACCEPT/LOG. But I want to do something like DROP and LOG or ACCEPT and LOG. Is there a way to achieve this ?

Advertisement

Answer

Example:

JavaScript

Log Exampe:

JavaScript

Other options:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement