防火墻的遠程訪問ssh、dhhps
先連接一個cisco防火墻
打開CRT連接
實驗拓撲:
實驗步驟及思路:
第一步,先配置ip
設備 | 端口 | 地址 | 掩碼 |
防火墻 | interface gi0 | 192.168.1.254 | 255.255.255.0 |
interface gi1 | 200.8.8.254 | 255.255.255.248 | |
路由器 | interface gi0/0/0 | 192.168.1.1 | 255.255.255.0 |
interface gi0/0/1 | 10.1.1.254 | 255.255.255.0 | |
interface gi0/0/2 | 20.1.1.254 | 255.255.255.0 | |
client1 | interface eth1 | 20.1.1.1 | 255.255.255.0 |
client2 | interface eth1 | 200.8.8.249 | 255.255.255.248 |
server1 | interface eth1 | 10.1.1.1 | 255.255.255.0 |
server2 | interface eth1 | 200.8.8.250 | 255.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