How to log iptables packet drops

Add following two lines to /etc/sysconfig/iptables

-A INPUT -m limit –limit 15/minute -j LOG –log-level 7 –log-prefix “Dropped by firewall: “

-A OUTPUT -m limit –limit 15/minute -j LOG –log-level 7 –log-prefix “Dropped by firewall: “

Restart iptables

In /etc/syslog.conf, add

kern.=debug     /var/log/firewall

Restart syslogger – /sbin/service syslog restart

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.