Here is what I do to read iptables' log:
first, in the firewall script when i use logging i also use the following directive (or something similar):
LOG --log-prefix "IPTABLES_LOG_xxx " ...
then, i make a file iptables.log.sh, containing the following command:
also, you have to make it executable with:Code:cat /var/log/messages* | grep IPTABLES_LOG | sort | less -S -# 1
chmod u+x iptables.log.sh
And that's it. Now when you execute it you have your firewall's log![]()




Reply With Quote