cisco交换机安全配置设定命令(2)

cisco交换机安全配置设定命令(2),第1张

MAC地址绑定端口安全设定

switch(config-if)#switchport port-security /启用端口安全

switch(config-if)#switchport port-security maximum number /默认每个接口最大的值为1

switch(config-if)#switchport port-security violation

protect|restrict|shutdown /启用安全违规行为

protect:当接口学习到设定数量的MAC后,后来的MAC信息将直接丢弃,且不产生通知

restrict: 当接口学习到设定数量的MAC后,后来的MAC信息将直接丢弃并发送snmp trap,syslog信息。

shutdown: 当接口学习到设定数量的MAC后,后来的MAC信息将不再解析并直接关闭该端口,除非手动shut,no

shut或通过errdisable recovery cause 原因 来进行恢复

switch(config-if)#switchport port-security mac-address sticky

/启用mac自动学习功能,无需手动进行绑定

端口错误检测和自动恢复设定

switch(config)#errdisable detect cause all /启用所有类型错误检测

switch(config)#errdisable recovery cause all /启用所有类型错误发生后在30s后自动恢复

switch(config)#errdisable recovery interval 30 /自动恢复间隔时间为30s

四、三层交换机常用路由协议安全配置

1、RIP协议

建议不采用RIPV1,使用支持md5认证的RIPV2版本

switch(config)#key chain chain_name /设置密钥链名

switch(config-key-chain)#key 1 /设置密钥号

switch(config-key-chain)#key-string pass_string /设置密钥字符串

switch(config)#router rip

switch(config-router)#version 2 /启用RIP-V2

switch(config-router)#network xxxx

switch(config-router)# passive-interface x/x

/启用passive-interface禁用一些不需要接收和转发路由信息的端口(只是禁止转发路由信息,并没有禁止接收)

switch(config)#interface x/x

switch(config-if)#ip rip authentication mode md5 /指定认证方式为md5

switch(config-if)#ip rip authentication key-chain chain_name /调用定义的密钥链名

注意:启用RIPV2协议的互连路由接口其密钥Key ID和Key string必须相同才可通过认证!

2、EIGRP协议

eigrp仅支持md5认证

switch(config)#key chain chain_name /设置密钥链名

switch(config-key-chain)#key 1 /设置密钥号

switch(config-key-chain)#key-string pass_string /设置密钥字符串

switch(config)#router eigrp as-num /设置eigrp自治系统号,在本地有效

switch(config-router)#network xxxx

switch(config-router)#no auto-summary /关闭自动汇总功能

switch(config)#interface x/x

switch(config-if)#ip authentication mode eigrp 100 md5 /指定eigrp

100区域的认证方式为md5

switch(config-if)#ip authentication key-chain eigrp 100 chain_name

/调用定义的密钥链名

注意:启用EIGRP md5认证的互连路由接口其密钥Key ID和Key string必须相同才可通过认证!

3、OSPF协议

由于明文认证在更改密码时会出现断流且容易比抓包破解,推荐采用md5认证;另OSPF在接口上的认证和区域内的认证是不同的,只要两端的一样就可以通信!

switch(config)#router ospf 100 /设置本地有效的标识符100

switch(config-router)#area area_id authentication message-digest

/在区域内启用md5认证

switch(config-if)#ip ospf authentication message-digest /在接口下启用md5认证

switch(config-if)#ip ospf message-digest-key id md5 pass_string

/在接口下设置md5密钥id及密钥字符串,两端启用OSPF路由协议的端口必须相同

4、HSRP/VRRP协议

switch(config)#key chain chain_name /设置密钥链名

switch(config-key-chain)#key 1 /设置密钥号

switch(config-key-chain)#key-string pass_string /设置密钥字符串

switch(config-if)#standby group_num authentication md5 key-chain chain_name

/在启用hsrp协议的接口下启用md5认证并调用设定的密钥链名

switch(config-if)#vrrp group_num authentication md5 key-chain chain_name

/在启用vrrp协议的接口下启用md5认证并调用设定的密钥链名

五、交换机日志收集审计安全配置

trunk接口日志事件设定

switch(config)#int gi x/x/x

switch(config-if)#sw mode trunk

switch(config-if)#sw trunk encaps dot1q

switch(config-if)#logging event trunk-status

switch(config-if)#logging event link-status

switch(config-if)#logging event spanning-tree

switch(config-if)#logging event bundle-status

switch(config-if)#logging event status

access接口日志世界设定

switch(config)#int gi x/x/x

switch(config-if)#sw mode access

switch(config-if)#sw access vlan xx

switch(config-if)#logging event link-status

switch(config-if)#logging event spanning-tree

switch(config-if)#logging event bundle-status

switch(config-if)#logging event status

日志收集分析设定

switch(config)#logging on /启动日志

switch(config)#logging host xxxx /设定收集日志的syslog server

switch(config)#logging source-interface loopback0 /设定发送日志的原地址

switch(config)#logging facility local6 /cisco设备的默认类型

switch(config)#logging trap 7 /设定记录日志服务的类型,数据越大,威胁程度越低,分为0-7,

设置为7表示包含所有日志类型

switch(config)#logging buffered number /设定本地日志buffer size 大小

时区和时间设定(确保日志记录的准确性)

switch(config)# clock timezone UTC 8 /设定时区为UTC 8

switch(config)#ntp server xxxx /设定NTP Server时间同步服务器

switch(config)#ntp source loopback0 /设定ntp时间同步原地址

switch(config)#ntp authenticate /启用ntp认证

switch(config)#ntp authentication-key 1 md5 pass-string /设置认证密钥和密码

switch(config)#ntp trusted-key 1

六、交换机其他安全配置

1、即时关注cisco ios漏洞信息,为漏洞ios安装补丁或升级ios

2、定期备份交换机设备配置文件及ios文件

3、严格设置登录Banner。必须包含非授权用户禁止登录的字样

4、禁用DNS查找

switch(config)#no ip domain-lookup

GPS同步服务器时间(GPS串口接入,设定好同步软件);

其他15台电脑在时间设定里选择自动和同步服务器(IP地址)同步;

网络摄像头也可以设定和同步服务器或路由器进行时间同步;

NTP服务器主要用来同步时间,如果在设置路由器或者交换机时,不指明时区的话,NTP服务器就无法给设备授时。假如NTP服务器记录的UTC时间,A设备在东七区,那么A设备的时间会同步NTP服务器的时间为UTC+7;假如B设备在东八区,那么B设备的时间会同步NTP服务器的时间为UTC+8。这样,通过指定时区,就可以保证全世界的设备在时间上的同步。

锐捷S2126G二层交换机NTP时间同步配置:

sntpserver10101010

#时间同步间隔约18小时

sntpinterval65535sntpenable

1 华为交换机日期时间设置 华为交换机配置日期时间命令:(用户视图下) 设置成对应的北京时间就行,例2020年06月07日14:01:00 clock datetime
2 查询显示当前时间 display time all或display clock123
3 交换机时间同步设置: 管理视图>;ntp-service unicast-server 192168115 192168115为局域网

登录
首页
学习
实践
活动
专区
工具
TVP
返回腾讯云官网
网络技术联盟站
772 篇文章
关注
原创
防火墙简单组网方案之双机热备
2021-05-14 10:05:16
阅读 8940
两台设备,一主一备。
以下是我 *** 作步骤,刚学习深信服设备不久,好多地方不规范,欢迎大家批评指正。
实验拓扑图(画图是用的process on)
1划分区域
2配置防火墙AF1。
网络配置——接口/区域,并且配置好接口IP地址等信息。ETH1口配置成外网区域,
ETH3定义成内网区域,将ETH2口定义成HA口。如下图:
3接口总览
4默认上网路由和回指路由
5防火墙AF1
进入高可用性配置接口,选择本端ETH2接口作为双机通信口,填写对端地址
1010910,如下图:
6防火墙AF1
启用双机热备,进入双击热备配置接口,点击新增,定义虚拟组为100,防火墙AF1优先级
为100,勾选抢占,双机检测口为ETH3与ETH1,如下图:
7防火墙AF1
进入配置同步接口,选择四种配置同步,如下图:
8配置防火墙AF2,配置ETH2接口IP信息。
如下图:
9防火墙AF2
进入高可用性配置接口,基本信息,选择本端接口ETH2。
对端通信IP地址101099。如下图:
10防火墙AF2
进入双击热备配置接口,设置与对端设备一样的虚拟组100,
优先级设置为90,设备不抢占,心跳时间设置与对端设备一致。如下图:
11防火墙AF2
配置同步
12将防火墙AF1和防火墙AF2都断电,并且接好在线架。
防火墙AF1先开机,待防火墙AF1开机后,再开启防火墙AF2。
防火墙AF2起来后,防火墙AF1会向防火墙AF2同步配置。
注意开机顺序不能反。
13定义对象
14地址转换
15应用控制策略(内网到外网的放行)
16安全防护策略(上网场景,服务器访问场景)
原创声明,本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。如有侵权,请联系 cloudcommunity@tencentcom 删除。
关注作者,阅读全部精彩内容
关注
防火墙
文章来自专栏
网络技术联盟站
772 篇文章127 人关注
订阅
评论 (0)
写评论
暂无人发表评论
相关文章
双机热备方案及双机热备软件选择
企事业机构


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/13333102.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-16
下一篇 2023-07-16

发表评论

登录后才能评论

评论列表(0条)

保存