Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidcorbin/0f4f5a8eef15de8320bf839066d5002b to your computer and use it in GitHub Desktop.
Save davidcorbin/0f4f5a8eef15de8320bf839066d5002b to your computer and use it in GitHub Desktop.
IPTables log dropped (logs go to /var/logs/kern.log)
sudo iptables -N LOGGING
sudo iptables -A INPUT -j LOGGING
sudo iptables -A OUTPUT -j LOGGING
sudo iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped: " --log-level 4
sudo iptables -A LOGGING -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment