ufw可以';t在centos上打开23个端口

ufw可以';t在centos上打开23个端口,centos,telnet,ufw,Centos,Telnet,Ufw,我在VMWare的centos7上部署了telnet,并尝试使用ufw打开23端口 $ sudo ufw allow 23/tcp $ sudo ufw enable 然后我尝试从windows10外部使用telnet连接它 $ telnet my-centos-ip 23 但失败,显示“无法打开到主机的连接,在端口23上:连接失败” 然后我使用防火墙命令打开23端口 $ sudo firewall-cmd --permanent --add-ports=23/tcp $ sudo fire

我在VMWare的centos7上部署了telnet,并尝试使用ufw打开23端口

$ sudo ufw allow 23/tcp
$ sudo ufw enable
然后我尝试从windows10外部使用telnet连接它

$ telnet my-centos-ip 23
但失败,显示“无法打开到主机的连接,在端口23上:连接失败”

然后我使用防火墙命令打开23端口

$ sudo firewall-cmd --permanent --add-ports=23/tcp
$ sudo firewall-cmd --reload
当我使用windows连接它时,它就会工作

$ telnet my-centos-ip 23

我想知道为什么会这样?非常感谢

ufw和防火墙D不能一起工作,所以在我停止防火墙D后,ufw可以正常工作