If you’re tired of seeing your /var/log/messages log file full of dropped traffic from APF firewall then we have a solution! We’ll create a separate log file for TCP/UDP OUTPUT and drops which will leave your messages log nice and clean for easy browsing!
Requirements:
APF Firewall 0.9.6 or above. It may work on previous versions but we haven’t tested. If you’re using an older version you should upgrade anyways. Install APF by following our firewall tutorial.
Changing APF’s configuration:
1) Login to your server and su to root shell.
2) Create a new log file just for the TCP/UDP output/drops from APF.
touch /var/log/iptables
Set user permissions to restrict access.
chmod 600 /var/log/iptables
3) Change the syslog so it will tell iptables to use your new log file.
First lets make a backup to be safe:
cp /etc/syslog.conf /etc/syslog.conf.bak
pico /etc/syslog.conf
Requirements:
APF Firewall 0.9.6 or above. It may work on previous versions but we haven’t tested. If you’re using an older version you should upgrade anyways. Install APF by following our firewall tutorial.
Changing APF’s configuration:
1) Login to your server and su to root shell.
2) Create a new log file just for the TCP/UDP output/drops from APF.
touch /var/log/iptables
Set user permissions to restrict access.
chmod 600 /var/log/iptables
3) Change the syslog so it will tell iptables to use your new log file.
First lets make a backup to be safe:
cp /etc/syslog.conf /etc/syslog.conf.bak
pico /etc/syslog.conf