我想阻止某个进程连接到某个端口,我尝试使用 ufw,在下一个示例中,我尝试拒绝连接到端口 5100,而 LEOCoin 进程正在监听该端口上的连接
To Action From
-- ------ ----
22/tcp DENY Anywhere
5100/udp DENY Anywhere
5100/tcp DENY Anywhere
22/tcp (v6) DENY Anywhere (v6)
5100/udp (v6) DENY Anywhere (v6)
5100/tcp (v6) DENY Anywhere (v6)
22/tcp ALLOW OUT Anywhere
5100/tcp ALLOW OUT Anywhere
5100/udp DENY OUT Anywhere
8338 ALLOW OUT Anywhere
8338/tcp ALLOW OUT Anywhere
22/tcp (v6) ALLOW OUT Anywhere (v6)
5100/tcp (v6) ALLOW OUT Anywhere (v6)
5100/udp (v6) DENY OUT Anywhere (v6)
8338 (v6) ALLOW OUT Anywhere (v6)
8338/tcp (v6) ALLOW OUT Anywhere (v6)
但我无法阻止该进程连接。我也尝试了 iptable,但没有任何效果