CentOS 7.0 配置防火墙
停用了
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 配置防火墙的更多相关文章
- CentOS 7.0 firewall防火墙关闭firewall作为防火墙,这里改为iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤: 1.先检查是否安装了: iptables service iptables status 2.安装ip ...
- CentOS 7.0 Firewall防火墙配置
启动停止 获取firewall状态 systemctl status firewalld.service firewall-cmd --state 开启停止防火墙 开机启动:systemctl ena ...
- centOS7.0配置防火墙
之前用的iptables来管理的防火墙,后来发现centOS7.0中已经用firewalld取代iptables了,于是与时俱进,停用了iptables. systemctl stop iptable ...
- centos 7.0 firewall 防火墙常用命令
1.查看防火墙是否在运行 firewall-cmd --state [root@localhost ~]# firewall-cmd --staterunning 2.查看都有哪些端口添加到例外 f ...
- CentOS 6.8 配置防火墙,开放8080端口
打开配置文件 sudo vim /etc/sysconfig/iptables 按下a,进入编辑 加入这一行 -A INPUT -m state --state NEW -m tcp -p tcp - ...
- CentOS 7.0关闭防火墙
.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止fir ...
- centos v7.0配置sftp
需求: 1.建立三个sftp帐号,admin,test1,test22.三个帐号分别在/home/sftp下拥有相应的目录3.test1和test2只能进入自己的目录,admin可以进入三个目录(ch ...
- Linux centos7.0 配置防火墙及开放端口
现在防火墙有两种服务1.service firewalld 2.service iptables 一.就firewalld来说查看开放的端口 netstat -anp 查询防火墙状态 servi ...
- asp.net core 简单部署之FTP配置(CentOS 7.0安装配置Vsftp服务器)
配置过程原文地址:http://www.osyunwei.com/archives/9006.html 坑和结果 正确的跟着这个内容走,是靠谱的. 我自己给自己踩了个坑,请参照文章的朋友注意第七条:七 ...
随机推荐
- Angular5 import interface 报错:XXX is not a module
在项目里定义了一个interface,device.ts.然后在component.ts中要使用这个interface,import之后,VSCode报错:‘xxx/xxx/xxx/device.ts ...
- python列表-定义
一.定义: 1.“列表”是一个值,它包含多个字构成的序列. 2.术语“列表值”指的是列表本身(它作为一个值,可以保存在变量中,或传递给函数,像所有其他值一样),而不是指列表值之内的那些值.列表值看起来 ...
- Hibernate的HQL多表查询
HQL的内连接查询 对于HQL内链接查询,查询的是两张表的数据,这两张表的数据首先是保存在数组之中,然后在将每一个数组保存在List集合之中进行返回 代码片段: @Test // 内连接 public ...
- C# 委托 多线程
C#委托和多线程[转载] 很多时候写windows程序都需要结合多线程,在.net中用如下得代码来创建并启动一个新的线程.public void ThreadProc();Thread thread ...
- CSS文字,文本,背景,盒模型等记录
文字: font-family:" "; /*设置字体*/ font-size:6px;/*设置文字字号*/ color:red;/*设置文字颜色*/ font-weight:bo ...
- vue.js(10)--案例--列表增加与删除
品牌管理案例 (1)bootstrip快速布局 <div class="app"> <div class="panel panel-primary&qu ...
- vim ctags
ctags -I __THROW -I __attribute_pure__ -I __nonnull -I __attribute__ --file-scope=yes --langmap=c:+. ...
- ASE Backend Alpha Sprint Review
[Backend] Alpha Review展示博客 团队成员介绍:仅限于Alpha阶段有贡献的成员. 典型场景描述:描述并说明你们认为的产品面向的典型场景. 团队管理与协作:包括但不限于团队内部如何 ...
- JS 控制子页面刷新父页面
iframe里面的子页,用parent.location.href = parent.location.reload();如果是window.open 打开就用opener.location.relo ...
- 日志远程更新脚本shell
log_update.sh.bak: #!/bin/bash# To Update Logs... #/bin/rsync -avz --delete --exclude=warn.log @172. ...