栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

CentOS7或7以上,无iptable解决方法

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

CentOS7或7以上,无iptable解决方法

CentOS7没有iptables,默认使用firewalld ;
iptables默认无法被systemctl控制,需要安装iptables-services、iptables-devel这两个依赖包。

禁用/停止自带的firewalld服务 如下
停止firewalld服务
[root@localhost ~]# systemctl stop firewalld
禁用firewalld服务
[root@localhost ~]# systemctl mask firewalld

查看iptables现有规则
[root@localhost ~]# iptables -L -n
先允许所有,不然有可能会出问题
[root@localhost ~]# iptables -P INPUT ACCEPT

安装iptables-services、iptables-devel

启用并启动iptables

查看状态 systemctl status iptables.service

查看iptables配置文件 vim /etc/sysconfig/iptables

添加一个80端口

一定要看的干货
链接: 除了接私单,写博客,做教程之外,程序员如何利用自身技术,实现躺着赚钱!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/344017.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号