/etc/rsyslog.d/iptables.conf со следующим содержанием:
echo ':msg, contains, "Iptables: " -/var/log/iptables.log' > /etc/rsyslog.d/iptables.conf
echo '& ~' >> /etc/rsyslog.d/iptables.conf
service rsyslog restart
iptables -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j LOG --log-prefix "Iptables: Ping detected: "
iptables -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j ACCEPT
cat /etc/rsyslog.d/20-iptables.conf
:msg, contains, "[BLACKLIST" /var/log/blacklist.log
:msg, contains, "[PING" /var/log/ping.log
:msg, contains, "[INTERNAL_ADDR" /var/log/internal_addr.log
:msg, contains, "[SCAN" /var/log/scan.log
${IPT} -A icmp_rules -p icmp --icmp-type 8 -m conntrack --ctstate NEW -j LOG --log-prefix '[PING] : '
if ( $syslogtag == "nginx_access:" ) then {
action(type="omfile" file="/var/log/nginx_access.log")
stop
}
if $programname startswith "nginx_access" then /var/log/nginx_access.log
&~
if $programname startswith "nginx_error" then /var/log/nginx_error.log
&~