wzzkaifa

CentOS7 的防火墙配置跟曾经版本号有非常大差别,经过大量尝试,最终找到解决这个问题的关键

CentOS7这个版本号的防火墙默认使用的是firewall。与之前的版本号使用iptables不一样。按例如以下方便配置防火墙:

1、关闭防火墙:sudo systemctl stop firewalld.service


2、关闭开机启动:sudo systemctl disable firewalld.service



3、安装iptables防火墙

运行下面命令安装iptables防火墙:sudo yum install iptables-services

?

4、配置iptables防火墙,打开指定port(详细跟曾经版本号一样,网上介绍非常多,这里不多介绍了)


5. 设置iptables防火墙开机启动:sudo systemctl enable iptables

?

OK了。依据配置的port就能够訪问了


分类:

技术点:

相关文章:

  • 2021-12-03
  • 2021-12-03
猜你喜欢
  • 2021-12-03
  • 2021-11-23
  • 2021-09-25
  • 2021-06-27
  • 2021-09-12
相关资源
相似解决方案