AAA介紹
AAA是驗證
( Authentication )、授權
( Authorization )和記賬
( Accounting )三個英文單詞的簡稱是一個能夠處理用戶訪問請求的服務器程序,主要目的是管理用戶訪問網絡服務器,爲具有訪問權的用戶提供服務。
驗證: 哪些用戶可以訪問網絡服務器。
授權: 具有訪問權限的用戶可以得到哪些服務,有什麼權限。
記賬: 如何對正在使用網絡資源的用戶進行審計。
網絡設備的AAA認證方式有本地身份驗證
( Local )、遠程身份驗證
兩大類。
本地身份驗證通過將用戶名
和密碼
在本地創建並驗證
遠程身份驗證通過各個廠商自有的AAA服務器來完成,這需要設備
和AAA服務器
進行關。
華爲防火牆支持用戶進行本地與遠程配置,只介紹本地身份驗證。
華爲防火牆常見的管理方式
管理方式 | 描述 |
---|---|
console線連接 | 屬於帶外管理,不佔用戶帶寬,適用於新設備的首次配置場景。 |
telnet方式連接 | 屬於帶內管理,配置簡單,安全性低,資源佔用少,主要適用於安全性不高、設備性能差的場景。 |
web界面登錄 | 屬於帶內管理,可以基於圖形化管理,更適用於新手配置設備。 |
ssh方式連接 | 屬於帶內管理,配置複雜,安全性高,資源佔用高,主要適用於對安全性要求比較高的場景,如通過互聯網遠程管理公司網絡設備。 |
下面會有帶內管理詳細的3種配置。
Telent管理方式
通過配置使終端通過Telnet
方式登錄設備,實現對設備的配置和管理。實驗環境如下圖所示,
在搭建上圖所示的拓撲圖時,eNSP
中的客戶端無法模擬 Telnet、SSH及Web方式管理,所以建議將防火牆的G0/0/0口橋接到真實的虛擬機中,用虛擬機
充當客戶端使用。
Cloud配置
另外,華爲設備的默認管理賬戶是admin
,密碼是Admin@123
。其他創建的賬號在首次疊錄時根據提示需要重新設置密碼。
Please Press ENTER.
An initial password is required for the first login via the console.
Set a password and keep it safe. Otherwise you will not be able to login via the
console.
Please configure the login password (8-16)
Enter Password: ##密碼是:Admin@123
Confirm Password: ##重複密碼
Warning: The authentication mode was changed to password authentication and the
user level was changed to 15 on con0 at the first user login.
Warning: There is a risk on the user-interface which you login through. Please c
hange the configuration of the user-interface as soon as possible.
*************************************************************************
* Copyright (C) 2014-2015 Huawei Technologies Co., Ltd. *
* All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
*************************************************************************
<USG6000V1>
<USG6000V1>sys
Enter system view, return user view with Ctrl+Z.
[USG6000V1]undo info en
Info: Information center is disabled.
[USG6000V1]
- 配置防火牆ip接口地址,打開telnet功能
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.100.20 24
[USG6000V1-GigabitEthernet1/0/0]un sh
Info: Interface GigabitEthernet1/0/0 is not shutdown.
[USG6000V1-GigabitEthernet1/0/0]q
[USG6000V1]
[USG6000V1]telnet server enable
Warning: Telnet is not a secure protocol, and it is recommended to use Stelnet
- 配置防火牆允許遠程管理,並將防火牆接口 g1/0/0加入安全區域。
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage enable
[USG6000V1-GigabitEthernet1/0/0]service-manage telnet permit
[USG6000V1-GigabitEthernet1/0/0]q
[USG6000V1]firewall zone trust
[USG6000V1-zone-trust]add interface g1/0/0
[USG6000V1-zone-trust]q
[USG6000V1]
3) 將防火牆配置域間包過濾,以保證網絡基本通信正常,因爲 Telnet流量屬於防火牆自身收發,所以需要配置Trust
區域到Local
區域的安全策略。
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name allow_telnet
[USG6000V1-policy-security-rule-allow_telnet]source-zone trust
[USG6000V1-policy-security-rule-allow_telnet]destination-zone local
[USG6000V1-policy-security-rule-allow_telnet]action permit
[USG6000V1-policy-security-rule-allow_telnet]q
[USG6000V1-policy-security]q
[USG6000V1]
- 配置認證模式及本地用戶信息
[USG6000V1]user-interface vty 0 4 //進到用戶界面視圖
[USG6000V1-ui-vty0-4]authentication-mode aaa //開啓aaa認證模式
Warning: The level of the user-interface(s) will be the default level of AAA use
rs, please check whether it is correct.
[USG6000V1-ui-vty0-4]protocol inbound telnet //允許 Telnet連接虛擬終端
[USG6000V1-ui-vty0-4]q
[USG6000V1]aaa //進到aaa認證模式
[USG6000V1-aaa]manager-user demo //配置本地用戶demo
[USG6000V1-aaa-manager-user-demo]password cipher demo@123 //配置密碼
Info: You are advised to config on man-machine mode.
[USG6000V1-aaa-manager-user-demo]service-type telnet //配置服務類型
Warning: The user access modes include Telnet or FTP, so security risks exist.
[USG6000V1-aaa-manager-user-demo]level 3 //配置用戶權限級別
[USG6000V1-aaa-manager-user-demo]q
[USG6000V1-aaa]q
[USG6000V1]
5)在客戶端運行CRT,連接防火牆
6)連接後,根據提示修改密碼,重新連接後即可進入用戶視圖,登錄到設備上。
web管理方式
1) 打開接口的http和https管理
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage http permit //打開接口的http和https管理
[USG6000V1-GigabitEthernet1/0/0]service-manage https permit
2) 將防火牆接口 g1/0/0加入安全區域,上面做過,這裏就不做了
3) 配置安全策略
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name allow_web
[USG6000V1-policy-security-rule-allow_web]source-zone trust
[USG6000V1-policy-security-rule-allow_web]destination-zone local
[USG6000V1-policy-security-rule-allow_web]action permit
[USG6000V1-policy-security-rule-allow_web]q
[USG6000V1-policy-security]q
[USG6000V1]
[USG6000V1]web-manager security enable //開啓web管理策略
Info: Web security-server has been enabled.
4)aaa用戶認證模式
[USG6000V1]aaa
[USG6000V1-aaa]manager-user demo
[USG6000V1-aaa-manager-user-demo]service-type web
[USG6000V1-aaa-manager-user-demo]level 3
[USG6000V1-aaa-manager-user-demo]q
[USG6000V1-aaa]q
[USG6000V1]
注:
- web-manager security enable命令後面也可以跟
自定義端口
,如web-manager security enable port 2000。 - 執行 security參數,是開啓
https
管理,如web-manager security enable;不執行 security參數,是開啓http
管理,如:web-manage enable。 - 不允許https和http管理使用相同的端口,這樣配置會導致端口衝突。
5)防火牆默認情況下開啓的https端口爲8443
.在客戶端的E測覽器中訪問https://192.168.100.20:8443,打開認證界面
因爲在telnet時更改過demo密碼,使用新密碼登錄
配置SSH方式登錄設備
和 Telnet相比,SSH安全性更高,但比telnet更復雜一些,下面是配置SSH管理步驟。
1)進入接口,允許ssh連接,並加入trust區域(telnet已做)
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage ssh permit
[USG6000V1-GigabitEthernet1/0/0]q
2)配置安全策略
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name allow_ssh
[USG6000V1-policy-security-rule-allow_ssh]source-zone trust
[USG6000V1-policy-security-rule-allow_ssh]destination-zone local
[USG6000V1-policy-security-rule-allow_ssh]action permit
[USG6000V1-policy-security-rule-allow_ssh]q
[USG6000V1-policy-security]q
[USG6000V1]
3)創建SSH所需的密鑰對
[USG6000V1]rsa local-key-pair create //創建SSH所需的密鑰對
The key name will be: USG6000V1_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
it will take a few minutes.
Input the bits in the modulus[default = 2048]:
Generating keys...
.+++++
........................++
....++++
...........++
[USG6000V1]
4)指定aaa認證,並且創建ssh認證用戶
[USG6000V1]user-interface vty 0 4
[USG6000V1-ui-vty0-4]authentication-mode aaa
Warning: The level of the user-interface(s) will be the default level of AAA use
rs, please check whether it is correct.
[USG6000V1-ui-vty0-4]protocol inbound ssh
[USG6000V1-ui-vty0-4]q
[USG6000V1]ssh user lzj //指定lzj爲ssh用戶
Info: Succeeded in adding a new SSH user.
[USG6000V1]ssh user lzj authentication-type password //配置認證方式
[USG6000V1]ssh user lzj service-type stelnet //配置服務類型
[USG6000V1]aaa
[USG6000V1-aaa]manager-user lzj //創建本地用戶lzj
[USG6000V1-aaa-manager-user-lzj]password cipher Lzja@123 //指定密碼
Info: You are advised to config on man-machine mode.
[USG6000V1-aaa-manager-user-lzj]service-type ssh
[USG6000V1-aaa-manager-user-lzj]level 3
[USG6000V1-aaa-manager-user-lzj]q
[USG6000V1-aaa]q
[USG6000V1]
[USG6000V1]stelnet server enable
Info: Succeeded in starting the Stelnet server.
[USG6000V1]
5)在客戶端上CRT軟件連接防火牆,彈出如下圖框,單擊 “接受並保存”。
又會彈出新登入框,輸入用戶和密碼,第一次登入進去會提示改密碼,改完後會自動退出,使用新密碼
登入。
下一篇:防火牆的NAT策略