The first line means send all messages that start with “iptables: ” to /var/log/iptables.log. The second line means discard the messages that were matched in the previous line. The second line is of course optional, but it saves the trouble of explicitly filtering out firewall logs from subsequent syslog rules.

Jun 05, 2019 debian - IPTables: How to log and set a specific log file there is a way to log packets in IPTables. first you need to create new chain to logging packets. iptables -N LOGGING then you need to append which packets you are gonna log using following commands. iptables -A INPUT -j LOGGING iptables -A OUTPUT -j LOGGING now you can log the packets to the syslogs using this. iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped: " - … Linux iptables LOG everything - Jesin's Blog

UFW - Community Help Wiki - Ubuntu

Iptables on Linux provides logging functionality, however by default, it will get outputted to the /var/log/messages log file. This can clutter things up, and make it hard to check the logs. If you want to change the file that IPTables logs to, you need to set up your iptables rules to output a log prefix.

How to Enable Logging in Iptables on Linux – TecAdmin

Iptables on Linux provides logging functionality, however by default, it will get outputted to the /var/log/messages log file. This can clutter things up, and make it hard to check the logs. If you want to change the file that IPTables logs to, you need to set up your iptables rules to output a log prefix. Firewall rules disappeared after restarting iptables