停用了

iptables。

systemctl stop iptables.service

然后来启动 firewalld 吧

systemctl start firewalld.service

给我报了这个错

Failed to start firewalld.service: Unit firewalld.service is masked.

查了很久没找到解决办法,于是试着输入了下面这行命令,解决了。

systemctl unmask firewalld.service

启动 firewalld.service

systemctl start firewalld.service

把 80 端口添加到防火墙开放端口中

firewall-cmd --permanent --zone=public --add-port=80/tcp

重启一遍 firewalld 服务使其生效

systemctl restart firewalld.service

检查更改是否生效

firewall-cmd --zone=public --query-port=80/tcp

 

CentOS 7.0 配置防火墙的更多相关文章

  1. CentOS 7.0 firewall防火墙关闭firewall作为防火墙,这里改为iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤: 1.先检查是否安装了: iptables service iptables status 2.安装ip ...

  2. CentOS 7.0 Firewall防火墙配置

    启动停止 获取firewall状态 systemctl status firewalld.service firewall-cmd --state 开启停止防火墙 开机启动:systemctl ena ...

  3. centOS7.0配置防火墙

    之前用的iptables来管理的防火墙,后来发现centOS7.0中已经用firewalld取代iptables了,于是与时俱进,停用了iptables. systemctl stop iptable ...

  4. centos 7.0 firewall 防火墙常用命令

    1.查看防火墙是否在运行  firewall-cmd --state [root@localhost ~]# firewall-cmd --staterunning 2.查看都有哪些端口添加到例外 f ...

  5. CentOS 6.8 配置防火墙,开放8080端口

    打开配置文件 sudo vim /etc/sysconfig/iptables 按下a,进入编辑 加入这一行 -A INPUT -m state --state NEW -m tcp -p tcp - ...

  6. CentOS 7.0关闭防火墙

    .关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止fir ...

  7. centos v7.0配置sftp

    需求: 1.建立三个sftp帐号,admin,test1,test22.三个帐号分别在/home/sftp下拥有相应的目录3.test1和test2只能进入自己的目录,admin可以进入三个目录(ch ...

  8. Linux centos7.0 配置防火墙及开放端口

    现在防火墙有两种服务1.service firewalld 2.service iptables 一.就firewalld来说查看开放的端口  netstat  -anp 查询防火墙状态  servi ...

  9. asp.net core 简单部署之FTP配置(CentOS 7.0安装配置Vsftp服务器)

    配置过程原文地址:http://www.osyunwei.com/archives/9006.html 坑和结果 正确的跟着这个内容走,是靠谱的. 我自己给自己踩了个坑,请参照文章的朋友注意第七条:七 ...

随机推荐

  1. win

    /*-------------------------------------------------------------- HelloMsg.c -- Displays "Hello, ...

  2. enWin使用部分中文字库

    在小型嵌入式设备中有时需要简单的人机2交互界面,小型GUI有很多,比较常用的有STenWin,UCGUI,enwin,Embedded Wizard GUI.对与STenWin和enWin区别主要在S ...

  3. 贪心(change)

    http://codeforces.com/gym/100989/problem/H After the data structures exam, students lined up in the ...

  4. 补码一位乘法(Booth算法,C语言实现)

    补码一位乘法 首先了解下什么是补码? 补码概念的理解,需要先从“模”的概念开始. 我们可以把模理解为一个容器的容量.当超出这个 容量时,会自动溢出.如:我们最常见到的时钟,其容量 是 12,过了 12 ...

  5. Python 内置函数raw_input()和input()用法和区别

    我们知道python接受输入的raw_input()和input() ,在python3 输入raw_input() 去掉乐,只要用input() 输入,input 可以接收一个Python表达式作为 ...

  6. Angular ngTemplateOutlet

    虽然我们可以通过使用 ViewContainerRef 将 ElementRef创建的视图插入指定的位置,但是仍然希望有某中快捷的方式帮我们实现. ngTemplateOutlet与ngCompone ...

  7. 解决pip源问题 安装不了第三方库问题

    1. 参考链接: https://www.biaodianfu.com/python-pip.html http://blog.csdn.net/u012450329/article/details/ ...

  8. ElasticSearch 7.x 默认不在支持指定索引类型

    原文:ElasticSearch 7.x 默认不在支持指定索引类型 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://bl ...

  9. Rabbitmq 运维

    Rabbitmq 运维 一.安装: 安装ncurses wget http://ftp.gnu.org/gnu/ncurses/ncurses-6.1.tar.gz tar zxf ncurses-6 ...

  10. 【JAVA】eclipse里代码整个前移或者后移的快捷键

    一整块后移是:选中按 tab 一整块前移是:选中按 shift+tab