配置firewalld防火墙
题:请按下列要求在 system1 和 system2 上设定防火墙系统:
允许 group8.example.com 域的客户对 system1 和 system2 进行 ssh 访问。
禁止 my133t.org 域的客户对 system1 和 system2 进行 ssh 访问。
备注: my133t.org 是在 172.13.8.0/24 网络
答:
分别在system1 和 system2 上执行
1、允许 group8.example.com 域的客户对 system1 和 system2 进行 ssh 访问。
# 设置systemctl开机自启
systemctl enable firewalld # 放行ssh服务
firewall-cmd --permanent --add-service=ssh
2、禁止 my133t.org 域的客户对 system1 和 system2 进行 ssh 访问。
# 禁用 172.13.8.0/24 网段的ssh服务访问权
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="172.13.8.0/24" service name="ssh" reject'
3、生效
firewall-cmd -reload
更多详情:https://www.cnblogs.com/xiangsikai/p/10735349.html
配置firewalld防火墙的更多相关文章
- 工程师技术(一):启用SELinux保护、自定义用户环境、配置IPv6地址、配置聚合连接、配置firewalld防火墙
一.启用SELinux保护 目标: 本例要求为虚拟机 server0.desktop0 配置SELinux: 确保 SELinux 处于强制启用模式 在每次重新开机后,此设置必须仍然有效 方案: SE ...
- firewalld防火墙详解
众所周知,在RHEL7系统中,firewalld防火墙取代了iptables防火墙.我们都知道iptables的防火墙策略是交由内核层面的netfilter网络过滤器来处理的,而firewalld则是 ...
- firewalld 防火墙配置
1. firewalld-cmd 命令中使用的参数以及作用 --get-default-zone 查询默认的区域名称 --set-default-zone=<区域名称> 设置默认的区域, ...
- centos7 && centos6.5部KVM使用NAT联网并为虚拟机配置firewalld && iptables防火墙端口转发
centos7 && centos6.5 部KVM使用NAT联网并为虚拟机配置firewalld && iptables防火墙端口转发 一.准备工作: 1: 检查kvm ...
- CentOS7使用firewalld防火墙配置端口
安装启用firewalld防火墙 CentOS7默认的防火墙是firewalld 如果没有firewalld防火墙,可以执行yum install firewalld 命令进行安装 firewalld ...
- 第8章 Iptables与Firewalld防火墙
章节简述: 红帽RHEL7系统已经用firewalld服务替代了iptables服务,新的防火墙管理命令firewall-cmd与图形化工具firewall-config. 本章节基于数十个防火墙需求 ...
- CentOS7、REHL7的firewalld防火墙使用简单说明
title: CentOS7.REHL7的firewalld防火墙使用简单说明 categories: Linux tags: - Linux timezone: Asia/Shanghai date ...
- Linux firewalld 防火墙
Linux firewalld 防火墙 简介 RHEL 7 系统中集成了多款防火墙管理工具,其中 firewalld(Dynamic Firewall Manager of Linux system ...
- CentOS 7 打开关闭FirewallD防火墙端口命令
CentOS 7 使用firewalld代替了原来的iptables,使用方法如下: >>>关闭防火墙 systemctl stop firewalld.service ...
随机推荐
- C# 递归省市区三级树结构
省市区结构 实体 /// <summary> /// 行政区 /// </summary> public class AreaEntity { public int Id { ...
- 漏洞预警:Linux内核9年高龄的“脏牛”0day漏洞
这个名叫Dirty COW,也就是脏牛的漏洞,存在Linux内核中已经有长达9年的时间,也就说2007年发布的Linux内核版本中就已经存在此漏洞.Linux kernel团队已经对此进行了修复. 漏 ...
- linux 安装配置nexus以及maven私服应用
---------------------nexus---------------------- 1.编辑nexus脚本, 配置 RUN_AS_USER 参数vi /usr/local/src/nex ...
- python argparse sys.argv
python argparse sys.argv class WeiLearningArgumentParser(argparse.ArgumentParser): def __init__(self ...
- Oracle课程档案,第二天
salary:工资 order by:排序 desc:降序 hire:雇佣 单行函数 一周有七天 一月不一定只有30天 trunc:截取 dual:空表 last:最后 month:月份 round: ...
- linux文件系统变为只读解决
linux控制台显示文件系统变为只读,需输密码或者按ctrl+d结束 输入root密码后执行fsck -y /dev/sda1,fsck -y /dev/sda2和fsck -y /dev/sda3等 ...
- 最全的MonkeyRunner自动化测试从入门到精通(9)
最基本脚本功能开始编写(1)Monkeyrunner和Monkey的区别 1)Monkeyrunner工具在工作站上通过API定义的特定命令和事件控制设备或模拟器(可控) 2)精确控制事件之间的事件 ...
- Python递归函数介绍
一.递归的定义 1.什么是递归:在一个函数里在调用这个函数本身 2.最大递归层数做了一个限制:997,但是也可以自己限制 # 验证 997 def foo(n): print(n) n+=1 foo( ...
- java八大数据类型
基本数据类型以值传递的方式进行传递,String以值传递的方式传递,其他的以地址的方式进行传递 分别是:byte short int long float double char boole ...
- Socket,ServerSocket,WebSocket
一 区别 首先来说下区别吧, Socket和ServerSocket 指传输层网络接口协议,是基于套接字的服务端和客户端实现. 而WebScoket是应用层协议,是客户端-服务器的异步通信方法,用于双 ...