阿里云centos7.6自带防火墙就是fireward,我自己又配置了iptables,我刚开始没有弄懂,以为两个是不一样的,导致总是两个都打不开,要是单纯的开firwward也是可以的,但是我更喜欢iptables配置文件来查看相关配置
ftp服务器网页打不开的问题探究,通过反复运行,找到自己问题所在
vim /etc/sysconfig/iptables
都要开
systemctl restart iptables.service
systemctl enable iptables.service
注意下面为错误示范,当时没有理解!
防火墙设置
这里iptables设置就是防火墙参数,没有必要再添加firewall参数了,反而打不开
同时我也添加一些参数,确实打不开,终于搞清不能两个同时配置
下面参数不用加
systemctl restart firewalld.service
firewall-cmd --permanent --list-port
firewall-cmd --zone=public --add-port=22/tcp--permanent
firewall-cmd --zone=public--add-port=21/tcp --permanent
systemctl restart firewalld
firewall-cmd --permanent --list-port
下面是以前打开的端口,我测试了下,果然不能同时测试,打不开的网页就不发了
那么下面就直接运行已有的iptables配置就行
systemctl restart iptables.service
systemctl enable iptables.service
systemctl restart vsftpd.service
打开网页输入你账户,密码登录即可