50-FIPS典型配置举例
本章节下载: 50-FIPS典型配置举例 (178.49 KB)
本章介绍了手动方式进入FIPS模式,以及采用Stelnet方式登录FIPS模式设备的典型配置举例。
表1 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图1所示,网络管理员通过Console口连接到Switch上,进行设备的管理与维护。为了提高安全性,需要配置Switch运行在FIPS模式下,Host通过Stelnet方式登录Switch,实现较为安全的远程访问。具体应用要求如下:
· Switch当前运行于非FIPS模式,需要通过手动重启方式进入FIPS模式;
· 进入FIPS模式后,Switch作为Stelnet服务器,通过SSH的password认证方式对Host进行认证,认证过程在Switch本地完成;
· Host需要安装Stelnet客户端软件(以PuTTY0.58为例)与Switch建立Stelnet连接。
图1 设备作为Stelnet服务器配置组网图(password认证)
Switch提供了两种启动选择来进入FIPS模式:自动重启方式和手动重启方式。手动重启方式下,设备不自动创建进入FIPS模式的下次启动配置文件,需要用户手工完成进入FIPS模式所需的所有必要配置之后,手工重启设备。具体配置思路如下:
(1) 完成全局Password Control功能相关配置并添加设备管理类本地用户,设置密码、用户角色(network-admin)和服务类型。
(2) 使能FIPS模式。
(3) 选择手动重启。
(4) 保存当前配置文件并设置为下次启动配置文件。
(5) 删除二进制类型的下次启动配置文件(文件名后缀为“.mdb”)。
(6) 重启设备。
· 设备进入FIPS模式前,需要删除不符合FIPS标准的本地用户服务类型(Telnet和FTP)。
· 执行fips mode enable命令之后,系统会提示用户选择启动方式,若用户未在30秒内作出选择,则系统默认用户采用了手动启动方式。
· 设备重启进入FIPS模式之前,系统会自动删除所有非FIPS模式下配置的密钥对和不符合FIPS标准(密钥位数小于2048位,签名HSAH算法为MD5)的数字证书。因此,由非FIPS模式切换到FIPS模式后,用户将无法直接通过SSH方式登录设备。若需要进行SSH登录,必须先在FIPS模式下,通过Console口登录设备,并创建SSH服务器所需的密钥对,才能支持SSH用户登录。
· 登录FIPS模式下的设备时使用的用户密码必须符合Password Control密码管理策略,例如必须符合一定的密码长度策略、密码复杂度策略以及密码老化策略等。
· 采用手动重启方式进入FIPS模式,在保存当前配置并设置为下次启动配置文件后,必须首先删除二进制类型的下次启动配置文件,然后再重启设备。如果不删除二进制类型的下次启动配置文件,则设备使用二进制配置文件启动时,FIPS模式下不支持的命令(如果存在于配置文件中)也会被恢复,从而影响FIPS模式下系统的正常运行。
· 执行fips mode enable命令之后到系统重启之前的这个时间段,系统将进入一个准备进入FIPS模式之前的中间状态,若选择手动方式重启,则不建议在这个时间段执行除reboot、save以及相应的配置准备之外的其它命令,否则可能会不能达到预期的执行效果。
· 使能全局密码管理功能后,设备管理类本地用户密码的配置将不被显示,即无法通过相应的display命令查看到设备管理类本地用户密码的配置。
# 使能全局Password Control功能。
[Switch] password-control enable
# 设置全局Password Control密码组合类型的个数为4,每种类型至少一个字符。
[Switch] password-control composition type-number 4 type-length 1
# 设置全局Password Control的密码最小长度为15。
[Switch] password-control length 15
# 添加设备管理类本地用户:用户名为test、密码为12345zxcvb!@#$%ZXCVB、用户角色为network-admin,服务类型为SSH和Terminal。
[Switch] local-user test class manage
New local user added.
[Switch-luser-manage-test] password simple 12345zxcvb!@#$%ZXCVB
Updating user information. Please wait ... ...
[Switch-luser-manage-test] authorization-attribute user-role network-admin
[Switch-luser-manage-test] service-type ssh terminal
[Switch-luser-manage-test] quit
# 使能FIPS模式,并选择手动重启方式进入FIPS模式。
[Switch] fips mode enable
Create a new start-up configuration file named fips-startup.cfg used for FIPS mode. After setting the login username and password for logging in the device of FIPS mode, the device will be rebooted automatically. Are you sure? [Y/N]: n
# 将当前配置保存到存储介质的根目录,并将该文件设置为下次启动配置文件。
[Switch] save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[Switch] quit
# 删除二进制类型的下次启动配置文件。
<Switch> delete flash:/startup.mdb
Delete flash:/startup.mdb?[Y/N]:y
Deleting file flash:/startup.mdb...Done.
# 重启设备。
<Switch> reboot
Start to check configuration with next startup configuration file, please wait..
.......DONE!
This command will reboot the device. Continue? [Y/N]:y
Now rebooting, please wait...
重启设备后,通过Console口进行登录,输入用户名test和对应的密码后,由于是首次登录,系统会提示重置密码。重置密码成功后,进入FIPS模式的系统。重置的密码必须是大写字母、小写字母、数字以及特殊字符的组合,最小长度为15位,且需要与旧密码不同,例如QQwwee12345^&*()。
Press ENTER to get started.
login: test
Password:
First login or password reset. For security reason, you need to change your pass
word. Please enter your password.
old password:
new password:
confirm:
Updating user information. Please wait ... ...
<Switch>
# 显示当前FIPS模式状态,可见设备工作在FIPS模式下。
<Switch> display fips status
FIPS mode is enabled.
# 生成2048位的RSA密钥对。
<Switch> system-view
[Switch] public-key local create rsa
The range of public key modulus is (2048 ~ 2048).
It will take a few minutes.Press CTRL+C to abort.
Input the modulus length [default = 2048]:
Generating Keys...
................................................+++
................................................+++
Create the key pair successfully.
# 开启SSH服务器功能。
[Switch] ssh server enable
# 设置Stelnet客户端登录用户界面的认证方式为AAA认证,远程登录协议为ssh。
[Switch] user-interface vty 0 15
[Switch-ui-vty0-15] authentication-mode scheme
[Switch-ui-vty0-15] protocol inbound ssh
[Switch-ui-vty0-15] quit
# 配置SSH用户test的服务类型为Stelnet,认证方式为password认证。(此步骤可以不配置)
[Switch] ssh user test service-type stelnet authentication-type password
Stelnet客户端软件有很多,例如PuTTY、OpenSSH等。本文中仅以客户端软件PuTTY0.58为例,说明Stelnet客户端的配置方法。
# 安装PuTTY0.58软件。
# 配置Stelnet服务器的IP地址。
打开PuTTY.exe程序,出现如图2所示的客户端配置界面。在“Host Name(or IP address)”文本框中输入Stelnet服务器的IP地址为20.20.0.105。
图2 Stelnet服务器配置界面
在图2中,单击<Open>按钮,弹出服务器登录安全提示,单击<是>:
图3 Stelnet服务器登录安全提示
Host向Switch发起连接后,按提示输入用户名“test”和密码“QQwwee12345^&*()”,即可进入Switch的用户界面,实现对设备的远程访问。
Login as: test
client001@20.20.0.105’s password:
Last successfully login time: Sat Sep 1 08:42:19 2013
******************************************************************************
* Copyright (c) 2004-2013 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Switch>
#
vlan 1
#
interface Vlan-interface1
ip address 20.20.0.105 255.255.255.0
#
user-interface vty 0 15
authentication-mode scheme
protocol inbound ssh
#
ssh server enable
ssh user test service-type stelnet authentication-type password
#
password-control enable
#
local-user test class manage
service-type ssh terminal
authorization-attribute user-role network-operator
authorization-attribute user-role network-admin
#
fips mode enable
#
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!