出处
http://www.linuxidc.com/Linux/2012-06/63111.htm
防火墙的基本操作命令:
查询防火墙状态:
[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、其他端口的开放模式就是类似如此开放模式。
- 大小: 39.4 KB
- 大小: 39.4 KB
- 大小: 44.2 KB
- 大小: 46 KB
- 大小: 50.1 KB
分享到:
相关推荐
开启centos防火墙的8080端口.docx
linux CentOS 防火墙学习,firewall命令介绍说明。查看防火墙状态,以及批量开放端口
在centos防火墙内禁止某IP的访问.docx
CentOS 7.0关闭默认防火墙启用iptables防火墙.docx
centos的防火墙配置,以及端口的开放与关闭
CentOS7 打开关闭防火墙与端口 1、firewalld的基本使用 2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。
CentOS_配置防火墙操作实例,防火墙开启,关闭,配置允许端口等
最近将CentOS升级到7之后,发现无法使用iptables控制Linuxs的端口,google之后发现Centos 7使用firewalld代替了原来的iptables。下面这篇文章将给大家介绍如何在Centos 7中使用firewalld快速开发端口,有需要的朋友...
centos 系统防火墙, linux系统防火墙 ,防火墙,防火墙限制端口,端口开放,系统端口开放,防火墙,
防火墙白名单设置方法_iptables_centos6 防火墙白名单设置方法_iptables_centos6 防火墙白名单设置方法_iptables_centos6
防火墙配置及相关说明centos 7中防火墙是一个非常的强大的功能了,但对于centos 7中在防火墙中进行了升级了,下面我们一起来详细的看看关于centos 7中防火墙使用方法。 FirewallD 提供了支持网络/防火墙区域(zone)...
CentOS7 Docker防火墙的简单配置 禁用 firewalld 服务 systemctl disable firewalld systemctl stop firewalld 安装 iptables 防火墙服务 yum install iptables-services 创建 iptables 配置脚本 cat >> /usr/...
Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1、开启端口(以80端口为例) 方法一: /sbin/iptables -I INPUT -p tcp --dport 80 -j...
CentOS 7-防火墙的配置
CentOS7防火墙的启动、停止和禁用配置命令。 包括安装、重启、开启/移除端口并添加规则等相关操作命令。
CentOS 7.0启用iptables防火墙.docx
主要介绍了CentOS 7.0关闭默认防火墙启用iptables防火墙的设置方法,需要的朋友可以参考下
CentOS7使用firewalld打开关闭防火墙与端口 CentOS7使用firewalld打开关闭防火墙与端口
Firewall开启常见端口命令: firewall-cmd –zone=public –add-port=80/tcp –permanent firewall-cmd –zone=public –add-port=443/tcp –permanent firewall-cmd –zone=public –add-port=22/tcp –permanent ...
如何对CentOS防火墙进行配置.docx