CentOS 7 以上防火墙简单配置
CentOS 7 版本以上默认的防火墙不是iptables,而是firewalle.
因此CentOS 7 以下的 iptables 的配置不能使用。
查看防火墙状态:
systemctl status firewalld
firewall-cmd --state
查看防火墙配置:
firewall-cmd --list-all
列出所有已开放端口:
firewall-cmd --zone=public --list-ports
查询端口 8080 是否开放:
firewall-cmd --query-port=8080/tcp
关闭 | 启动防火墙:
systemctl start firewalld
systemctl stop firewalld
关闭开机启动:
systemctl disable firewalld
开启开机启动:
systemctl enable firewalld
开启 80 端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
移除 80 端口
firewall-cmd --zone=public --remove-port=80/tcp --permanent
上面俩命令需要重新载入配置,才能生效
firewall-cmd --reload
查看开机自启动的服务列表
systemctl list-unit-files|grep enabled
查看监听的端口
netstat -lntp
检查 80 端口被哪个进程占用
netstat -lnp|grep 80
CentOS 7 以上防火墙简单配置的更多相关文章
- CentOS 7.X 防火墙简单配置
CentOS7使用的是Linux Kernel 3.10.0的内核版本,新版的Kernel内核已经有了防火墙netfilter,并且使用效能更高,稳定性更好. 配置防火墙的两种方法: 一.使用xml配 ...
- 华为USG6000V防火墙简单配置案例
如图,PC1是企业内网用户,要通过防火墙NAT方式( 1.1.1.105-1.1.1.106 )访问Internet,Server是企业的FTP服务器,通过静态NAT方式供外网用户访问,对外的地址是1 ...
- Centos 6\7 防火墙入门配置
Centos 6 -- iptables iptables 用法: iptables (选项) (参数) 选项: -t<表>:指定要操纵的表: -A:向规则链中添加条目: -D:从规则链中 ...
- centos 6.5 samba简单配置
1.安装samba yum -y install samba (我的显示已经安装啦!) 2.编辑samba的配置文件 vi /etc/samba/smb.conf 用 testparm查看我配置后的 ...
- Centos 安装dhcp及简单配置
install yum -y install dhcp file /etc/dhcp/dhcpd.conf eg:-------------------------------- ddns-updat ...
- Centos 6.5下一个SNMP简单配置(snmp protocol v3,监控宝)
Centos 6.5下一个SNMP简单配置(snmp protocol v3.监控宝) jom_ch@2014/7/25 1,安装 >yum -y install net-snmp net-sn ...
- CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置
1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB,两条命令都可以 systemctl sta ...
- Centos7 关于防火墙的一些简单配置
近期安装了linux系统Centos7,接触下来发现了与原来的Centos6.5有一些差别,这里主要记录下来我的一些关于Centos7防火墙的了解. 一.firewall简介 CentOS 7中防火墙 ...
- CentOS 7 防火墙端口配置
CentOS 7 防火墙端口配置查看防火墙是否开启systemctl status firewalld 若没有开启则开启systemctl start firewalld 查看所有开启的端口firew ...
随机推荐
- scss-@at-root
@at-root指令可以使一个或多个规则被限定输出在文档的根层级上,而不是被嵌套在其父选择器下. 下面就通过scss代码实例介绍一下它的作用: 没有使用@at-root命令的默认情况. .parent ...
- js中各个排序算法和sort函数的比较
js中要实现数据排序,其实只需要用sort函数就能很好的满足了,但是我今天想知道他和其他排序算法的区别,比如耗时呀等.测了一组数据如下: // ---------- 一些排序算法 Sort = {} ...
- node.js-cancelled because Node.js is unresponsive
今天初学node.js,但是在使用vs code 进行启动调试的时候出现了一个问题 这个报错,一开始我并不知道是什么意思.(而截至我写这个笔记我也还没了解清楚) 大概翻译出来的意思是说 “node.j ...
- Jmeter使用CSV Data Set Config参数化数据不重复的多次循环执行(实现多用户多次抽奖功能)
Jmeter中使用CSV Data Set Config参数化不重复数据执行N遍 要求: 今天要测试上千条数据,且每条数据要求执行多次,(模拟多用户多次抽奖) 1.用户id有175个,且没有任何排序规 ...
- JAVA利用jxl读取Excel内容
JAVA可以利用jxl简单快速的读取文件的内容,但是由于版本限制,只能读取97-03 xls格式的Excel. import java.io.File; import java.io.FileInp ...
- Orchard Core 中文文档翻译(一)关于Orchard Core
原文连接:https://www.cnblogs.com/Qbit/p/9746363.html 转载请注明出处 翻译说明:本系列为直译,按照官方的计划现在这个版本(2018年10月5日)已经接近最终 ...
- March 17 2017 Week 11 Friday
Simplicity is the ultimate sophistication. 简约才是精巧到了极致. Recently I have spent a great number of time ...
- 确定浏览器是否支持某些DOM模块
var supportDOM2Core = document.implementation.hasFeature("Core","2.0"); var supp ...
- 【转载】#470 Define Your Own Custom Attribute
You can use predefined attributes to attach metadata to type members. You can also define a custom a ...
- 转 tcp协议里rst字段讲解
TCP协议的原理来谈谈rst复位攻击 http://russelltao.iteye.com/blog/1405349 几种TCP连接中出现RST的情况 https://blog.csdn.net/c ...