Hướng dẫn Cấu hình VPN client to site (Remote Access VPN) bằng packet tracer

Mô hình :

Ở đây ta sử dụng laptop VPN Client sử dụng wireless bên ngoài Internet có thể kết nối VPN về hệ thống mạng nội bộ ở trụ sở (HQ). Để giả lập môi trường Internet ta sử dụng Router ISP giả lập router ISP 

Cấu hình cơ bản:

Router ISP:
hostname ISP
!
interface FastEthernet0/0
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 203.162.1.1 255.255.255.252

Router HQ:
hostname HQ
!
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.0
!
interface FastEthernet0/1
ip address 203.162.1.2 255.255.255.252
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/1 

Cấu hình VPN client-to-site trên router HQ:

1. Bật chứng thực AAA trên Router HQ sử dụng phương thức chứng thực local

HQ(config)# username cisco password cisco 
HQ(config)# aaa new-model 
HQ(config)# aaa authentication login default local none

2. Tạo IP pool cho VPN client sử dụng để kết nối VPN:

HQ(config)# ip local pool VPNCLIENTS 172.16.1.10 172.16.1.20

4. Cấu hình Group Authorization (nhóm thẩm định với VPN Server):

HQ(config)# aaa authorization network VPNAUTH local

5. Tạo 1 IKE Policy và Group (sử dụng pre-share key và dùng AES để mã hóa với 256 bit)

HQ(config)# crypto isakmp policy 10 
HQ(config-isakmp)# authentication pre-share 
HQ(config-isakmp)# encryption aes 256 
HQ(config-isakmp)# group 2

6. Tạo ISAKMP group là ttggroup và password 123:

HQ(config)# crypto isakmp client configuration group ttggroup
HQ(config-isakmp-group)# key 123 
HQ(config-isakmp-group)# pool VPNCLIENTS 
HQ(config-isakmp-group)# netmask 255.255.255.0

7. Cấu hình IPSec Transform sử dụng thuật toán mã hóa 3DES và SHA-HMAC để đảm bảo tính toàn vẹn dữ liệu:

HQ(config)# crypto ipsec transform-set mytrans esp-3des esp-sha-hmac 

8. Tạo 1 Dynamic Crypto Map:

HQ(config)# crypto dynamic-map mymap 10 
HQ(config-crypto-map)# set transform-set mytrans 
HQ(config-crypto-map)# reverse-route

HQ(config)# crypto map mymap client configuration address respond 
HQ(config)# crypto map mymap isakmp authorization list VPNAUTH 
HQ(config)# crypto map mymap 10 ipsec-isakmp dynamic mymap

9. Cấu hình user chứng thực

HQ(config)# aaa authentication login VPNAUTH local 
HQ(config)# username quang password 123
HQ(config)# crypto map mymap client authentication list VPNAUTH

10. Cài đặt VPN Client : 

Thế này là kết nối thành công:

Tiến hành ping từ VPN Client đến Server 0:

Lưu ý : Nếu sử dụng thiết bị thật thì có thể dùng phần mềm cisco VPN Client tham khảo và tải ở đây:

http://truongtan.edu.vn/forum/showthread...-0-07-0290

Kiểm tra hoạt động VPN:

Code:

HQ#show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst             src             state          conn-id slot status
192.168.10.11   203.162.1.2     QM_IDLE           1070    0 ACTIVE
IPv6 Crypto ISAKMP SA
HQ#
 

Code:

HQ#show crypto ipsec sa

interface: FastEthernet0/1
Crypto map tag: mymap, local addr 203.162.1.2

protected vrf: (none)
local  ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
remote  ident (addr/mask/prot/port): (172.16.1.12/255.255.255.255/0/0)
current_peer 192.168.10.11 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 0, #pkts encrypt: 0, #pkts digest: 0
#pkts decaps: 0, #pkts decrypt: 0, #pkts verify: 0
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0

local crypto endpt.: 203.162.1.2, remote crypto endpt.:192.168.10.11
path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/1
current outbound spi: 0x1F2703F6(522650614)

inbound esp sas:
spi: 0x35592B74(895036276)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2006, flow_id: FPGA:1, crypto map: mymap
sa timing: remaining key lifetime (k/sec): (4525504/1521)
IV size: 16 bytes
replay detection support: N
Status: ACTIVE

inbound ah sas:

inbound pcp sas:

outbound esp sas:
spi: 0x1F2703F6(522650614)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2007, flow_id: FPGA:1, crypto map: mymap
sa timing: remaining key lifetime (k/sec): (4525504/1521)
IV size: 16 bytes
replay detection support: N
Status: ACTIVE

outbound ah sas:

outbound pcp sas:
HQ#


Các bạn có thể tham khảo file packet tracer (chạy trên packet tracer 5.3.3)
http://www.mediafire.com/?8v5jpy6u64ou9yw

Cảm ơn, chào thân ái và đoàn kết. :tp53::tp53::tp53:

4 Nhận xét

  1. bài viết rất hay và hữu ích

    ---------------
    118/17 Trần Quang Diệu, P.14, Q.3, HCM
    Hotline: 0906.112.812 - 0909730124 (A MINH)
    Cung cấp các sản phẩm laptop sỉ và lẻ tại TPHCM
    CLICK xem chi tiết: Mua laptop cu giá rẻ hoặc mua laptop cu gia re
    News

    Trả lờiXóa
  2. pass HQ la gi the?

    Trả lờiXóa
  3. Anh cho em hỏi, tạo crypto map mà không cần add vào interface ạ ?

    Trả lờiXóa

Đăng nhận xét

Mới hơn Cũ hơn