centos 7.0 firewall 防火墙常用命令
1.查看防火墙是否在运行 firewall-cmd --state
[root@localhost ~]# firewall-cmd --state
running
2.查看都有哪些端口添加到例外 firewall-cmd --permanent --list-port
permanent 永久配置
[root@localhost ~]# firewall-cmd --permanent --list-port
80/tcp
3.添加端口到例外 firewall-cmd --permanent --zone=public --add-port=48489/tcp
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=48489/tcp
success
查看永久例外的端口列表
[root@localhost ~]# firewall-cmd --permanent --list-port
80/tcp 48489/tcp
4.删除端口例外 firewall-cmd --permanent --remove-port=80/tcp
[root@localhost ~]# firewall-cmd --permanent --remove-port=80/tcp
success
查看端口列表
[root@localhost ~]# firewall-cmd --permanent --list-port
48489/tcp
5. 停止firewald防火墙 systemctl stop firewalld
[root@localhost /]# systemctl stop firewalld
[root@localhost /]# firewall-cmd --state
not running
6.启动firewalld防火墙
systemctl start firewalld
在关闭防火墙后 仍然不能访问nginx,需要查看是否开启nginx进程
ps -ef | grep nginx 以下结果就是系统自带的nginx 说明并不没有开启服务
[root@localhost etc]# ps -ef | grep nginx
root 2340 2188 0 04:41 pts/0 00:00:00 grep --color=auto nginx
centos 7.0 firewall 防火墙常用命令的更多相关文章
- 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 ...
- Centos下磁盘管理的常用命令记录(如查找大文件)
Centos下磁盘管理的常用命令记录 查看系统磁盘空间占用,使用命令: df -h 结果: 查看磁盘inode使用情况,如果inode用完了,磁盘就没法写入新的内容了: df -i 结果: 如何查找磁 ...
- linux下防火墙开启某个端口号及防火墙常用命令使用
linux防火墙常用命令 1.永久性生效,重启后不会复原 开启:chkconfigiptables on 关闭:chkconfigiptables off 2.即时生效,重启后复原 重启防火墙 方式一 ...
- firewall防火墙常用操作
# firewall防火墙常用操作 - 启动```systemctl start firewalld```- 停止```systemctl stop firewalld```- 重启```system ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙
官方文档介绍地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gui ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙--转载
最近在linux(这里用到的是Centos7的64位版本)安装nginx时,在开放80端口时用iptables设置端口 和重启服务发现提示未找到文件,在网络上收集查找后发现在Centos7中iptab ...
- Centos7防火墙常用命令
有些人安装的linux的系统默认防火墙不是iptables,而是firewall,那就得使用以下方式关闭防火墙了. >>>关闭防火墙 systemctl stop firewalld ...
- Fortigate防火墙常用命令
命令结构 #config 对策略,对象等进行配置 #get 查看相关对象的参数 #show 查看配置文件 #diagnose 诊断命令 #execute 常用的工具命令,如ping treacer ...
随机推荐
- 初识hive
由facebook 开源用以帮用户解决海量数据etl,构建于hadoop的 数据仓库. 使用hql作为查询接口 使用hdfs作为底层存储 使用mr作为执行层 1.为什么使用hive? 1 ...
- DBMS_NETWORK_ACL_ADMIN
DBMS_NETWORK_ACL_ADMIN学习 转载 http://blog.sina.com.cn/s/blog_4f925fc30102e2se.html 标签: oracle it 分类: 数 ...
- MySQL高可用方案
高可用架构对于互联网服务基本是标配,无论是应用服务还是数据库服务都需要做到高可用.虽然互联网服务号称7*24小时不间断服务,但多多少少有一些时候服务不可用,比如某些时候网页打不开,百度不能搜索或者无法 ...
- 如何升级PowerShell
背景: 开发的PowerShell 脚本需要使用Invoke-RestMethod命令,发现在老的服务器上不支持这一命令,经过查询得知由于PS版本的问题.涉及到了PS的升级,需要介绍下PowerShe ...
- Linux下ps命令详解 Linux下ps命令的详细使用方法
http://www.jb51.net/LINUXjishu/56578.html Linux下的ps命令比较常用 Linux下ps命令详解Linux上进程有5种状态:1. 运行(正在运行或在运行队列 ...
- 错误: “WebForm_DoPostBackWithOptions”未定义
无论是ASP.NET WebForm 还是 ASP.NET MVC项目,在本地程序测试没问题,但是部署在IIS上访问就会出现 错误: “WebForm_DoPostBackWithOptions”未 ...
- kd树和knn算法的c语言实现
基于kd树的knn的实现原理可以参考文末的链接,都是一些好文章. 这里参考了别人的代码.用c语言写的包括kd树的构建与查找k近邻的程序. code: #include<stdio.h> # ...
- pcl曲面网格模型的三种显示方式
pcl网格模型有三种可选的显示模式,分别是面片模式(surface)显示,线框图模式(wireframe)显示,点模式(point)显示.默认为面片模式进行显示.设置函数分别为: void pcl:: ...
- [LeetCode] Jump Game 跳跃游戏
Given an array of non-negative integers, you are initially positioned at the first index of the arra ...
- 滚来滚去,滚来滚去...Scroller完全解析
API: 1 mScroller.getCurrX() //获取mScroller当前水平滚动的位置 2 mScroller.getCurrY() //获取mScroller当前竖直滚动的位置 3 m ...