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

Post Reply
simon templar
Junior Member
Posts: 19
Joined: 25 Mar 2010, 14:49

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

Post 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.
Sergio
Junior Member
Posts: 1714
Joined: 12 Dec 2006, 14:56

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

Post 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.
simon templar
Junior Member
Posts: 19
Joined: 25 Mar 2010, 14:49

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

Post 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]
Post Reply