CentOS 配置防火墙操作实例(启、停、开、闭port):

注:防火墙的基本操作命令:

查询防火墙状态:

[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<回车>

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

2、编辑/etc/sysconfig/iptables文件。

我们实例中要打开8080port和9990port

用编辑器打开/etc/sysconfig/iptables

4、保存/etc/sysconfig/iptables文件,并在终端运行

[root@localhost ~]# service iptables restart <回车>

5、从新查看防火墙状态

[root@localhost ~]# service iptables status<回车>

6、这时候,server的8080和9990port就能够对外提供服务了。

7、其它port的开放模式就是类似如此开放模式。

CentOS 配置防火墙操作实例(启、停、开、闭port)的更多相关文章

  1. CentOS 配置防火墙操作实例(启、停、开、闭端口):

    CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status< ...

  2. CentOS 配置防火墙操作实例(启、停、开、闭端口)CentOS Linux-FTP/对外开放端口(接口)TomCat相关

    链接地址:http://blog.csdn.net/jemlee2002/article/details/7042991 CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作 ...

  3. CentOS配置防火墙操作实例

    CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status<回 ...

  4. CentOS 配置防火墙操作实例(启、停、开、闭端口)

    防火墙的基本操作命令 查询防火墙状态:[root@localhost ~]# service   iptables status<回车> 停止防火墙:[root@localhost ~]# ...

  5. CentOS 配置防火墙操作实例

    注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status<回车>   停止防火墙: [root@localh ...

  6. Java 调用 Rest api 设置经典 Linux 虚拟机的实例启停

    现象描述 用户可以通过 Rest API 设置经典 Linux 虚拟机实例的启停.在调用该 API 时需要通过 Azure Active Directory(下文简称 AAD) 获取 Token,但是 ...

  7. centos 7 防火墙操作

    1.查看防火墙状态 firewall-cmd --state 2.开启防火墙 systemctl start firewalld.service 3.关闭防火墙 systemctl stop fire ...

  8. centos开启nginx服务成功,却无法访问。没有开启80端口。centos配置防火墙 开启80端口

    Linux配置防火墙 开启80端口 编辑配置文件/etc/sysconfig/iptables [root@weixinht ~]# vim /etc/sysconfig/iptables 1 # F ...

  9. CentOS防火墙操作实例(启动、停止、开、闭端口)

    注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status<回车>   停止防火墙: [root@localh ...

随机推荐

  1. ActiveMQ学习笔记(22)----ActiveMQ的优化和使用建议

    1. 什么时候使用ActiveMQ 1. 异步通信 2. 一对多通信 3. 做个系统的集成,同构,异构 4. 作为RPC的替代 5. 多个应用相互解耦 6. 作为事件驱动架构的幕后支撑 7. 为了提高 ...

  2. schema文件及XML文件的DOM和Sax解析

    schema文件 <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="htt ...

  3. 搭建javawebxiangmu

    https://blog.csdn.net/qq_23994787/article/details/73612870#

  4. LCT笔记

    先存个代码 #include<iostream> #include<cstring> #include<cstdio> #include<cmath> ...

  5. Number(), parseInt(), parseFloat()

    var n="100.11px";console.log(Number(n));//NaNconsole.log(parseInt(n));//100console.log(par ...

  6. CF17E Palisection(manacher)

    题意 给出一个长度为N的字符串S,问S中有多少个回文子串对(i,j)使得i,j在S中的位置相交?(N<=2*106) 题解 #include<iostream> #include&l ...

  7. Redis散杂记

    Redis是一款很火的KV模式的内存数据库,与众不同的特点: 1.数据存储在内存 内存的读取速度仅次于CPU的寄存器.各等级缓存,“英雄”自动敏捷属性,特点就是快.高效.因此不需要类似存储磁盘的数据库 ...

  8. 《Craking the Coding interview》python实现---02

    ###题目:翻转一个字符串###思路:从字符串的最后一位开始,依次取###实现:伪代码.函数.类实现#伪代码: #01string=sNew_s=""for i in range( ...

  9. HTTP——学习笔记(5)

    我们通信的过程中会有哪些风险?: 1.HTTP不会对通信方的身份进行确认 因为HTTP协议中的请求和相应不会对通信方进行确认,就是不管发送或接收信息的人是不是之前的人,都不妨碍信息的发送或接收. 缺点 ...

  10. 2015 Multi-University Training Contest 2 Friends

    Friends Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Sub ...