Ez***_over_asa

實驗目的

通過ez*** client客戶端和公司建立連接,獲得server分配的一個ip地址來訪問公司內網。

實驗拓撲:

 

   

實驗配置:

ASA服務端配置:

ciscoasa(config)# sh run

interface Vlan1           //真機下只能藉助於vlan配置接口地址,在接口下劃分vlan即可

 nameif inside

 security-level 100

 ip address 10.10.10.1 255.255.255.0 

!

interface Vlan2

 nameif outside

 security-level 0

 ip address 1.1.1.2 255.255.255.0 

!

interface Ethernet0/0                    //outside接口

 switchport access vlan 2

interface Ethernet0/1                    //inside接口

 switchport access vlan 1

access-list nonat extended permit ip 10.10.10.0 255.255.255.0 10.10.11.0 255.255.255.0

nat (inside) 0 access-list nonat              //***流量不進行nat,否則無法通信。

nat (inside) 1 0.0.0.0 0.0.0.0               //配置nat轉換

global (outside) 1 interface                //pat

//用於隧道分離,正常當問外網

access-list 100 extended permit ip 10.10.10.0 255.255.255.0 any  

ip local pool test 10.10.11.10-10.10.11.20  //定義client接入是獲取的地址池

crypto isakmp policy 10               //定義階段一策略

 authentication pre-share

 encryption 3des

 hash sha

 group 2

crypto ipsec transform-set myset esp-3des esp-sha-hmac   //轉換集

crypto dynamic-map dmap 1 set transform-set myset      //動態map

crypto dynamic-map dmap 1 set reverse-route

crypto map mymap 1 ipsec-isakmp dynamic dmap   //靜態map調用dynamic map

crypto map mymap interface outside              //outside接口下應用map

crypto isakmp enable outside

group-policy mypolicy internal                  //定義組策略

group-policy mypolicy attributes

 split-tunnel-policy tunnelspecified               //配置隧道分離策略

 split-tunnel-network-list value 100               //配置隧道分離流量

 default-domain value gezi.com

 address-pools value test

username xiaomeng password KQ0c1Ql7yB6uQTZX encrypted  //創建用戶登錄

username xiaomeng attributes

 ***-group-policy mypolicy

tunnel-group meng type remote-access

tunnel-group meng general-attributes

 default-group-policy mypolicy

 authentication-server-group local            //調用本地用戶組登錄

tunnel-group meng ipsec-attributes

 pre-shared-key *

實驗驗證:

接入成功的tunnel信息:包含獲取到的ip地址和server地址(ASA outside接口地址)

ciscoasa# sh crypto isakmp sa

   Active SA: 1

    Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)

Total IKE SA: 1

1   IKE Peer: 1.1.1.138

    Type    : user            Role    : responder 

Rekey   : no              State   : AM_ACTIVE

ciscoasa# sh crypto ipsec sa

interface: outside

    Crypto map tag: dmap, seq num: 1, local addr: 1.1.1.2

      localremote端的信息

      local ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)

      remote ident (addr/mask/prot/port): (10.10.11.10/255.255.255.255/0/0)

      current_peer: 1.1.1.138, username: xiaomeng

      dynamic allocated peer ip: 10.10.11.10

      #pkts encaps: 5, #pkts encrypt: 5, #pkts digest: 5

      #pkts decaps: 8, #pkts decrypt: 8, #pkts verify: 8

      #pkts compressed: 0, #pkts decompressed: 0

      #pkts not compressed: 5, #pkts comp failed: 0, #pkts decomp failed: 0

      #pre-frag successes: 0, #pre-frag failures: 0, #fragments created: 0

      #PMTUs sent: 0, #PMTUs rcvd: 0, #decapsulated frgs needing reassembly: 0

      #send errors: 0, #recv errors: 0

      local crypto endpt.: 1.1.1.2, remote crypto endpt.: 1.1.1.138  //真實網卡地址

      path mtu 1500, ipsec overhead 58, media mtu 1500

      current outbound spi: 1B906805

    inbound esp sas:

      spi: 0x244ED9B4 (609147316)

         transform: esp-3des esp-sha-hmac no compression 

         in use settings ={RA, Tunnel, }

         slot: 0, conn_id: 4096, crypto-map: dmap

         sa timing: remaining key lifetime (sec): 27739

         IV size: 8 bytes

         replay detection support: Y

         Anti replay bitmap: 

          0x00000000 0x000001FF

    outbound esp sas:

      spi: 0x1B906805 (462448645)

         transform: esp-3des esp-sha-hmac no compression 

         in use settings ={RA, Tunnel, }

         slot: 0, conn_id: 4096, crypto-map: dmap

         sa timing: remaining key lifetime (sec): 27739

         IV size: 8 bytes

         replay detection support: Y

         Anti replay bitmap: 

          0x00000000 0x00000001

ciscoasa# sh route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

Gateway of last resort is not set

C    1.1.1.0 255.255.255.0 is directly connected, outside

S    10.10.11.10 255.255.255.255 [1/0] via 1.1.1.138, outside  //自動生成一條靜態路由

C    10.10.10.0 255.255.255.0 is directly connected, inside

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章