I've seen people use the exclamation mark (!) in multiple examples, but when I try to use it I get an error.

The rule I'm trying:

-A OUTPUT -m owner --gid-owner 1006 -d ! -j DROP

The error:

Bad argument ''

What is the correct syntax for this?


Just as the manpage states:

[!] -d, --destination address[/mask][,...]
       Destination  specification.   See  the  description  of  the  -s
       (source)  flag  for  a  detailed description of the syntax.  The
       flag --dst is an alias for this option.

That makes it

! -d
  • 4
    It has nothing to do with shady blogs, the syntax has changed for iptables and the exclamation mark went before the flag at some point. – Martin Jan 2 '13 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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