sudo ufw status numbered 1. 端口规则设置 ufw激活后的默认的策略是允许出去,不允许流量进来,这个可以在ufw的配置文件中看到。在配置文件/etc/default/ufw中可以看到DEFAULT_OUTPUT_POLICY="ACCEPT" ,如果需要端口可以出去,则需要自己配置。 可以通过ufw的命令来直接修改端口规则。 AI检测代码解析 ufw allow port_num...
$ sudo ufw status numbered To Action From -- --- --- [1] 22/tcp ALLOW 192.168.0.104 [2] 21/tcp ALLOW Anywhere [3] 21/tcp ALLOW Anywhere (v6) y $ sudo ufw delete 1 Deleting : Allow from 192.168.0.104 to any port 22 proto tcp Proceed with operation (y|n)? y 方法2 在删除前...