Page 1 of 1

Is it possible to add iptables logs in /var/log/messages

Posted: 03 Oct 2014, 05:54
by simon templar
Hi all,

I am trying to find a way to add logs (iptables -A INPUT -J LOG) at the end of the default INPUT, so when a rule is not matched, it shows up in /var/log/messages (centos).

Anyone know how to do that ?

Thank you

--

Never mind, I found out and it is working now.

Re: Is it possible to add iptables logs in /var/log/messages

Posted: 05 Oct 2014, 17:04
by Sergio
It will be great if you post how you did it to work, so, if someone else has the same issue your post will help.

Re: Is it possible to add iptables logs in /var/log/messages

Posted: 06 Oct 2014, 14:11
by simon templar
Here you go:


This is in csf configuration file:


Enable logging of dropped connections to blocked ports to syslog, usually
/var/log/messages. This option needs to be enabled to use Port Scan Tracking.

DROP_LOGGING = Default: 1 [0-1]