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

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

cisco交换机安全配置设定命令大全

思科交换机的安全怎么设置,下面为大家分交换机安全设置的配置命令,希望对同学们学习思科交换机有所帮助!

一、交换机访问控制安全配置

1、对交换机特权模式设置密码尽量采用加密和md5 hash方式

switch(config)#enable secret 5 pass_string

其中 0 Specifies an UNENCRYPTED password will follow

5 Specifies an ENCRYPTED secret will follow

建议不要采用enable password pass_sting密码,破解及其容易!

2、设置对交换机明文密码自动进行加密隐藏

switch(config)#service password-encryption

3、为提高交换机管理的灵活性,建议权限分级管理并建立多用户

switch(config)#enable secret level 7 5 pass_string7 /7级用户进入特权模式的密码

switch(config)#enable secret 5 pass_string15 /15级用户进入特权模式的密码

switch(config)#username userA privilege 7 secret 5 pass_userA

switch(config)#username userB privilege 15 secret 5 pass_userB

/为7级,15级用户设置用户名和密码,Cisco privilege level分为0-15级,级别越高权限越大

switch(config)#privilege exec level 7 commands

/为7级用户设置可执行的命令,其中commands可以根据分配给用户的权限自行定义

4、本地console口访问安全配置

switch(config)#line console 0

switch(config-line)#exec-timeout 5 0 /设置不执行命令 *** 作的超时时间,单位为分钟和秒

switch(config-line)#logging synchronous

/强制对d出的干扰日志信息进行回车换行,使用户输入的命令连续可见

设置登录console口进行密码验证

方式(1):本地认证

switch(config-line)#password 7 pass_sting /设置加密密码

switch(config-line)#login /启用登录验证

方式(2):本地AAA认证

switch(config)#aaa new-model /启用AAA认证

switch(config)#aaa authentication login console-in group acsserver local

enable

/设置认证列表console-in优先依次为ACS Server,local用户名和密码,enable特权密码

switch(config)#line console 0

switch(config-line)# login authentication console-in

/调用authentication设置的console-in列表

5、远程vty访问控制安全配置

switch(config)#access-list 18 permit host xxxx

/设置标准访问控制列表定义可远程访问的PC主机

switch(config)#aaa authentication login vty-in group acsserver local

enable

/设置认证列表vty-in, 优先依次为ACS Server,local用户名和密码,enable特权密码

switch(config)#aaa authorization commands 7 vty-in group acsserver local

if-authenticated

/为7级用户定义vty-in授权列表,优先依次为ACS Server,local授权

switch(config)#aaa authorization commands 15 vty-in group acsserver local

if-authenticated

/为15级用户定义vty-in授权列表,优先依次为ACS Server,local授权

switch(config)#line vty 0 15

switch(config-line)#access-class 18 in /在线路模式下调用前面定义的标准ACL 18

switch(config-line)#exec-timeout 5 0 /设置不执行命令 *** 作的超时时间,单位为分钟和秒

switch(config-line)#authorization commands 7 vty-in /调用设置的授权列表vty-in

switch(config-line)#authorization commands 15 vty-in

switch(config-line)#logging synchronous

/强制对d出的干扰日志信息进行回车换行,使用户输入的命令连续可见

switch(config-line)#login authentication vty-in

/调用authentication设置的vty-in列表

switch(config-line)#transport input ssh

/有Telnet协议不安全,仅允许通过ssh协议进行远程登录管理

6、AAA安全配置

switch(config)#aaa group server tacacs+ acsserver /设置AAA服务器组名

switch(config-sg-tacacs+)#server xxxx /设置AAA服务器组成员服务器ip

switch(config-sg-tacacs+)#server xxxx

switch(config-sg-tacacs+)#exit

switch(config)# tacacs-server key paa_string /设置同tacacs-server服务器通信的密钥

二、交换机网络服务安全配置

禁用不需要的各种服务协议

switch(config)#no service pad

switch(config)#no service finger

switch(config)#no service tcp-small-servers

switch(config)#no service udp-small-servers

switch(config)#no service config

switch(config)#no service ftp

switch(config)#no ip >no ftp-server write-enable
FTP服务器无写入FLASH或SLOT的权限
ip ips po max-events 100
指定放进路由器事件队列里的最大事件数为100,正常为100


在cisco如何禁止pc机访问>

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

原文地址: https://outofmemory.cn/zz/13427651.html

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

发表评论

登录后才能评论

评论列表(0条)

保存