Centos7(Firewall)防火墙开启常见端口命令
使用云服务器的,一定要注意开启安全组配置的响应端口
Centos7默认安装了firewalld,如果没有安装的话,则需要YUM命令安装;firewalld真的用不习惯,与之前的iptable防火墙区别太大,但毕竟是未来主流讲究慢慢磨合它的设置规则,需要的朋友可以参考下
安装Firewall命令:
yum install firewalld firewalld-config
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
firewall-cmd --zone=public --add-port=21/tcp --permanent
firewall-cmd --zone=public --add-port=53/udp --permanent
Firewall关闭常见端口命令:
firewall-cmd --zone=public --remove-port=80/tcp --permanent
firewall-cmd --zone=public --remove-port=443/tcp --permanent
firewall-cmd --zone=public --remove-port=22/tcp --permanent
firewall-cmd --zone=public --remove-port=21/tcp --permanent
firewall-cmd --zone=public --remove-port=53/udp --permanent
批量添加区间端口
firewall-cmd --zone=public --add-port=4400-4600/udp --permanent
firewall-cmd --zone=public --add-port=4400-4600/tcp --permanent
开启防火墙命令:
systemctl start firewalld.service
重启防火墙命令:
firewall-cmd --reload 或者 service firewalld restart
查看端口列表:
firewall-cmd --permanent --list-port
禁用防火墙
systemctl stop firewalld
设置开机启动
systemctl enable firewalld
停止并禁用开机启动
sytemctl disable firewalld
查看状态
systemctl status firewalld或者 firewall-cmd --state
Centos7(Firewall)防火墙开启常见端口命令的更多相关文章
- Centos7(Firewall)防火墙开启常见端口命令
Centos7默认安装了firewalld,如果没有安装的话,则需要YUM命令安装:firewalld真的用不习惯,与之前的iptable防火墙区别太大,但毕竟是未来主流讲究慢慢磨合它的设置规则: 安 ...
- CentOs7 使用iptables防火墙开启关闭端口
CentOs7 使用iptables防火墙开启关闭端口 # 0x01介绍 iptables命令是Linux上常用的防火墙软件,是netfilter项目的一部分iptables文件设置路径:命令:v ...
- centos开启nginx服务成功,却无法访问。没有开启80端口。centos配置防火墙 开启80端口
Linux配置防火墙 开启80端口 编辑配置文件/etc/sysconfig/iptables [root@weixinht ~]# vim /etc/sysconfig/iptables 1 # F ...
- centos7 firewall 防火墙 命令
为了架设ss在vultr上买了一个日本的vps 用的是centos7的系统 防火墙是 firewall 捣鼓了两天 在这里总结一下. 如果小伙伴也准备在vultr上买vps 在注册是 可以使用这个优 ...
- Centos7防火墙开启3306端口
CentOS7的默认防火墙为firewall,且默认是不打开的. systemctl start firewalld # 启动friewall systemctl status firewalld # ...
- centos7 firewall 防火墙
在部署dubbo-monitor 和dubbo-admin zookeeper时候,外部访问不了部署好的服务,因为端口问题 ,现在把端口操作总结一下 参考: http://www.cnblogs.co ...
- linux 防火墙开启80端口永久保存
经常使用CentOS的朋友,可能会遇到和我一样的问题.开启了防火墙导致80端口无法访问,刚开始学习centos的朋友可以参考下.经常使用CentOS的朋友,可能会遇到和我一样的问题.最近在Linux ...
- CentOs7 使用iptables开启关闭端口
介绍 iptables命令是Linux上常用的防火墙软件,是netfilter项目的一部分 iptables文件设置路径:命令:vim /etc/sysconfig/iptables-config 注 ...
- Centos中iptables和firewall防火墙开启、关闭、查看状态、基本设置等(转)
iptables防火墙 1.基本操作 # 查看防火墙状态 service iptables status # 停止防火墙 service iptables stop # 启动防火墙 servi ...
随机推荐
- Python练习-Property的用法
# 编辑者:闫龙 #要求一:自定义用户信息数据结构,写入文件,然后读出内容,利用eval重新获取数据结构 with open('user.db','w') as write_file:#创建并以写入的 ...
- 使用httpClient调用接口,参数用map封装或者使用JSON参数,并转换返回结果
这里接口用表存起来,标记请求方式,然后接受参数,消息或者请求参数都可以, 然后先是遍历需要调用的接口,封装参数,再分别调用get与post即可,没有微服务还是得自己写 //消息转发-获取参数中对应参数 ...
- KL散度(Kullback–Leibler divergence)
KL散度是度量两个分布之间差异的函数.在各种变分方法中,都有它的身影. 转自:https://zhuanlan.zhihu.com/p/22464760 一维高斯分布的KL散度 多维高斯分布的KL散度 ...
- libevent简介和使用【转】
转自:http://www.open-open.com/lib/view/open1386510630330.html libevent是一个基于事件触发的网络库,memcached底层也是使用lib ...
- nanosleep()
函数原型 #include <time.h> int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); 描述 ...
- docker 错误排查:无法进入容器.
docker 错误排查:无法进入容器. #docker exec -it 3c1d bash rpc error: code = 2 desc = oci runtime error: exec fa ...
- python 元组分组并排序
# -*- coding: utf-8 -*- # @Time : 2018/8/31 14:32 # @Author : cxa # @File : glomtest.py # @Software: ...
- Runtime - Associated Objects (关联对象) 的实现原理
主要围绕3个方面说明runtime-Associated Objects (关联对象) 1. 使用场景 2.如何使用 3.底层实现 3.1 实现原理 3.2 关联对象被存储在什么地方,是不是存放在被 ...
- samba和SELINUX 冲突
在使用Samba进行建立Window与Linux共享时,要是不能访问,出现“您可能没有权限使用网络资源”. setsebool -P samba_enable_home_dirs on setsebo ...
- 虚拟机 windows xp sp3 原版
原版的镜像:http://www.7xdown.com/Download.asp?ID=3319&URL=http://d5.7xdown.com/soft2/&file=Window ...