最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Centos7.x 系统关闭系统自带防火墙或调整设置iptables
时间:2022-06-30 17:43:51 编辑:袖梨 来源:一聚教程网
CentOS 7.x系统默认使用的是firewall做防火墙,而且有些端口没有开放,需要临时关闭或进行调整。如使用iptables需重新设置。
1、直接关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、设置 iptables service
yum -y install iptables-services
如果要修改防火墙配置,可以直接编辑配置文件或使用命令进行添加即可。
比如编辑配置文件增加规则:
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
保存退出。
systemctl restart iptables.service #重启生效
systemctl enable iptables.service #设置开机启动
相关文章
- QQ经典版app最新版本下载-QQ经典版app官方正版iOS苹果版下载入口 03-14
- picacg哔咔下载入口-PicACG官方导航 03-14
- 番茄免费全本小说畅读-番茄免费全本小说完结畅读 03-14
- 小米云服务入口在哪-小米云服务官网登录地址详解 03-14
- 漫蛙漫画官方登录入口-漫蛙2漫画app免费下载 03-14
- picacg哔咔注册验证?2026picacg哔咔一键注册指南 03-14