iptables 中的错误参数“127.0.0.1”

Tom*_*ald 2 logs iptables

-A OUTPUT --destination ! '127.0.0.1' -m state --state NEW -j LOG --log-prefix "new_connection " --log-level 7
Run Code Online (Sandbox Code Playgroud)

给我

Bad argument `127.0.0.1'
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?我使用了这个文档:http : //www.iptables.info/en/iptables-matches.html

Mik*_*kel 6

文档已过时/具有误导性。

The!应该--destination在它之前,而不是之后。尝试:

-A OUTPUT ! --destination 127.0.0.1 -m state --state NEW -j LOG --log-prefix "new_connection " --log-level 7
Run Code Online (Sandbox Code Playgroud)

线索是手册页中的摘要行:

    [!] -d, --destination address[/mask][,...]
Run Code Online (Sandbox Code Playgroud)