gpt4 book ai didi

ubuntu - UFW 会阻塞大多数端口,直到禁用并在重启后重新启用

转载 作者:太空宇宙 更新时间:2023-11-03 16:51:42 27 4
gpt4 key购买 nike

我的服务器上运行着 UFW。当我重新启动它时:

$sudo ufw status
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
1194/udp ALLOW Anywhere
5550 ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
8000 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
1194/udp (v6) ALLOW Anywhere (v6)
5550 (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
8000 (v6) ALLOW Anywhere (v6)

但是,当我尝试运行它时,我的端口 8000 和 1194 当前被阻止。

当我运行时:

$sudo ufw disable
$sudo ufw enable

然后端口就打开了。当我之后运行状态时,它与之前粘贴的完全相同。

最佳答案

感谢@Nicholas 的提醒。问题确实是由 iptables-persistent 引起的。但是,简单地删除 iptables-persistent 并不是一个好的解决方案,因为可能有其他规则通过 iptables 应用。因此,如果安装了 iptables-persistent,更好的方法可能是使用 iptables-persistent 来持久化 ufw 规则,即,

sudo ufw reload
sudo netfilter-persistent save

关于ubuntu - UFW 会阻塞大多数端口,直到禁用并在重启后重新启用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41319291/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com