每次我打开/关闭本地网络中的设备时,都会NetworkManager
自动添加/删除iptables
. 摘录自/var/log/syslog
:
NetworkManager[799]: <info> [1576899905.0615] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlp1s0 --protocol tcp --destination-port 53 --jump ACCEPT
NetworkManager[799]: <info> [1576899905.0639] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlp1s0 --protocol udp --destination-port 53 --jump ACCEPT
...
NetworkManager[799]: <info> [1576899905.0748] Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlp1s0 --out-interface wlp1s0 --jump ACCEPT
NetworkManager[799]: <info> [1576899905.0768] Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface wlp1s0 --jump ACCEPT
NetworkManager[799]: <info> [1576899905.0787] Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface wlp1s0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
...
其中一些规则与我自己的规则冲突,因为它总是将它们添加到列表的开头。我没有设法找到包含这些规则的文件来更改它们。那么如何阻止这些不需要的注射呢?Ubuntu 18.04.3