操作防火墙-centos7
centos7对防火墙的操作
systemctl status firewalld # 查看防火墙状态
systemctl stop firewalld.service # 停止防火墙
systemctl start firewalld.service # 启动防火墙
systemctl restart firewalld.service # 重启防火墙
查看所有打开的端口: firewall-cmd --zone=public --list-ports
开放8888端口:
firewall-cmd --zone=public --add-port=8888/tcp --permanent # 开放8888的端口
firewall-cmd --reload # 必须更新防火墙规则
firewall-cmd --zone=public --remove-port=80/tcp --permanent # 关闭80端口的开放
firewall-cmd --reload # 必须更新防火墙规则
查看所有打开的端口: firewall-cmd --zone=public --list-ports
参考:
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed
3.配置firewalld-cmd
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
操作防火墙-centos7的更多相关文章
- CentOS7 开放端口 通过 firewall-cmd 工具来操作防火墙
CentOS7 提供了 firewall-cmd 工具来操作防火墙. firewall-cmd --permanent:表示设置为持久,配置被写入配置文件,跨重启,不会立即生效,重新加载配置后生效.不 ...
- (三) Docker 常用操作与CentOS7 防火墙命令
参考并感谢 Docker 常用命令 https://docs.docker.com/engine/reference/commandline/docker/ Docker 登录docker账户 doc ...
- C#操作防火墙控制电脑某些软件联网
问题: 目前公司软件刚由单机软件更改为联网软件,许多客户反映希望能够有一个功能来控制电脑上某些必用软件,如qq,公司软件联网,而其他不必要的如网页,游戏等软件不允许联网,于是向公司反映希望可以有一个功 ...
- netsh命令操作防火墙
这里的netsh命令操作防火墙主要是在Windows 7及以上版本,以示例说明: 1.防火墙入方向添加一条规则,规则名字:RDP,协议tcp,动作为允许,端口号3389:简而言之,就是允许其他机器远程 ...
- centos7下操作防火墙
引言 最近使用centos7系统比较频繁,在配置服务器的时候,总是遇到能够ping通服务器,但是就是没有办法访问80端口,这个时候我的直觉告诉我,肯定是防火墙的原因,但是使用iptables却怎么都找 ...
- centos7 操作防火墙
原文:https://blog.csdn.net/u012498149/article/details/78772058 1.firewalld的基本使用 启动: systemctl start fi ...
- centos7操作防火墙
1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...
- 防火墙centos7执行 service iptables status报错问题完美解决
在centos7 执行防火墙命令时 service iptables status 报错如下: 解决方案 : 1.systemctl start firewalld.service(开启防火墙) 2. ...
- linux配置防火墙 Centos7下 添加 端口白名单
最近在阿里云服务器centos7上部署项目 要开启8484端口 , CentOS 7默认使用的是firewall作为防火墙 在firewall下开启端口白名单 1.查看下防火墙的状态:systemct ...
随机推荐
- (原)阅读Android-Camera2Video的demo源码和调试心得
转载请注明出处:http://www.cnblogs.com/lihaiping/p/6142512.html 最近因为项目需要使用到camera的功能,所以针对官方的demo源码进行一番阅读,并 ...
- [Tensorflow] Object Detection API - build your training environment
一.前期准备 Prepare protoc Download Protocol Buffers Create folder: protoc and unzip it. unsw@unsw-UX303U ...
- 《Python3网络爬虫开发实战》
推荐:★ ★ ★ ★ ★ 第1章 开发环境配置 第2章 网页基础知识 第3章 网络爬虫基础 第4章 基本库的使用 第5章 解析库的使用 第6章 数据存储 第7章 Ajax数据爬取 第8章 动态渲染页面 ...
- [Java] Apache Ant 构建基础教程
环境:Ubuntu 12.04, java 1.7.0, ant 1.8.2. 前言 Apache Ant 是一个软件自动化构建工具,构建过程包括编译.测试和部署等.它和 Make 工具相似,但由 J ...
- 【CF679D】Bear and Chase 最短路+乱搞
[CF679D]Bear and Chase 题意:近日,鼠国的头号通缉犯,神出鬼没的怪盗——Joker正于摩登市出没!对于名侦探Jack来说,这正是将其捉拿归案的大号时机.形式化地,摩登市可以看成一 ...
- 宝塔使用FTP的问题
我们在使用宝塔FTP面板的时候,会用到FTP工具,但是开的账号在使用 FTP或WinSCP的时候会出现问题,连接不上. 具体解决方式: 参考文档: https://blog.csdn.net/hc11 ...
- callback 模式
回调,是一种机制,同时也是一种设计模式. 我们定义一个函数,让能够回调 import _products from './products.json' const TIMEOUT = 100 cons ...
- spark on yarn 无法提交任务问题
java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig spark任务提交出错. 原因: spark ...
- JavaScript三种弹出框(alert,confirm和prompt)用法举例
http://blog.csdn.net/lucky51222/article/details/45604681 我们在做网页交互的时候往往需要用户在操作之前弹出一个提示消息框来让用户做一些点击才能继 ...
- MySQL的JDBC驱动源码解析
原文: MySQL的JDBC驱动源码解析 大家都知道JDBC是Java访问数据库的一套规范,具体访问数据库的细节有各个数据库厂商自己实现 Java数据库连接(JDBC)由一组用 Java 编程语言 ...