CentOS 操作防火墙
1:查看防火状态 systemctl status firewalld 2:暂时关闭防火墙 systemctl stop firewalld 3:永久关闭防火墙 systemctl disable firewalld 4:重启防火墙 systemctl enable firewalld 5:永久关闭后重启 chkconfig iptables on 6:启动防火墙 systemctl start firewalld 7、禁止防火墙开机启动 systemctl disable firewalld.service
开放端口的方法:
方法一:命令行方式
1. 开放端口命令: /sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
2.查看端口是否开放:/sbin/iptables -L -n
方法二:指定IP与端口
1.firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.142.166" port protocol="tcp" port="5432" accept" //给指定IP开放指定端口 2.firewall-cmd --permanent --add-rich-rule="rule family="ipv4" port protocol="tcp" port="9501" accept" //开放指定端口 3.重新载入,使配置生效:systemctl restart firewalld.service 4.查看配置结果:firewall-cmd --list-all 5.删除规则:firewall-cmd --permanent --remove-rich-rule="rule family="ipv4" source address="192.168.142.166" port protocol="tcp" port="11300" accept"
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 7 防火墙相关操作
centos 7 防火墙相关操作 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewal ...
- CentOS下防火墙的基本操作命令
CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status< ...
- CentOS Linux防火墙配置及关闭
CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service iptables status< ...
- CentOS 7防火墙服务FirewallD指南
CentOS 7防火墙服务FirewallD指南 作者:chszs,未经博主同意不得转载.经许可的转载需注明作者和博客主页:http://blog.csdn.net/chszs 防火墙是一种位于内部网 ...
- CentOS中防火墙相关的命令(CentOS7中演示)
CentOS中防火墙程序主要是firewall和iptables,CentOS7中firewall服务已经默认安装好了,而iptables服务需要自己用yum install iptabes-se ...
随机推荐
- WPF: FishEyePanel/FanPanel - 自定义Panel
原文:WPF: FishEyePanel/FanPanel - 自定义Panel 原文来自CodeProject,主要介绍如何创建自定义的Panel,如同Grid和StackPanel. 1) Int ...
- 毫秒数据字符串转换为DateTime
思路:取出毫秒结果,在1970年1月1日 00:00:00的基础上,加上毫秒数 string date = "/Date(1486363695453)/"; date = date ...
- JAVASCRIPT高程笔记-------JSON与AJAX
json对象——语法 简单值:与JS相同语法,可以是字符串,数值,布尔值,null:但不支持undefined 对象: 复杂数据类型,表示一组有序的键值对,键值对的值可以是简单数据,也可以是复杂数据 ...
- JS超链接动态显示图片
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content=&q ...
- 读BeautifulSoup官方文档之html树的打印
prettify()能返回一个格式良好的html的Unicode字符串 : markup = '<a href="http://example.com/">I link ...
- [WPF]获取控件间的相对位置
原文:[WPF]获取控件间的相对位置 [WPF]获取控件间的相对位置 周银辉 我们知道WPF有着比较灵活的布局方式,关于某个控件的坐标,Canv ...
- wcf 代理实例
通过过代理调用 wcf服务 using Microsoft.Extensions.Options; using System; using System.Collections.Generic; us ...
- 元素命名空间中的“MvcBuildViews”无效
原文:元素命名空间中的"MvcBuildViews"无效 症状描述: VS2010打开项目时提示:"元素 命名空间"http://schemas.microso ...
- Windows10 【系统周期表】【系统下载表】【大型软件表】
系统周期表 商用名称 商用英文名 代号 版本 系统版本 上市日期 服务周期 备注 Windows 10 无 Threshold 1 1507 10.0.10240.17443 2015.07.29 2 ...
- SQL Server根据字段查询不出记录
今天写了一条select语句,很奇怪的一件事,我写程序几年了,第一次碰到这个问题,就是数据库里有这个值,你根据这个值查询就是查询不出来这行记录. 所以我想是不是里面有空格,回车什么的,最后果然如此. ...