小编Bry*_*yan的帖子

iptables 规则与 ! 特点

我已经输入了 iptables 规则来记录我们服务器上的特定连接,但它似乎并没有像我想要的那样工作。以下是规则:

1    LOG        tcp  -- !10.51.0.0/16         0.0.0.0/0           state NEW    tcp dpt:8040 LOG flags 0 level 4 prefix `New Connection_8040TCP: '
2    LOG        tcp  -- !192.168.0.0/16       0.0.0.0/0           state NEW tcp dpt:8040 LOG flags 0 level 4 prefix `New Connection_8040TCP: '
Run Code Online (Sandbox Code Playgroud)

iptables 应该只记录不在指定网络中的 IP 连接,但它会记录来自所有 IP 地址的所有连接。

firewall iptables linux-networking

3
推荐指数
2
解决办法
586
查看次数

标签 统计

firewall ×1

iptables ×1

linux-networking ×1