Saturday, 15 February 2014

Logrotate Configuation for iptables on Centos

Create a file 'iptables' inside  /etc/logrotate.d/ and give it a little content

[root@test]# vim /etc/logrotate.d/iptables

 /var/log/iptables/iptables.log
{
        weekly
        missingok
        notifempty
        delaycompress
        postrotate
                invoke-rc.d rsyslog reload > /dev/null
        endscript
}


Now restart the rsyslog service using below command

[root@test]# service rsyslog restart
Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
[root@test]#

No comments:

Post a Comment