軟件客戶端的全加密Cisco IPsec VPN網(wǎng)關
在所有的全加密配置網(wǎng)絡中,所有從遠程節(jié)點過來的流量在到達VPN網(wǎng)關的內(nèi)部接口之前都是加密的。然后網(wǎng)關將這些安全的(已經(jīng)解碼的)流量發(fā)送到本地下一跳節(jié)點(172.30.40.33)。在這個例子中,我們將使用我們在“舊式”實現(xiàn)中所使用的相同網(wǎng)絡:172.30.40.0/24、172.30.80.0/24和172.30.60.0/24。所有其它的流量都被發(fā)送到內(nèi)部防火墻接口。然后防火墻根據(jù)它的策略規(guī)則庫處理VPN客戶端的外部請求。將所有的流量傳送到正確的位置的確是需要費一番周折。但為了支持來自非顯式定義網(wǎng)絡的VPN客戶端連接,VPN網(wǎng)關的默認路由必須指向網(wǎng)關路由器的DMZ接口(63.240.22.0.1)。所有的安全網(wǎng)絡必須被顯式地定義并且使用RS的172.30.40.0/24的網(wǎng)絡接口(172.30.40.33)作為下一跳地址。為了使Internet流量能到達防火墻的內(nèi)部接口(172.30.40.1),我們實現(xiàn)了一條路由來檢查流量,然后根據(jù)一個流量檢查ACL將它轉發(fā)到恰當?shù)木W(wǎng)關。這跟路由器決定加密哪些流量的方法一樣,它根據(jù)ACL來檢查流量,然后進行相應的處理。
既然我們已經(jīng)解決了安全網(wǎng)絡流量和Internet網(wǎng)絡流量處理問題,以及在IOS路由器上實現(xiàn)全加密拓撲,我們就可以進行新式VPN配置了。新式和舊式VPN配置的區(qū)別很大程度上是在外加的ISAKMP模板上。在舊式配置中,VPN客戶端認證、授權和IP地址處理都是作為靜態(tài)密碼表配置的一部分。
在一個單客戶端解決方案中(其中用戶社區(qū)的所有流量傳輸都通過單個網(wǎng)絡訪問、ISAKMP和AAA策略實現(xiàn)),這并不會帶來任何的限制。而在多客戶端環(huán)境中,由于需要實現(xiàn)不同的AAA和網(wǎng)絡訪問策略,這時舊式方法有些不滿足要求。ISAKMP模板能夠創(chuàng)建不同的ISAKMP模板與不同的ISAKMP客戶端配置組和擴展的不同的動態(tài)密碼圖及/或圖序列實體一起使用。
為了說明它們的區(qū)別,我們將使用新式方法重新創(chuàng)建半隧道和全加密VPN解決方案。就像舊式方法,VPN網(wǎng)關配置由兩部分組成:ISAKMP和密碼圖配置。
ISAKMP配置
A.創(chuàng)建ISAKMP策略:下面這個配置實現(xiàn)了ISAKMP階段1策略,它同時支持默認DES/SHA/DH-1和支持預共享密匙的更安全的標準3DES/MD5/DH-2:
outlan-rt05(config)#crypto isakmp policy 10
outlan-rt05(config-isakmp)#encr 3des
outlan-rt05(config-isakmp)#hash md5
outlan-rt05(config-isakmp)#authentication pre-share
outlan-rt05(config-isakmp)#group 2
outlan-rt05(config-isakmp)#exit
outlan-rt05(config)#crypto isakmp policy 20
outlan-rt05(config-isakmp)#hash sha
outlan-rt05(config-isakmp)#encryption des
outlan-rt05(config-isakmp)#authentication pre-share
outlan-rt05(config-isakmp)#group 1
B.配置AAA用戶和組認證、授權和帳號:半隧道策略將使用本地源用戶認證和組授權。全加密策略使用TACACS進行用戶認證和本地源組授權。
outlan-rt05(config)#aaa authentication login local-user-auth local
outlan-rt05(config)#aaa authorization network local-group-authz local
outlan-rt05(config)#aaa authentication login aaa-auth group tacacs+
outlan-rt05(config)#tacacs-server host 172.30.40.6
outlan-rt05(config)#tacacs-server key secretkey
C.為這兩個策略創(chuàng)建IP地址池:
outlan-rt05(config)#ip local pool OS-VPN 172.30.90.2 172.30.90.14
outlan-rt05(config)#ip local pool FC-VPN 5.0.0.2 5.0.0.254
D.創(chuàng)建loopback接口與地址池:
outlan-rt05(config)#interface loopback 90
outlan-rt05(config-if)#ip address 172.30.90.1 255.255.255.2
outlan-rt05(config-if)#exit
outlan-rt05(config)#interface loopback 5
outlan-rt05(config-if)#ip address 5.0.0.1 255.255.255.0
outlan-rt05(config-if)#exit
outlan-rt05(config)#
E.創(chuàng)建半隧道ACL:
outlan-rt05(config)#ip access-list extended SPLIT-TUNNEL
outlan-rt05(config-ext-nacl)#permit ip 172.30.40.0 0.0.0.255 172.30.90.0 0.0.0.15
outlan-rt05(config-ext-nacl)#permit ip 172.30.80.0 0.0.0.255 172.30.90.0 0.0.0.15
outlan-rt05(config-ext-nacl)#permit ip 172.30.60.0 0.0.0.255 172.30.90.0 0.0.0.15
outlan-rt05(config-ext-nacl)#exit
outlan-rt05(config)#
F.創(chuàng)建客戶端配置組:半隧道策略的ISAKMP組和全加密策略必須分開創(chuàng)建:
outlan-rt05(config)#crypto isakmp client configuration group split-tunnel
outlan-rt05(config-isakmp-group)#key secretkey
outlan-rt05(config-isakmp-group)#dns 172.30.40.2
outlan-rt05(config-isakmp-group)#domain outlan.net
outlan-rt05(config-isakmp-group)#pool OS-VPN
outlan-rt05(config-isakmp-group)#acl SPLIT-TUNNEL
outlan-rt05(config-isakmp-group)#max-logins 2
outlan-rt05(config-isakmp-group)#max-users 13
outlan-rt05(config-isakmp-group)#save-password
outlan-rt05(config-isakmp-group)#banner ^
Enter TEXT message. End with the character '^'.
You are connected to OUTLAN. All outlan traffic is secured.
^
outlan-rt05(config-isakmp-group)#exit
outlan-rt05(config)# crypto isakmp client configuration group full-crypto
outlan-rt05(config-isakmp-group)#key secretkey
outlan-rt05(config-isakmp-group)#dns 172.30.40.2
outlan-rt05(config-isakmp-group)#domain outlan.net
outlan-rt05(config-isakmp-group)#pool FC-VPN
outlan-rt05(config-isakmp-group)#save-password
outlan-rt05(config-isakmp-group)#include-local-lan
outlan-rt05(config-isakmp-group)#pfs
outlan-rt05(config-isakmp-group)#max-users 253
outlan-rt05(config-isakmp-group)#max-logins 1
outlan-rt05(config-isakmp-group)#banner ^
Enter TEXT message. End with the character '^'.
This is a full crypto VPN connection.
^
outlan-rt05(config-isakmp-group)#exit
G.配置CTCP端口定義(并禁用路由器上的HTTP和HTTPS服務):
outlan-rt05(config)#crypto ctcp port 443 10000
outlan-rt05(config)#no ip http secure-server
outlan-rt05(config)#no ip http server
H.配置NAT透明活躍時間:NAT透明默認是激活的,但你需要設置一個活躍時間。然后,如果你只想使用CTCP,你可以禁用NAT回環(huán):
outlan-rt05(config)#crypto isakmp nat keepalive 20
outlan-rt05(config)#no crypto ipsec nat-transparency udp-encaps
配置ISAKMP模板:ISAKMP模板是用來做新式配置的。注意ISAKMP組名和ISAKMP策略名應該是一樣的。這不是一個硬性要求,但如果你有很多不同的組和模板,這樣做可以讓你更容易管理它們:
outlan-rt05(config)#crypto isakmp profile split-tunnel
% A profile is deemed incomplete until it has match identity statements
outlan-rt05(conf-isa-prof)#description ISAKMP for Split Tunneling Cisco Soft Clients
outlan-rt05(conf-isa-prof)#match identity group split-tunnel
outlan-rt05(conf-isa-prof)#client authentication list local-user-auth
outlan-rt05(conf-isa-prof)#isakmp authorization list local-group-authz
outlan-rt05(conf-isa-prof)#client configuration address respond
outlan-rt05(conf-isa-prof)#keepalive 20 retry 10
outlan-rt05(conf-isa-prof)#exit
outlan-rt05(config)#
outlan-rt05(config)# crypto isakmp profile full-crypto
% A profile is deemed incomplete until it has match identity statements
outlan-rt05(conf-isa-prof)#description ISAKMP for Full Crypto Cisco Soft Clients
outlan-rt05(conf-isa-prof)#match identity group full-crypto
outlan-rt05(conf-isa-prof)#client authentication list aaa-auth
outlan-rt05(conf-isa-prof)#isakmp authorization list local-group-authz
outlan-rt05(conf-isa-prof)#client configuration address respond
outlan-rt05(conf-isa-prof)#keepalive 20 retry 10
outlan-rt05(conf-isa-prof)#exit
outlan-rt05(config)#
密碼圖配置
定義了ISAKMP組和模板后,我們繼續(xù)配置(更簡單的)新式密碼圖。
A.創(chuàng)建轉換集:因為我們僅支持Cisco VPN軟件客戶端,所以我們實際上只需要一個階段2策略:
outlan-rt05(config)#crypto ipsec transform-set 3DES-MD5-Z esp-3des esp-md5-hmac comp-lzs
B.創(chuàng)建動態(tài)密碼圖:因為我們支持兩個不同的VPN策略,我們有一些實現(xiàn)動態(tài)密碼圖的選項要配置。我們可以實現(xiàn)兩個不同的圖,或者實現(xiàn)一個圖及兩個序列。下面是一個實現(xiàn)一個圖及兩個序列的例子:
outlan-rt05(config)#crypto dynamic-map Software-Client 10
outlan-rt05(config-crypto-map)#set security-association lifetime seconds 12000
outlan-rt05(config-crypto-map)#set transform-set 3DES-MD5-Z
outlan-rt05(config-crypto-map)#set isakmp-profile split-tunnel
outlan-rt05(config-crypto-map)#reverse-route
outlan-rt05(config-crypto-map)#exit
outlan-rt05(config-crypto-map)#crypto dynamic-map Software-Client 20
outlan-rt05(config-crypto-map)#set transform-set 3DES-MD5-Z
outlan-rt05(config-crypto-map)#set pfs group2
outlan-rt05(config-crypto-map)#set isakmp-profile full-crypto
outlan-rt05(config-crypto-map)#reverse-route
outlan-rt05(config-crypto-map)#exit
C.創(chuàng)建靜態(tài)密碼圖:
outlan-rt05(config)#crypto map outlan-ipsec-gw05 10 ipsec-isakmp dynamic Software-Client
D.安裝靜態(tài)密碼圖:一旦密碼圖安裝好,它就可以支持客戶端連接了。然而,為了支持全密碼非安全流量處理,我們需要實現(xiàn)策略路由:
outlan-rt05(config)#int fastEthernet 0/0
outlan-rt05(config-if)#crypto map outlan-ipsec-gw05
*Dec 8 04:32:00.479: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
outlan-rt05(config-if)#exit
E:安裝路由策略:正如我們上面所提到的,為了處理離線流量,我們需要路由器在處理特定類型流量時忽略它的默認路由。這個技巧是通過創(chuàng)建一個流量匹配ACL和一個將匹配的流量指向另一個網(wǎng)關的簡單路由圖實現(xiàn)的:
outlan-rt05(config)#ip access-list extended redirect
outlan-rt05(config-ext-nacl)#permit tcp 5.0.0.0 0.0.0.255 any eq 80
outlan-rt05(config-ext-nacl)#permit tcp 5.0.0.0 0.0.0.255 any eq 443
outlan-rt05(config-ext-nacl)#permit tcp 5.0.0.0 0.0.0.255 any eq ftp
outlan-rt05(config)# route-map int-acc permit 10
outlan-rt05(config-route-map)#match ip address redirect
outlan-rt05(config-route-map)#set ip next-hop 172.30.40.1
outlan-rt05(config)#interface FastEthernet0/1
outlan-rt05(config-if)#ip policy route-map int-acc
outlan-rt05(config-if)#exit
outlan-rt05(config)#
這樣多策略VPN網(wǎng)關就配置好了。對于客戶端模板配置,管理員可能為每一個ISAKMP分別創(chuàng)建一個客戶端模板。下面是半隧道和全加密拓撲的啟動器文件:
[main]
Description= New_School_ST
Host=63.240.22.2
AuthType=1
GroupName=split-tunnel
GroupPwd=secretkey
TunnelingMode=1
TcpTunnelingPort=10000
[main]
Description=New_School_FC
Host=63.240.22.2
AuthType=1
GroupName=full-crypto
GroupPwd=secretkey
TunnelingMode=1
TcpTunnelingPort=443
這就完成了軟件客戶端VPN配置。
【編輯推薦】
- IPsec和SSL VPNs基礎知識理解
- 巧妙解決VPN網(wǎng)絡訪問故障兩例
- 您的企業(yè)網(wǎng)絡應該實現(xiàn)哪一種VPN?
- 一步到位 艾泰連鎖機構VPN解決方案(圖示)
- 中央人民廣播電臺采用Array SSL VPN解決方案