# H3C防火墙-初始配置介绍
# 实验拓扑
实验一:防火墙出厂配置和Console登录配置
# 实验内容
1.按照拓扑结构连接防火墙G1/0/1接口,启动F1060防火墙
2.通过Console口登录防火墙,用户名和密码均为admin
Press ENTER to get started.
login: admin
Password:
<H3C>
3.查看F1060防火墙出厂时的重要配置,并说明重要内容
<H3C>dis current-configuration
#
version 7.1.064, Alpha 7164 //默认版本信息
#
sysname H3C //默认设备名称
#
#
telnet server enable //默认开启Telnet服务
#
#
interface GigabitEthernet1/0/1 //默认G1/0/1接口已经配置IP
port link-mode route
combo enable copper
ip address 192.168.0.1 255.255.255.0
#
#
line class console //console登陆的默认权限为最高级别
user-role network-admin
#
#
line class vty //VTY登录的默认权限为network-operator
user-role network-operator
#
#
line con 0 //console登录默认认证方式为与角色
authentication-mode scheme
user-role network-admin
#
line vty 0 4 //VTY登录的默认认证方式与角色
authentication-mode scheme
user-role network-admin
#
#
local-user admin class manage //默认创建admin类型为管理者,并设置密码和授权
password hash $h$6$UbIhNnPevyKUwfpm$LqR3+yg1IjNct39MkOR0H0iQXLkYB3jMqM4vbAeoXOhbabIIFnjJPEGR00YiYA1Sz4LiY3FmEdru2fOLMb1shQ==
service-type telnet terminal http
authorization-attribute user-role level-3
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
ip http enable //默认开启http
ip https enable //默认开启https
#
4.通过上述解读分析,可以等到以下结论
- 通过console登录时,可以使用用户名admin密码admin登录,用户权限为network-admin
- 通过telnet登陆时,可以连接防火墙G1/0/1口使用用户admin进行登录,telnet地址为192.168.0.1,用户权限为network-admin
- 通过http或https访问时,可以使用用户admin进行web访问登录防火墙,访问地址为https://192.168.0.1
注意1:由于防火墙的机制,在未进行安全域的配置时外部是无法访问的,所以需要在配置好安全域之后才能使用远程登录服务。
注意2:虽然目前已经默认开启了https服务,但是仍然不能使用该方式进行浏览器访问登录;因为,用户admin的服务类型默认限制为telnet terminal http,并不包含https,所以需要进行手动配置后才可使用https方式。
5.配置通过console口登录设备时无需认证
步骤一:进入console 0 配置口,设置用户验证模式为none
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]line console 0
[H3C-line-console0]authentication-mode none
步骤二:测试发现不需要用户名密码就可以直接登录防火墙了
[H3C-line-console0]qui
[H3C]
[H3C]qui
<H3C>qui
6.通过console口登录设备时采用密码认证(password)
步骤一:进入console 0 配置口更改用户验证模式为password,并设置验证密码为hello123
[H3C]line console 0
[H3C-line-console0]authentication-mode password
[H3C-line-console0]set authentication password simple hello123
[H3C-line-console0]user-role network-admin
步骤二:测试可以看到再次登录防火墙时只需要使用密码即可登录
Press ENTER to get started.
Password:
7.通过配置console口登录设备时采用AAA认证(scheme)
步骤一:进入console 0 配置口更改用户验证模式为scheme
[H3C]line console 0
[H3C-line-console0]authentication-mode scheme
步骤二:创建一个本地用户zx
密码为123456
,用户权限为最高,服务类型为terminal
[H3C]local-user zx class manage
New local user added.
[H3C-luser-manage-zx]password simple 123456
[H3C-luser-manage-zx]authorization-attribute user-role network-admin
[H3C-luser-manage-zx]service-type terminal
步骤三:使用新创建的用户登录测试,可以看到能够正常登录
login: zx
Password:
<H3C>%Feb 6 16:57:49:300 2021 H3C SHELL/5/SHELL_LOGIN: -Context=1; zx logged in from con0.
<H3C>
8.完成以上配置后,从安全的角度考虑,建议更换admin用户的密码或删除admin用户