Cisco GETVPN
目錄
GET VPN簡介
GETVPN的優勢
GETVPN技術分為以下幾個核心組件:
實驗
驗證
GET VPN簡介
CISCO的組加密傳輸VPN提出了一個名叫信任組的概念,不再使用點到點隧道來承載路由信息。而是由所有的組成員(GMs)共享一個公用SA,在這里可以理解為一個組SA。這個特性將允許組內的成員解密其他成員發送過來的加密流量。同一個組的成員間不再需要協商點到點的IPSEC隧道。
IETF標準化文檔RFC 3547中的組解釋域Group Domain of Interpretation (GDOI)是GETVPN的最主要的部分。
GET VPN技術是公有開放標準和Cisco私有技術的結合產物,該技術發揮了底層MPLS和共享網絡的優勢。
GETVPN的優勢
GETVPN技術分為以下幾個核心組件:
- GDOI (RFC 3547)
- Key servers (KSs)
- Cooperative (COOP) KSs
- GMs
- IP tunnel header preservation
- Group security association
- Rekey mechanism
- Time-based anti-replay (TBAR)
GDOI:
GDOI組密鑰管理協議為一組設備提供了加密密鑰和策略的集合。在GET VPN的網絡中,GDOI分配一個公鑰到組內的其他VPN網關,來確保通信的安全性。組中的所有VPN網關使用一種叫做rekey的方法來定期的更新密鑰。
GDOI協議受階段1的IKE SA保護。所有的VPN網關必須使用IKE進行認證。并且支持所有的IKE認證方法(PSK,PKI)。當VPN網關被認證和通過IKE SA獲得密鑰后,IKE SA條目超時后,GDOI通過靈活有效的方法更新組成員。
GDOI包含兩種不同的加密密鑰,其中名為KEK的密鑰用來保護GET VPN的控制層面,另外一種名為TEK的密鑰用來加密數據流。
IP tunnel header preservation:
傳統意義上的IPSEC,隧道端點的地址被作為新的IP包的源和目的。數據包使用加密端的物理接口地址作為源地址,使用解密端的物理接口地址作為目的地址在IP網絡上進行路由(隧道模式)。在GET VPN解決方案中,IPSEC保護的數據包將原數據包中的源地址和目的地址復制一份作為整個IP包頭中的地址。
GET VPN數據包結構帶來的最大優越性表現在可以使用底層的網絡對GET VPN的數據包進行路由,分支機構中的高可用性技術可以和GET VPN解決方案無縫結合(如雙接入點雙鏈路等),不在需要在IPSec層面上實施高可用性的技術(如雙HUB點,狀態型高可用性IPSEC技術等)。
Key servers (KSs)
通常情況下IOS設備作為一個Key Server負責創建和維護GET VPN的控制層面。所有的加密策略包括:感興趣流,加密協議,SA,rekey間隔等等,都需要在KS上進行統一的定義并在組成員想KS注冊的時候將策略推送給組成員。
GET VPN是通過KS使用IKE第一階段來認證組成員,組成員在認證通過后將key和加密策略下載到組成員本地。KS同時負責Key的刷新和分發。
和傳統的IPSEC解決方案不同的是,GET VPN的感興趣流是通過ACL方式定義在KS上,無論GMs是否和KS屬于同一個子網內,該ACL都可以被下載到GMs路由器上。在定義感興趣流的ACL時,建議將GM成員的網絡匯總為盡可能的少的條目。例如如果組成員的網絡都位于10.0.0.0/8的網絡中(10.1.1.0/24,10.1.2.0/24等),最好將感興趣流定義為permit 10.0.0.0/8 to 10.0.0.0/8”,而不是10.1.1.0/24 to 10.1.2.0/24。非對稱的策略將導致ACL條目數量過于龐大,在這種情況下,為大多數組成員定義一個聚合策略是比較理想的策略實現方式。最少條目的聚合策略是permit ip any any,該策略加密GMs之間通信的流量,因此很多時候,我們需要定義排除的列表(使用Deny選項)使某些不需要與其他組成員通訊的數據不進行加密傳輸。
GMs:
前面已經提到,加密策略主要定義在KS上,當組成員向KS注冊時下載這些策略到GM成員的本地,而作為組成員來說,只需要定義IKE的第一階段和GDOI組信息。基于這些下載的加密策略,GM成員決定哪些流量將被加密和被解密,以及使用什么樣的key等。但是,在某些情況下,GM成員可以配置本地的策略來覆蓋通過KS得到的策略。例如,在組中的幾個成員間運行了路由協議,而這些參加路由協議的流量必須避開加密策略,這個時候我們需要在這些組成員上定義一些策略條目來避開全局的策略。
Group SA:
和傳統的IPSEC解決方案不同的是,GET VPN使用組SA的概念。所有GET VPN組內成員間的互相通信使用統一的加密策略和一條公共的SA。有了這些公共的策略,組成員間將不必再協商IPSEC隧道,這減少了路由器的資源消耗。
Rekey Process
以上我們提到,KS不僅僅負責創建加密策略和key,同時也負責更新和分發新key到組成員。當已存在的key超時后,KS將分發新的key到組成員,這個過程就被稱為rekey進程。GET VPN支持兩種類型的Rekey消息:單播和組播。
如果組成員不能從KS處收到rekey消息(例如KS服務器down或者網絡中斷),GM將在已存在的IPSEC SA超時前60秒嘗試向KS進行注冊。如果注冊成功,則組成員通過重注冊過程收到新的SA并且流量不會產生中斷。如果注冊不成功,則組成員會每間隔10秒嘗試向KS重試三次,如果依然不成功則在已存在的IPSEC SA超時前20秒時,嘗試向其他已定義的KS注冊。
Unicast Rekey
在單播Rekey的過程中,KS生成一個rekey消息并且將這個消息復制發送給每一個組成員。當組成員收到該消息后,返回一個ACK消息給KS。該機制不僅能確定在KS上注冊的活躍組成員是正確的,同時也能確定rekey消息只發送給了活躍的組成員。
KS在網絡出現短暫中斷的時候,會對Rekey數據包進行重傳。如果GM在KS發出的三次rekey的過程中不能響應,則KS會將該GM從活躍的GM數據庫中移除,并停止向該GM發送rekey消息。
Multicast Rekey
在組播Rekey的過程中,KS創建一個rekey消息并發送該消息到預先配置好的組播組地址。每一個加入這個組播組的GM,在向KS注冊的時候都會受到這個rekey消息的拷貝。
和單播rekey過程不同的是,組播rekey沒有ACK的機制。KS不會維護一個活躍的GM數據庫。和單播rekey過程相同的是,KS會對Rekey數據包進行重傳,已防止短暫的網絡中斷。
為了使用組播方式的rekey,必須在核心的網絡上打開組播功能。
COOP KSs
KS在整個GET VPN中扮演著最重要的角色,KS維護著整個GET VPN的控制層面。因此,僅有一臺KS時有可能會在VPN網絡中造成單點故障。GET VPN支持多個KS服務器,稱之為COOP KSs,用來確保如果主KS失效或者不可達的時侯,GET VPN的控制層面可以使主KS失效時無縫切換到其他的KS。
一個組成員可以配置多個活躍KS服務器,GM會對這個列表進行遞歸查詢。
COOP協議配置在每一個GDOI的基本組內,一個KS可以配置多個GDOI組用來維護多個KSs所關聯的不同的COOP列表。
當COOP KSs啟動后,所有的KSs都被假設為處于備用狀態并開始選舉主KS。優先級最高的KS被選舉為主KS,同時其他的KS都被置于備用狀態。主KS用來創建和分發組策略到所有的GM,并且和其他的COOP KSs進行周期性的同步。
COOP KSs之間交換一種單向的消息通告(從主KS到備用KS)。如果一個備用的KS在一段時間內不能收到主KS發送來的消息,備用的KS將嘗試聯系主KS并請求更新消息。如果主KS沒有響應,則COOP KSs間重新開始選舉,直到一個新的主KS被選舉出來。
建議在Coop KS內部配置DPD特性,該特性可以使主KS跟蹤和顯示其他的備用KS的狀態。但是需要注意的是在GM和KS之間該功能不是必須的同時也不支持該功能。
Time Based Anti-Replay
在傳統的IPSEC vpn解決方案中,防止回放攻擊的能力可以防止第三方惡意攻擊對IPSEC站點間IPSEC包進行抓包并回放從而造成的DOS攻擊。傳統的IPSEC VPN解決方案使用基于滑動窗口的計數器:發送者發送使用連續數值的數據包,接收者視同滑動窗口來確定這個包是否是被允許。
我們使用一種新的方法稱為基于時間的反回放攻擊來保護網絡不受第三人的攻擊。TBAR在KS上維護一個虛構的時間,所帶來的其中一個優點就是不需要在GET VPN的設備間使用NTP來同步時間。主KS為整個組建立并維護一個虛構的時間。主KS會在GM進行rekey更新的時候與GM成員進行虛構時間的同步。每一個GM成員都在數據包內包含一個虛構的時間戳。接收數據包的VPN網關會將數據包內的時間戳和自身與KS同步得到的時間戳進行比較,如果數據包內的時間戳比較晚,則丟棄該數據包。
實驗
配置思路
KS1創建 gdoi group2crypto gdoi group mygroup3//配置gdoi group(所有的KS和GM的ID必須一致)4 identity number 666665//配置本地路由器為KS服務器6 server local7 //定義本地服務器地址8 address ipv4 202.100.1.19 //Rekey基本配置 10 //配置對Rekey message進行簽名的RSA密鑰 11 rekey authentication mypubkey rsa GETVPN-KEY 12 //配置對Rekey message進行加密的算法,默認的HASH算法為SHA-1 13 rekey algorithm aes 256 14 //定義組播Rekey message的流量,注意默認為組播更新 15 rekey address ipv4 Multicast 16 //配置第一個IPSec SA策略(可以配置多個) 17 sa ipsec 1 18 //匹配感興趣流 19 match address ipv4 GETVPN-Traffic 20 //配置處理感興趣的策略 21 profile ipsecprofGM1crypto isakmp policy 102 authentication pre-share3//只需要配置所有KS的"isakmp keys"4crypto isakmp key ccie address 202.100.1.1 5crypto isakmp key ccie address 202.100.1.267crypto gdoi group mygroup8 identity number 66666 (所有的KS和GM的Key必須相同)9 server address ipv4 202.100.1.1(Primary KS) 10 server address ipv4 202.100.1.2(Secondary KS) 11 12GDOI為crypto map提供密鑰資源TEK 13crypto map cisco 10 gdoi 14調用GDOI Group 15 set group mygroup 16調用在感興趣流進出的接口上 17interface Ethernet0/0 18調用crypto map直接觸發注冊 19 crypto map cisco全部配置
hostname KS-1 ! crypto isakmp policy 10authentication pre-share crypto isakmp key qytangccies address 202.100.1.2 crypto isakmp key qytangccies address 202.100.2.1 crypto isakmp key qytangccies address 202.100.2.2 crypto isakmp key qytangccies address 202.100.3.1 crypto isakmp key qytangccies address 202.100.3.2 ! ! crypto ipsec transform-set QYT-Ttrans esp-3des esp-md5-hmac mode tunnel ! ! crypto ipsec profile ipsecprofset transform-set QYT-Ttrans ! crypto gdoi group mygroupidentity number 66666server localrekey algorithm aes 256rekey address ipv4 Multicastrekey retransmit 10 number 2rekey authentication mypubkey rsa GETVPN-KEYsa ipsec 1profile ipsecprofmatch address ipv4 GETVPN-Trafficreplay time window-size 3address ipv4 202.100.1.1redundancylocal priority 100peer address ipv4 202.100.1.2 ! crypto gdoi group VRF_Groupidentity number 88888server localrekey retransmit 10 number 2rekey authentication mypubkey rsa GETVPN-KEYrekey transport unicastsa ipsec 1! Incomplete! Match address is not configuredprofile ipsecprofmatch address ipv4 GETVPN_VRF_Trafficreplay time window-size 3address ipv4 202.100.1.2redundancylocal priority 100peer address ipv4 202.100.1.1 ! crypto gdoi group GM_Groupidentity number 99999server localrekey retransmit 10 number 2rekey authentication mypubkey rsa GETVPN-KEYrekey transport unicastsa ipsec 1profile ipsecprofmatch address ipv4 GETVPN-Trafficreplay time window-size 3address ipv4 202.100.1.1redundancylocal priority 100peer address ipv4 202.100.1.2 ! interface Loopback0ip address 172.16.100.1 255.255.255.0ip ospf network point-to-point ! router ospf 1network 172.16.100.0 0.0.0.255 area 0network 202.100.1.0 0.0.0.255 area 0 ! ip pim rp-address 202.100.1.2 ! ip access-list extended GETVPN-Trafficpermit ip 172.16.0.0 0.0.255.255 172.16.0.0 0.0.255.255 ip access-list extended GETVPN_VRF_Trafficpermit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255 ip access-list extended Multicastpermit udp host 202.100.1.1 eq 848 host 239.0.1.2 eq 848 ! End=============================================================================================================== hostname KS-2 ! crypto isakmp policy 10authentication pre-share crypto isakmp key qytangccies address 202.100.2.1 crypto isakmp key qytangccies address 202.100.2.2 crypto isakmp key qytangccies address 202.100.1.1 ! crypto ipsec transform-set cisco esp-3des esp-md5-hmac mode tunnel ! crypto ipsec profile ipsecprofset transform-set cisco ! crypto gdoi group mygroupidentity number 66666server localrekey algorithm aes 256rekey address ipv4 Multicastrekey retransmit 10 number 2rekey authentication mypubkey rsa GETVPN-KEYsa ipsec 1profile ipsecprofmatch address ipv4 GETVPN-Trafficreplay time window-size 3address ipv4 202.100.1.2redundancylocal priority 75peer address ipv4 202.100.1.1 ! crypto gdoi group VRF_Groupidentity number 88888server localrekey retransmit 10 number 2rekey authentication mypubkey rsa GETVPN-KEYrekey transport unicastsa ipsec 1! Incomplete! Match address is not configuredprofile ipsecprofmatch address ipv4 GETVPN_VRF_Trafficreplay time window-size 3address ipv4 202.100.1.2redundancylocal priority 100peer address ipv4 202.100.1.1 ! crypto gdoi group GM_Groupidentity number 99999server localrekey retransmit 10 number 2rekey authentication mypubkey rsa GETVPN-KEYrekey transport unicastsa ipsec 1profile ipsecprofmatch address ipv4 GETVPN-Trafficreplay time window-size 3address ipv4 202.100.1.2redundancylocal priority 75peer address ipv4 202.100.1.1 ! interface FastEthernet0/0ip address 202.100.1.2 255.255.255.0ip pim sparse-modeduplex full ! router ospf 1network 202.100.1.0 0.0.0.255 area 0 ! ip access-list extended GETVPN-Trafficpermit ip 172.16.0.0 0.0.255.255 172.16.0.0 0.0.255.255 ip access-list extended Multicastpermit udp host 202.100.1.2 eq 848 host 239.0.1.2 eq 848 ! end=============================================================================================================== hostname GM-1 ! crypto isakmp policy 10authentication pre-share crypto isakmp key qytangccies address 202.100.1.1 crypto isakmp key qytangccies address 202.100.1.2 ! crypto gdoi group mygroupidentity number 99999server address ipv4 202.100.1.1server address ipv4 202.100.1.2 ! ! crypto map cisco 10 gdoi set group mygroupmatch address GM_ACL ! interface Loopback0ip address 172.16.1.1 255.255.255.0ip ospf network point-to-point ! interface FastEthernet0/0no ip addressduplex full ! interface FastEthernet1/0ip address 202.100.2.1 255.255.255.0ip pim sparse-modeduplex fullcrypto map cisco ! router ospf 1network 172.16.1.0 0.0.0.255 area 0network 202.100.2.0 0.0.0.255 area 0 ! ip access-list extended GM_ACLdeny ip 172.16.1.0 0.0.0.255 172.16.100.0 0.0.0.255 !end=============================================================================================================== hostname GM-2 ! crypto isakmp policy 10authentication pre-share crypto isakmp key qytangccies address 202.100.1.1 crypto isakmp key qytangccies address 202.100.1.2 ! crypto gdoi group mygroupidentity number 99999server address ipv4 202.100.1.1server address ipv4 202.100.1.2 ! crypto map cisco 10 gdoi set group mygroup ! interface Loopback0ip address 172.16.2.1 255.255.255.0ip ospf network point-to-point ! interface FastEthernet1/0ip address 202.100.2.2 255.255.255.0ip pim sparse-modeduplex fullcrypto map cisco ! router ospf 1network 172.16.2.0 0.0.0.255 area 0network 202.100.2.0 0.0.0.255 area 0 ! ip forward-protocol nd ! ! no ip http server no ip http secure-server ip pim rp-address 202.100.1.2 ! End =============================================================================================================== hostname VRF-GM-1 ! ip vrf MGMTrd 10:10 ! ip vrf Site-1rd 11:11 ! ip vrf Site-2rd 22:22 ! key chain cciekey 1key-string cisco ! crypto keyring getvpn vrf MGMT pre-shared-key address 202.100.1.1 key qytangcciespre-shared-key address 202.100.1.2 key qytangccies ! crypto isakmp policy 10authentication pre-share ! crypto gdoi group VRF_Groupidentity number 88888server address ipv4 202.100.1.1server address ipv4 202.100.2.2client registration interface FastEthernet0/0.10 ! crypto map cisco 10 gdoi set group VRF_Groupinterface Loopback100ip vrf forwarding Site-1ip address 192.168.1.1 255.255.255.0 ! interface Loopback200ip vrf forwarding Site-2ip address 192.168.1.1 255.255.255.0 ! interface FastEthernet0/0.10encapsulation dot1Q 10ip vrf forwarding MGMTip address 202.100.3.1 255.255.255.0 ! interface FastEthernet0/0.11encapsulation dot1Q 11ip vrf forwarding Site-1ip address 10.1.1.1 255.255.255.0ip authentication key-chain eigrp 11 cciecrypto map cisco ! interface FastEthernet0/0.22encapsulation dot1Q 22ip vrf forwarding Site-2ip address 10.1.1.1 255.255.255.0ip authentication mode eigrp 22 md5ip authentication key-chain eigrp 22 cciecrypto map cisco ! router eigrp 22 ! router eigrp 1122!address-family ipv4 vrf Site-1 autonomous-system 11network 10.1.1.0 0.0.0.255network 192.168.1.0exit-address-family!address-family ipv4 vrf Site-2 autonomous-system 22network 10.1.1.0 0.0.0.255network 192.168.1.0exit-address-family ! ip route vrf MGMT 202.100.1.0 255.255.255.0 202.100.3.10 ! end =============================================================================================================== hostname VRF-GM-2 ! ip vrf MGMTrd 10:10 ! ip vrf Site-1rd 11:11 ! ip vrf Site-2rd 22:22! ! key chain cciekey 1key-string cisco! crypto keyring getvpn vrf MGMT pre-shared-key address 202.100.1.1 key qytangcciespre-shared-key address 202.100.1.2 key qytangccies ! crypto isakmp policy 10authentication pre-share ! crypto gdoi group VRF_Groupidentity number 88888server address ipv4 202.100.1.1server address ipv4 202.100.2.2client registration interface FastEthernet0/0.10 ! crypto map cisco 10 gdoi set group VRF_Group ! interface Loopback100ip vrf forwarding Site-1ip address 192.168.2.1 255.255.255.0 ! interface Loopback200ip vrf forwarding Site-2ip address 192.168.2.1 255.255.255.0 ! interface FastEthernet0/0.10encapsulation dot1Q 10ip vrf forwarding MGMTip address 202.100.3.2 255.255.255.0 ! interface FastEthernet0/0.11encapsulation dot1Q 11ip vrf forwarding Site-1ip address 10.1.1.2 255.255.255.0ip authentication key-chain eigrp 11 cciecrypto map cisco ! interface FastEthernet0/0.22encapsulation dot1Q 22ip vrf forwarding Site-2ip address 10.1.1.2 255.255.255.0ip authentication mode eigrp 22 md5ip authentication key-chain eigrp 22 cciecrypto map cisco ! router eigrp 1122!address-family ipv4 vrf Site-1 autonomous-system 11network 10.1.1.0 0.0.0.255network 192.168.2.0exit-address-family! address-family ipv4 vrf Site-2 autonomous-system 22network 10.1.1.0 0.0.0.255network 192.168.2.0exit-address-family ! ip forward-protocol nd ! ip route vrf MGMT 202.100.1.0 255.255.255.0 202.100.3.10 ! end===============================================================================================================ASA interface GigabitEthernet0/0nameif insidesecurity-level 100ip address 202.100.1.10 255.255.255.0 ! interface GigabitEthernet0/1nameif outsidesecurity-level 0ip address 202.100.2.10 255.255.255.0 ! interface GigabitEthernet0/2nameif dmzsecurity-level 50ip address 202.100.3.10 255.255.255.0 ! access-list out extended permit icmp any any access-list out extended permit udp any any eq 848 access-list dmz extended permit icmp any any access-list dmz extended permit udp any any eq 848 access-group out in interface outside access-group dmz in interface dmz router ospf 1network 202.100.1.0 255.255.255.0 area 0network 202.100.2.0 255.255.255.0 area 0network 202.100.3.0 255.255.255.0 area 0驗證
總結
以上是生活随笔為你收集整理的Cisco GETVPN的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 百度贴吧顶帖,没了发发久依然有办法!
- 下一篇: 计算机应用设计大赛获奖信息,北京大学第六