Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have these rules:

-A INPUT -m limit --limit 2/min -j LOG --log-prefix "IPTables Packet Dropped: " --log-level 7

But this logs every DROP that occurs like IPTables Packet Dropped: IN=eth0 OUT= MAC=XXXXXXXX SRC= DST=

I want to log only when DST is

share|improve this question
What have you tried so far? – MadHatter 19 hours ago
@MadHatter i tried what i have above (on question). – Christopher 19 hours ago

1 Answer 1

up vote 1 down vote accepted

You need to insert a rule for the IP you want to log before the catch all rule you have.

iptables -A INPUT -d -m limit --limit 2/min -j LOG --log-prefix "IPTables Packet Dropped: " --log-level 7
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.