CentOS 配置防火墙操作实例
注:防火墙的基本操作命令:
查询防火墙状态:
[root@localhost ~]# service iptables status<回车>
停止防火墙:
[root@localhost ~]# service iptables stop <回车>
启动防火墙:
[root@localhost ~]# service iptables start <回车>
重启防火墙:
[root@localhost ~]# service iptables restart <回车>
永久关闭防火墙:
[root@localhost ~]# chkconfig iptables off<回车>
永久关闭后启用:
[root@localhost ~]# chkconfig iptables on<回车>
1、查看防火墙状态
[root@localhost ~]# service iptables status<回车>

2、编辑/etc/sysconfig/iptables文件。我们实例中要打开8080端口和9990端口
用编辑器打开/etc/sysconfig/iptables

3、依葫芦画瓢,我们添加8080端口和9990端口

4、保存/etc/sysconfig/iptables文件,并在终端执行
[root@localhost ~]# service iptables restart <回车>

5、从新查看防火墙状态
[root@localhost ~]# service iptables status<回车>

6、这时候,服务器的8080和9990端口就可以对外提供服务了。
7、其他端口的开放模式就是类似如此开放模式。
摘自:http://blog.csdn.net/jemlee2002/article/details/7042991
CentOS 配置防火墙操作实例的更多相关文章
- CentOS 配置防火墙操作实例(启、停、开、闭端口):
CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status< ...
- CentOS 配置防火墙操作实例(启、停、开、闭端口)CentOS Linux-FTP/对外开放端口(接口)TomCat相关
链接地址:http://blog.csdn.net/jemlee2002/article/details/7042991 CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作 ...
- CentOS配置防火墙操作实例
CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status<回 ...
- CentOS 配置防火墙操作实例(启、停、开、闭port)
CentOS 配置防火墙操作实例(启.停.开.闭port): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status& ...
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
防火墙的基本操作命令 查询防火墙状态:[root@localhost ~]# service iptables status<回车> 停止防火墙:[root@localhost ~]# ...
- centos开启nginx服务成功,却无法访问。没有开启80端口。centos配置防火墙 开启80端口
Linux配置防火墙 开启80端口 编辑配置文件/etc/sysconfig/iptables [root@weixinht ~]# vim /etc/sysconfig/iptables 1 # F ...
- CentOS防火墙操作实例(启动、停止、开、闭端口)
注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status<回车> 停止防火墙: [root@localh ...
- CentOS配置防火墙
昨天帮朋友配置CentOSserver,一開始为了方便測试直接把防火墙关了.之后便须要配置好防火墙,网上找了几个防火墙规则都有错误,后来发现是博主发帖不认真,有太多字符错误,以下是我整理的亲測可用的防 ...
- CentOS firewalld 防火墙操作
Centos 7 开启端口CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的 CentOS 7 采用了 firewalld 防火墙 如要查询 ...
随机推荐
- 20190317 A
今天是学长wsy的题,我理论会100+50+30=180,实际100+20+10=130,充分体现我的菜 最近日常模拟赛挂分50到60,很危险,这2天一定要调整好... Upd:T2我认为50的划分数 ...
- Docker Registry私有仓库搭建
部署registry 准备一个registry.mydocker.com 的证书 对私有registry取名registry.mydocker.com 目录规划 仓库数据目录:/data/docker ...
- js 获取链接参数的方法
方法1: /** * 获取链接上的参数 * string 需要获取的参数名称 */ var getHref = function(string){ var reg = new RegExp(" ...
- golang从文件按行读取并输出
package main import ( "fmt" "os" "bufio" "io" "time&quo ...
- CSc 352 (Spring 2019): Assignment
CSc 352 (Spring 2019): Assignment 11Due Date: 11:59PM Wed, May 1The purpose of this assignment is to ...
- kubernets controller 和 CRD 具体组件分析
(dlv) b k8s.io/sample-controller/pkg/client/informers/externalversions.(*sharedInformerFactory).Info ...
- 算法(第四版)C# 习题题解——2.3
写在前面 整个项目都托管在了 Github 上:https://github.com/ikesnowy/Algorithms-4th-Edition-in-Csharp 查找更为方便的版本见:http ...
- 《Java程序设计》课程实验要求
目录 <Java程序设计>课程实验要求 注册实验楼账号 实验一 Java开发环境的熟悉 实验二<Java面向对象程序设计> 实验三 <敏捷开发与XP实践> 实验四 ...
- SpringBoot服务器部署
注释本地tomcat jar包 jdk版本必须1.8以上 tomcat版本必须8以上 配置tomcat server.xml文件 Swagger 配置
- 转载redis持久化的几种方式
redis持久化的几种方式 1.前言 Redis是一种高级key-value数据库.它跟memcached类似,不过数据可以持久化,而且支持的数据类型很丰富.有字符串,链表,集 合和有序集合.支持在服 ...