1. 程式人生 > >防火墻的遠程訪問ssh、dhhps

防火墻的遠程訪問ssh、dhhps

gb2 cati crt group edi 微軟雅黑 防火墻配置 fff pro

實驗名稱:防火墻的遠程訪問ssh、dhhps

先連接一個cisco防火墻

技術分享圖片



技術分享圖片


技術分享圖片


打開CRT連接

技術分享圖片



實驗拓撲:


技術分享圖片



實驗步驟及思路:

第一步,先配置ip



設備端口地址掩碼
防火墻interface gi0192.168.1.254255.255.255.0

interface gi1200.8.8.254255.255.255.248
路由器interface gi0/0/0192.168.1.1255.255.255.0

interface gi0/0/1 10.1.1.254255.255.255.0

interface gi0/0/2 20.1.1.254255.255.255.0
client1interface eth120.1.1.1255.255.255.0
client2interface eth1200.8.8.249255.255.255.248
server1interface eth110.1.1.1255.255.255.0
server2interface eth1200.8.8.250255.255.255.248



第二步:使client1訪問server2,因為有路由器,訪問其他網段就要路由,所以配置靜態路由

路由器配置默認路由

ip route-static 0.0.0.0 0.0.0.0 192.168.1.254 255.255.255.0

防火墻配置靜態路由

route inside 10.1.1.0 255.255.255.0 192.168.1.1

route inside 20.1.1.0 255.255.255.0 192.168.1.1

配置防火墻ip,inside,outside(防火墻是cisco)

interface GigabitEthernet0

nameif inside 名字 進端口

security-level 100 安全等級 100

ip address 192.168.1.254 255.255.255.0 ip地址


interface GigabitEthernet1

nameif outside 名字 出端口

security-level 0 安全等級 0

ip address 200.8.8.254 255.255.255.248 ip地址


驗證:


技術分享圖片


因為沒有配置icmp,所以ping是不行的,只能web訪問

在用client2訪問以下server1,肯定是不通的


技術分享圖片



然後在配置遠程訪問ssh

配置命令:

asa(config)# domain-name asadomain.com 配置域名

asa(config)# crypto key generate rsa module 1024 生成密鑰對,秘鑰的長度默認是1024

sas(config)#ssh 0 0 outside 所有外部主機都能訪問

sas(config)# username ssh password cisco 配置用戶名和密碼

sas(config)# aaa authentication console LOCAL 允許本地通過ssh協議訪問此防火墻

驗證:

配置虛擬網卡ip

技術分享圖片


配置ip

技術分享圖片




打開CRT

技術分享圖片



輸入用戶名ssh和密碼cisco

技術分享圖片


成功進入

技術分享圖片





配置https遠程訪問

配置命令:

sas(config)# http server enable 開啟 http服務

sas(config)# http 0 0 outside 任何外部地址都能訪問

sas(config)# asdm image disk0:/asdm-649.bin 配置一個映像文件夾

sas(config)# username cisco password cisco privilege 15 配置用戶名和密碼,用戶等級15為管理員權限,默認為1


驗證:

先在物理機安裝一個

技術分享圖片


打開瀏覽器

技術分享圖片


技術分享圖片



技術分享圖片

下載一個文件並安裝

技術分享圖片


技術分享圖片


進入就能更改防火墻的配置了



防火墻的遠程訪問ssh、dhhps