亚洲 日韩 激情 无码 中出,无码人妻久久一区二区三区蜜桃,亚无码乱人伦一区二区,四虎影视永久免费观看,四虎成人精品一区二区免费网站

詳解ACL限制SSH、Telnet遠(yuǎn)程登錄及抓包實(shí)驗(yàn)

小編:霸主 更新時(shí)間:2022-05-18 11:03
詳解ACL限制SSH、Telnet遠(yuǎn)程登錄及抓包實(shí)驗(yàn)

組網(wǎng)要求:SW2、SW3交換機(jī)與SW1連接,為了保證核心交換機(jī)SW1的安全,要求在SW1上配置SSH,允許SW2通過遠(yuǎn)程登錄,不允許其他交換機(jī)遠(yuǎn)程登錄。在SW2上配置Telnet,允許PC1遠(yuǎn)程登錄。

一、eNSP實(shí)際操作視頻:

二、主要知識(shí)點(diǎn):

Telnet缺少安全的認(rèn)證方式,而且傳輸過程采用TCP進(jìn)行明文傳輸,存在很大的安全隱患。單純提供Telnet服務(wù)容易招致DoS(Deny of Service)、主機(jī)IP地址欺騙、路由欺騙等惡意攻擊。

隨著人們對(duì)網(wǎng)絡(luò)安全的重視,傳統(tǒng)的Telnet和FTP通過明文傳送密碼和數(shù)據(jù)的方式,已經(jīng)慢慢不被人接受。SSH(Secure Shell)是一個(gè)網(wǎng)絡(luò)安全協(xié)議,通過對(duì)網(wǎng)絡(luò)數(shù)據(jù)的加密,解決了這個(gè)問題。它在一個(gè)不安全的網(wǎng)絡(luò)環(huán)境中,提供了安全的遠(yuǎn)程登錄和其他安全網(wǎng)絡(luò)服務(wù)。

SSH通過TCP進(jìn)行數(shù)據(jù)交互,它在TCP之上構(gòu)建了一個(gè)安全的通道。另外SSH服務(wù)除了支持標(biāo)準(zhǔn)端口22外,還支持其他服務(wù)端口,以防止受到非法攻擊。

STelnet

STelnet是基于SSH的安全Telnet服務(wù)。與Telnet相比,SSH服務(wù)器通過對(duì)客戶端進(jìn)行認(rèn)證及雙向的數(shù)據(jù)加密,為網(wǎng)絡(luò)終端訪問提供了安全的服務(wù)。

三、IP設(shè)置:

PC1:192.168.10.10/24

SW1:vlanif1:192.168.10.1/24

SW2:vlanif1:192.168.10.2/24

SW3:vlanif1:192.168.10.3/24

四、SW1的主要配置文件:

#

sysname SW1

#

acl number 2000

rule 5 permit source 192.168.10.2 0

#

aaa

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default

domain default_admin

local-user admin password simple admin

local-user admin service-type http

local-user sshsw1 password cipher %NS[+B0ZNI]NZPO3JBXBHA!! #創(chuàng)建SSH用戶,用戶名為:sshsw1,配置的密碼為123456

local-user sshsw1 privilege level 15 #sshsw1的權(quán)限為15級(jí)為最高級(jí)

local-user sshsw1 service-type ssh #本地用戶的服務(wù)類型為ssh

#

interface Vlanif1

ip address 192.168.10.1 255.255.255.0

#

stelnet server enable #啟用Stelnet服務(wù)

ssh user sshsw1

ssh user sshsw1 authentication-type password #ssh的認(rèn)證類型為密碼認(rèn)證

ssh user sshsw1 service-type stelnet #ssh的服務(wù)類型為stelnet

#

rsa local-key-pair create #生成本地秘鑰對(duì) ,當(dāng)其他交換機(jī)第一次訪問時(shí),要在客戶機(jī)上執(zhí)行ssh client first-time enable 命令,下載秘鑰

#

user-interface con 0

user-interface vty 0 4

acl 2000 inbound #只允許訪問控制列表允許的源地址訪問用戶界面,其他默認(rèn)地被拒絕

authentication-mode aaa #用戶界面的認(rèn)證方式為aaa

protocol inbound ssh #訪問的協(xié)議為ssh

#

return

五、SW2的主要配置文件:

#

sysname SW2

#

acl number 2000

rule 5 permit source 192.168.10.10 0

#

aaa

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default

domain default_admin

local-user admin password simple admin

local-user admin service-type http

local-user telsw2 password cipher %NS[+B0ZNI]NZPO3JBXBHA!!

local-user telsw2 privilege level 15

local-user telsw2 service-type telnet

#

interface Vlanif1

ip address 192.168.10.2 255.255.255.0

#

user-interface con 0

user-interface vty 0 4

acl 2000 inbound

authentication-mode aaa

#

return

六:驗(yàn)證結(jié)果

1、在SW2上遠(yuǎn)程登錄SW1

[SW2]stelnet 192.168.10.1

Please input the username:sshsw1

Trying 192.168.10.1 ...

Press CTRL+K to abort

Connected to 192.168.10.1 ...

The server's public key does not match the one catched before.

The server is not authenticated. Continue to access it? [Y/N]:y

Update the server's public key now? [Y/N]:

Dec 29 2020 13:43:45-08:00 SW2 %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[0]:The server h

ad not been authenticated in the process of exchanging keys. When deciding wheth

er to continue, the user chose Y.y

Dec 29 2020 13:43:46-08:00 SW2 %%01SSH/4/UPDATE_PUBLICKEY(l)[1]:When deciding wh

ether to update the key 192.168.10.1 which already existed, the user chose Y.

Enter password:

Info: The max number of VTY users is 5, and the number

of current VTY users on line is 1.

The current login time is 2020-12-29 13:43:50.

2、在SW3上遠(yuǎn)程登錄SW2

telnet 192.168.10.2

Trying 192.168.10.2 ...

Press CTRL+K to abort

因?yàn)镾W2做了ACL,只允許PC1遠(yuǎn)程登錄。

本實(shí)驗(yàn)是通過華為模擬器eNSP1.3.00.100版(最新版)完成。該軟件還包含CE、CX、NE40E、NE5000E、NE9000E、USG6000V的設(shè)備IOS,可完成復(fù)雜網(wǎng)絡(luò)測(cè)試,需要該模擬器的朋友,可以轉(zhuǎn)發(fā)此文關(guān)注小編,私信小編【666】即可獲得。