LWN.net Logo

iptables log and drop

iptables log and drop

Posted Mar 22, 2009 8:37 UTC (Sun) by dlang (✭ supporter ✭, #313)
Parent article: Quotes of the week

it's trivial to setup iptables so that log and drop don't require seperate lines for every instance

iptables -A logdrop -j log
iptables -A logdrop -j drop

now everywhere you have a match that you want to both log and drop, just set it to use -j logdrop and it will jump to this short chain that does both.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds