2021-技能大赛-信息安全管理与评估-DCN 设备总结 (中)-任务二-设备安全配置篇(1)

2021-技能大赛-信息安全管理与评估-DCN 设备总结 (中)-任务二-设备安全配置篇(1)


author:leadlife
time:2022/3/11
知识星球:LeadlifeSec
技术交流 QQ 群:775454947

在我们的 《2021-技能大赛-信息安全管理与评估-DCN 设备总结 (上)-任务一网络设备路由配置》篇,我们已经完成了基本的网络路由配置,其中 VLAN 以及对应的 IP 地址配置 and 一些端口 access trunk 配置,下面让我带领代价进入设备安全配置,一题一题,将题目从原理刨析给各位同学

任务二操作

Telnet Banner

类似题型

RS和WS开启telnet登录功能,配置使用telnet方式登录终端界面前显示如下授权信息:“WARNING!!! Authorised access only, all of your done will be recorded! Disconnected IMMEDIATELY if you are not an authorised user! Otherwise, we retain the right to pursue the legal responsibility”

注意点

  • 关于 Telnet Banner 在比赛中,我们需要注意;

  • DCWS-6028 也就是 AC 和 CS6200 三层交换机的 banner 配置不同;

命令

name code
DCWS-6028 DCWS-6028(config)#banner motd ? LINE 用户字符串, <1-100>字符
DC6200 RS(config)#banner login ? LINE 用户字符串, <1-512>字符

操作

RS
RS(config)#banner login WARNING!!! Authorised access only, all of your done will be recorded! Disconnected IMMEDIATELY if you are not an authorised user! Otherwise, we retain the right to pursue the legal responsibility
WS
WS(config)#banner motd WARNING!!! Authorised access only, all of your done will be recorded! Disconnected IMMEDIATELY if you are not an authorised user! Otherwise, we retain the right to pursue the legal responsibility
%banner string length should be no more than 100

SNMP 网管系统-信息上报

所谓网管系统也就是 SNMP 服务,我们要操作的命令也就是 snmp-server

若有关 MAC 地址绑定操作 MAC 即可

类似题型

总部部署了一套网管系统实现对核心RS进行管理,网管系统IP为:172.16.100.21,读团体值为:ABC2024,版本为V2C, RS Trap信息实时上报网管,当MAC地址发生变化时,也要立即通知网管发生的变化,每35s发送一次;

注意点

  • 开启 snmp-server 服务

  • 开启 snmp-erver traps 功能

  • 需求中有 MAC 地址

命令

code explanation
snmp-server securityip 设置安全IP地址
snmp-server host 设置接受Trap的管理端
snmp-server trap-source 设置SNMP Trap-source IP地址
snmp-server community 设置团体值
snmp-server enable traps mac-notification 开启 MAC 地址变化信息通告网管
mac-address-table violation-trap-interval 35 操作发送trap信息的时间间隔

操作

RS#config terminal 
RS(config)#snmp-server enable 
RS(config)#snmp-server enable traps 
RS(config)#snmp-server securityip 172.16.100.21
RS(config)#snmp-server host 172.16.100.21 v2c ABC2024 
RS(config)#snmp-server trap-source 172.16.100.21
RS(config)#snmp-server community ro ABC2024 
RS(config)#snmp-server enable traps mac-notification 
RS(config)#mac-address-table violation-trap-interval 35

流量往返转发 Netlog 跨网段三层镜像

类似题目

RS出口往返流量发送给NETLOG,由NETLOG对收到的数据进行用户所要求的分析

注意点

我们从题目中可以分析出两个问题;

1:RS 与 NETLOG 并不直连

2:要求出口往返流量均转发至 NETLOG

分析以下,我们可以确定两个要点;

  • RS 必须拥有与 Netlog 网段 IP 对应的 VLAN,这里为 VLAN 51,由 WS 与 Netlog 通信
  • RS 的出口往返流量驻留在 E1/0/1

命令

code exlanation
remote-span 配置远程镜像Vlan
monitor session 1 source 配置远程镜像源端源端口,以将数据收集并好转发
monitor session 1 remote vlan 51 设置远程镜像给谁
monitor session 1 reflector-port interface e1/0/24 将一个不用的端口用于反射 E1/0/1 流量到 vlan 51 网段再基于 WS 转发给 NETLOG

操作

RS(config)#vlan 51
RS(config-vlan51)#remote-span 
RS(config-vlan51)#exit
RS(config)#monitor session 1 source interface ethernet 1/0/1
RS(config)#monitor session 1 remote vlan 51                  
RS(config)#monitor session 1 reflector-port interface e1/0/24

二层隔离-环路检测- DHCP monitor 监听防欺骗-ARP 防欺骗

类似题型

4.	对RS上VLAN40开启以下安全机制:业务内部终端相互二层隔离,启用环路检测,环路检测的时间间隔为10s,发现环路以后关闭该端口,恢复时间为 30分钟; 如私设DHCP服务器关闭该端口;防止ARP欺骗攻击;

注意点

  • 我们需要对指定的安全机制,做发现故障后的动作

  • 需要注意 DHCP snooping 在 E1/0/1 口需要 Trust 以发现恶意的私设 DHCP

命令

code explanation
isolate-port 设置隔离端口属性
loopback-detection 启用环路检测、并设置环路检测时间间隔
loopback-detection specified-vlan 40 绑定 VLAN 40 流量以操作安全机制
loopback-detection control 操作发现环路后的动作
loopback-detection control-recovery timeout 1800 操作关闭端口后的回复时间
ip dhcp snooping binding arp 防止 ARP 欺骗
ip dhcp snooping trust 设置只信任该端口转发的 DHCP 报文,避免恶意 DHCP
ip dhcp snooping binding user-control 启动DHCP Snooping绑定user功能、操作所属 VLNA 40 业务的流量

操作

RS(config)#vlan 40
RS(config-vlan40)#isolate-port apply l2 
RS(config-vlan40)#exit 
RS(config)#loopback-detection interval-time 10 10


RS(config)#int e1/0/4                                                
RS(config-if-ethernet1/0/4)#loopback-detection specified-vlan 40             
RS(config-if-ethernet1/0/4)#loopback-detection control shutdown 
RS(config-if-ethernet1/0/4)#exit
RS(config)#loopback-detection control-recovery timeout 1800

RS(config)#ip dhcp snooping enable 
RS(config)#ip dhcp snooping binding enable 
RS(config)#ip dhcp snooping binding arp
RS(config)#int e1/0/1
RS(config-if-ethernet1/0/1)#ip dhcp snooping trust 
RS(config-if-ethernet1/0/1)#exit               
RS(config)#int e1/0/4
RS(config-if-ethernet1/0/4)#ip dhcp snooping binding user-control 

FW 操作业务流量访问 INTERNET 安全防护-RS VRF VPN

类似题型

配置使总部VLAN10,30,40业务的用户访问INTERNET往返数据流都经过FW进行最严格的安全防护; RS使用相关VPN技术,模拟INTERNET ,VPN名称为INTERNET地址为218.5.18.2;

注意点

  • 我们在操作 FW 的相应匹配流量的地址博时需要对其部署相应的放行策略
  • VRF VPN 基于 Loopback 口转发
  • 由于基于最严格的安全防护,我们需要防止恶意路由配置静态路由
  • 开机攻击防护

命令

code explanation
ip vrf INTERNET 创建 VPN路由/转发实例
ip vrf forwarding INTERNET 转发实例

操作

FW
创建业务地址薄

右上角的用户对象 → 地址薄

请添加图片描述

创建 INTERNET 地址薄

右上角的用户对象 → 地址薄

FW-4

创建相应放行策略

安全 → 策略

  • 题目要求最严格的防护,但没说具体操作,为此我们需要考虑的是:相应业务 VLAN 流向 INTERNET 的流量安全性 避免 INTERNET 可直接访问内网的业务

  • 所以可分析出策略部署应该为 untrust 流向 trust,INTERNET 流向业务 VLAN,那么相反 业务流量向 INTERNET 也必须操作

FW-5

FW-6

启用静态路由以防止恶意动态路由

FW-29

开启攻击防护

该截图并不完整,勾选全部启用即可

FW-30

最后策略截图因如此

FW-7

RS
RS>enable 
RS#
RS#config terminal 
RS(config)#ip vrf INTERNET	
RS(config)#int l1
RS(config-if-loopback1)#ip vrf forwarding INTERNET
RS(config-if-loopback1)#ip address 218.5.18.2 255.255.255.255
RS(config-if-loopback1)#no shutdown 
RS(config-if-loopback1)#end

RIPng 路由 IPv6 协议通信

类似题目

WS与RS之间配置RIPng,是VLAN30与VLAN50可以通过IPv6通信;
IPv6业务地址规划如下,其它IPv6地址自行规划:
业务 IPV6****地址
VLAN30 2001:30::254/64
VLAN50 2001:50::254/64

注意点

  • WS 和 RS 之间在网络配置规划中,没有要求 RS 开启 vlan 30 和 50 ,这里就需要开启然后操作 ipv6 路由;

  • 然后我们想想,以前的 RIP 路由,是不是都需要宣告邻居路由?

  • 那么这里就同时需要将 vlan 100 加入到该 IPv6 的业务规划中与 WS 通信,以维持 vlan 30 vlan 50 之间的 ipv6 业务通信

  • 记住,所有宣告给予 IPv6 协议

操作

RS
RS#config terminal 
RS(config)#ipv6 enable 
RS(config)#router ipv6 rip 

RS(config-router)#exit
RS(config)#int vlan 100
RS(config-if-vlan100)#ipv6 address 2001:100::254/64
RS(config-if-vlan100)#no shutdown  
RS(config-if-vlan100)#ipv6 router rip 
RS(config-if-vlan100)#end
WS
WS(config)#ipv6 enable
WS(config)#router ipv6 rip 

WS(config)#int vlan 30
WS(config-if-vlan30)#ipv6 address 2001:30::254/64
WS(config-if-vlan30)#no shutdown 
WS(config-if-vlan30)#ipv6 router rip
WS(config-if-vlan30)#int vlan 50
WS(config-if-vlan50)#ipv6 address 2001:50::254/64
WS(config-if-vlan50)#no shutdown 
WS(config-if-vlan50)#ipv6 router rip
WS(config-if-vlan50)#int vlan 100
WS(config-if-vlan100)#ipv6 address 2001:100::1/64 
WS(config-if-vlan100)#no shutdown 
WS(config-if-vlan100)#ipv6 router rip

最后 RS 结果应能 ping6 通信这三个地址

RS#ping6 2001:30::254   
Sending 5 56-byte ICMP Echos to 2001:30::254, timeout is 2 seconds.
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

RS#ping6 2001:50::254   
Sending 5 56-byte ICMP Echos to 2001:50::254, timeout is 2 seconds.
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/3/16 ms

RS#ping6 2001:100::1
Sending 5 56-byte ICMP Echos to 2001:100::1, timeout is 2 seconds.
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/10/50 ms

OSPF MD5 安全认证

类似题型

FW、RS、WS之间配置OSPF area 0 开启基于链路的MD5认证,密钥自定义

FW 与 WS 之间连接,在 DCN 设备上需要额外上 vlan,因为设备特定如此,以上我们在前期任务一已经完成不在赘述:

ETH0/1 9.0.0.1/30 (Trust安全域) WS
ETH0/2 10.0.0.1/30 (untrust安全域) WS

注意点

  • 需要注意在 OSPF 协议中声明发送 MD5 消息 key 验证
  • 关于 FW 的 OSPF 操作要注意先声明 router-id

命令

code explanation
ip vrouter trust-vr FW 进入路由配置模式
ip ospf authentication message-digest 操作 OSPF 认证模式为消息
ip ospf message-digest-key 1 md5 admin 操作 OSPF 认证模式为 MD5 Hash admin

操作

FW
FW(config)# ip vrouter trust-vr 
FW(config-vrouter)# router ospf 
FW(config-router)# router-id 1.1.1.1
FW(config-router)# network 9.0.0.1/30 area 0
FW(config-router)# network 10.0.0.1/30 area 0
FW(config-router)# network 11.0.0.1/30 area 0
FW(config-router)# network 12.0.0.1/30 area 0
FW(config-router)# network 218.5.18.1/27 area 0
FW(config-router)# area 0 authentication message-digest
 
FW(config-router)# exit
FW(config-vrouter)# exit  
FW(config)# int aggregate1.9
FW(config-if-agg1.9)# ip ospf authentication message-digest 
FW(config-if-agg1.9)# ip ospf message-digest-key 1 md5 admin
FW(config)# int aggregate1.91
FW(config-if-agg1.91)# ip ospf authentication message-digest 
FW(config-if-agg1.91)# ip ospf message-digest-key 1 md5 admin

这里谈及以下,可直接再 agg1 中配置 OSPF MD5 认证,也可组播 OSPF 的 LSA 认证信息

RS
CS6200-28X-EI>enable 
CS6200-28X-EI#config terminal                  
CS6200-28X-EI(config)#router ospf 1
CS6200-28X-EI(config-router)#network 192.168.100.0/24 area 0
CS6200-28X-EI(config-router)#network 192.168.101.0/24 area 0
CS6200-28X-EI(config-router)#network 172.16.40.1/26 area 0
CS6200-28X-EI(config-router)#area 0 authentication message-digest
CS6200-28X-EI(config-router)#exit
CS6200-28X-EI(config)#int vlan 100
CS6200-28X-EI(config-if-vlan100)#
CS6200-28X-EI(config-if-vlan100)#ip ospf authentication message-digest 
CS6200-28X-EI(config-if-vlan100)#ip ospf message-digest-key 1 md5 admin
CS6200-28X-EI(config-if-vlan100)#exit
WS
WS(config)#router ospf 1
WS(config-router)#network 10.0.0.0/30 area 0
WS(config-router)#network 172.16.100.0/24 area 0
WS(config-router)#network 172.16.10.1/24 area 0
WS(config-router)#network 172.16.20.1/25 area 0
WS(config-router)#network 172.16.30.1/26 area 0
WS(config-router)#network 172.16.50.1/26 area 0
WS(config-router)#network 192.168.100.0/24 area 0
CS6200-28X-EI(config-router)#area 0 authentication message-digest
WS(config-router)#exit    
WS(config)#int vlan 9
WS(config-if-vlan9)#ip ospf authentication message-digest 
WS(config-if-vlan9)#ip ospf message-digest-key 1 md5 admin
WS(config-if-vlan9)#exit
WS(config)#int vlan 100
WS(config-if-vlan100)#ip ospf authentication message-digest 
WS(config-if-vlan100)#ip ospf message-digest-key 1 md5 admin
WS(config-if-vlan100)#exit

操作完成后 WS 应有两个 OSPF 邻居

WS(config)#show ip ospf neighbor 

OSPF process 1:
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   Full/DR         00:00:37    10.0.0.1        Vlan91
192.168.101.1     1   Full/DR         00:00:35    192.168.100.254 Vlan100

限制吞吐量-收发数据大小

类似题型

为了有效减低能耗,要求每天晚上20:00到早上07:00把RS端口指示灯全部关闭;如果RS的11端口的收包速率超过30000则关闭此端口,恢复时间5分钟,并每隔10分钟对端口的速率进行统计;为了更好地提高数据转发的性能,RS交换中的数据包大小指定为1600字节;

注意点

  • 物理要求貌似无法满足(自动关闭指示灯)

  • rate 速率

  • sflow 恢复

  • mtu 指定数据包交换大小

一般数据包如果设置 mtu,若超过阈值则会分块传输,这是 Cisco 的一种特定,DCN 目前未知

命令

code explanation
rate-violation 操作端口收发速率与违背限定速率后执行的动作
rate-violation control shutdown recovery 300 操作违背执行动作
sflow counter-interval sflow 协议统计速率

操作

CS6200-28X-EI(config)#int e1/0/11
CS6200-28X-EI(config-if-ethernet1/0/11)#rate-violation all 30000
CS6200-28X-EI(config-if-ethernet1/0/11)#rate-violation control shutdown recovery 300 
CS6200-28X-EI(config-if-ethernet1/0/11)#sflow counter-interval 120
CS6200-28X-EI(config-if-ethernet1/0/11)#exit
CS6200-28X-EI(config)#mtu 1600

FW 防火墙安全区域管理-manage

类似题型

为实现对防火墙的安全管理,在防火墙FW的Trust安全域开启PING,HTTP,SNMP功能,Untrust安全域开启SSH、HTTPS功能

注意点

  • 关于这题的注意点在与所有的 Trust 区域开启相应功能

  • 所有 Untrust 开启相应功能即可

  • 需要注意的是操作 trust 区域后,我们要对应相应功能进入 Web GUI 界面 HTTP

操作

勾选 trust 过滤掉其他非 trust 区域添加 manage 功能即可

untrust 操作一致,不多赘述

FW-8

FW 复用公网-NAT 转换

类似题型

总部 VLAN 业务用户通过防火墙访问 Internet 时,复用公网IP: 218.5.18.9218.5.18.10

注意点

  • 需要创建公网地址池薄

  • 然后创建地址池:“总部所有业务 VLAN 用户”,将所属 vlan IP 段加入该地址薄

  • 然后创建 NAT-- 采用端口复用的方式:指定 IP,动态 IP 多对一

  • 是业务用户的 VLAN,防火或者 RS 的通信 VLAN 不要加进去 vlan 10 20 30 40 50

操作

添加业务 VLAN 地址池

FW-10

操作源 NAT 配置

FW-11

FW SSL 链接认证

类似题型

远程移动办公用户通过专线方式接入总部网络,在防火墙FW上配置,采用SSL方式实现仅允许对内网VLAN 30的访问,用户名密码均为ABC2021,地址池参见地址表;

注意点

  • 新建本地用户
  • 新建 SSL 向导
  • 接入用户-直接添加就行
  • 然后配置 “隧道接口和地址池”,“地址池”
  • 操作隧道路由配置
  • 添加 vlan 30 用户地址博
  • 然后配置策略,将 Vlan 30 数据指向 SSL tunnel 隧道

操作

操作点:

右上角对象用户 → 本地用户 → 新建本地用户

配置 → 网络 → SSL VPN

新建本地用户

FW-12

操作 SSL VPN

FW-13

FW-14

关于这题正确操作应当是如下,但是我对其做出一种质疑,既然我们已经在 FW 上完成的端口聚合的操作,我们应当在aggregate1 配置为出接口,并非如下,但是如果题目要求一致,可以先取消掉端口聚合再截图

FW-15

FW-16

新建隧道接口

FW-17

建立 SSL VPN 地址池

FW-18

FW-19

操作策略

新建 VLAN 30 相关用户地址池

FW-20

操作 VPN tunnel 策略,允许流量通过

FW-21

FW Qos 流量控制-关键字过滤

类似题型

为了保证带宽的合理使用,通过流量管理功能将引流组应用数据流,上行最小带宽设置为2M,下行最大带宽设置为4M;为净化上网环境,要求在防火墙FW做相关配置,禁止无线用户周一至周五工作时间900-1800的邮件内容中含有“病毒”、“赌博”的内容,且记录日志;

注意点

  • QOS流量设置 流量管理 >> 应用 Qos 配置
  • 无线用户地址池配置
  • 时间表配置
  • 关键字类别配置
  • 过滤配置

操作

Qos 限制通往互联网 INTERNET 流量

FW-22

过滤无线用户的邮件关键字内容

先创建无线用户地址薄

FW-23

创建时间表 对象用户 → 时间表

FW-24

控制 → 网页关键字

FW-25

FW-26

控制 → 邮件过滤

FW-27

猜你喜欢

转载自blog.csdn.net/m0_73351035/article/details/128155711