SlideShare a Scribd company logo
1 of 11
VPN site to site giữa ASA và Draytek
Hôm nay mượn được con draytek nên làm vài bài lab cho phê
I. Sơ đồ và yêu cầu
1. Sơ đồ
2. Yêu cầu
- Thực hiện VPN site to site giữa ASA và Draytek (mình dùng con Vigor 2920 vì mình mới
được cho mượn con này xài )
- Client truy cập lẫn nhau được
II. Triển khai
1. Cấu hình Draytek
- Thiết lập IP WAN cho Vigor 2920 trên interface WAN 2 có IP: 200.0.0.2/24
- Thiết lập IP LAN cho Vigor
- Cấu hình VPN trên Draytek
- Vào mục VPN and Remote Access >> LAN to LAN >> Click chọn index 1.
- Chọn cấu hình dial in hoặc dial out tùy mục địch config của bạn. Và kết nối VPN bằng
interface WAN2.
 Profile Name: đặt tên profile để tiện việc quản lý.
 Enable: để kích hoạt Profile.
 Dial-out: để báo cho router biết chức năng của nó là Dial-out, và chút nữa
chúng ta chỉ cần quan tâm phần cấu hình Dial-out trong profile này.
- Chuyển xuống mục Dial-out settings (bỏ qua phần Dial-in setting). Chọn IPSec Tunnel
để thiết lập kênh VPN theo giao thức IPsec.
- Chú ý chọn chỗ mũi tên số 1 (pre-share key giữa ASA và draytek phải giống nhau) và số 2
(kiểu mã hóa, thuật toán băm và chứng thực phải giống với ASA) nếu không nó sẽ ko chạy
được
- Pharse 1 mình sẽ chọn
 main mode
 Mã hóa theo thuật toán 3DES
 Thuật toán băm là MD5
 Thuật toán trao đổi khóa diffie hellman là group 2
- Các bạn chú chọn cho đúng để chút config bên ASA phải giống nếu không nó không chạy
được lại khổ
- Tiếp tục xuống phần TCP/IP settings (Bỏ qua các mục cấu hình khác)
 Ở phần này ta sẽ báo cho Router biết mạng local ở đầu xa có địa chỉ là bao
nhiêu.
 Điền 192.168.1.0 vào khung Remote Network IP ( Địa chỉ mạng ở đầu xa - IP
inside của ASA).
 Điền 255.255.255.0 vào khung Remote Network Mask.
 Điền 10.1.1.0 vào khung Local Network IP.
 Click OK để lưu các mục vừa cấu hình.
2. Cấu hình ASA
- Cấu hình IP cho ASA
ciscoasa(config)# interface g0
ciscoasa(config-if)# nameif outside
ciscoasa(config-if)# ip address 200.0.0.1 255.255.255.0
ciscoasa(config-if)# no shutdown
ciscoasa(config-if)# int g1
ciscoasa(config-if)# nameif inside
ciscoasa(config-if)# ip address 192.168.1.1 255.255.255.0
ciscoasa(config-if)# no shutdown
- Cấu hình VPN cho ASA
ciscoasa(config)# crypto ikev1 policy 10
ciscoasa(config-ikev1-policy)# authentication pre-share
ciscoasa(config-ikev1-policy)# encryption 3des
ciscoasa(config-ikev1-policy)# hash md5
ciscoasa(config-ikev1-policy)# group 2
ciscoasa(config-ikev1-policy)# lifetime 86400
ciscoasa(config)# crypto ikev1 enable outside
ciscoasa(config-ikev1-policy)# crypto ipsec ikev1 transform-set SVUIT esp-3des esp-md5-hmac
ciscoasa(config)# object network INSIDE-ASA
ciscoasa(config-network-object)# subnet 192.168.1.0 255.255.255.0
ciscoasa(config-network-object)# object network INSIDE-Draytek
ciscoasa(config-network-object)# subnet 10.2.2.0 255.255.255.0
ciscoasa(config)# access-list VPN-TRAFFIC permit ip object INSIDE-ASA object INSIDE-Draytek
ciscoasa(config)# crypto map ASA-VPN 10 match address VPN-TRAFFIC
ciscoasa(config)# crypto map ASA-VPN 10 set peer 200.0.0.2
ciscoasa(config)# crypto map ASA-VPN 10 set ikev1 transform-set SVUIT
ciscoasa(config)# crypto map ASA-VPN interface outside
ciscoasa(config)# tunnel-group 200.0.0.2 type ipsec-l2l
ciscoasa(config)# tunnel-group 200.0.0.2 ipsec-attributes
ciscoasa(config-tunnel-ipsec)# ikev1 pre-shared-key svuit.com
3. Kiểm tra
- Client trong Draytek thực hiện truy cập web server trong vùng inside của ASA thành công
4. Kiếm tra và Lỗi
- Nếu VPN thành công bạn hãy kiểm tra trạng thái Crypto ikev1
Code:
ciscoasa# sh crypto ikev1 sa
IKEv1 SAs:
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: 200.0.0.2
Type : L2L Role : responder
Rekey : no State : MM_ACTIVE
- Trạng thái IPsec
Code:
ciscoasa# sh ipsec sa
interface: outside
Crypto map tag: ASA-VPN, seq num: 10, local addr: 200.0.0.1
access-list VPN-TRAFFIC extended permit ip 192.168.1.0 255.255.255.0 10.1.1.0
255.255.255.0
local ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (10.1.1.0/255.255.255.0/0/0)
current_peer: 200.0.0.2
#pkts encaps: 6, #pkts encrypt: 6, #pkts digest: 6
#pkts decaps: 238, #pkts decrypt: 238, #pkts verify: 238
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 6, #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: 228
local crypto endpt.: 200.0.0.1/0, remote crypto endpt.: 200.0.0.2/0
path mtu 1500, ipsec overhead 58, media mtu 1500
current outbound spi: 8251B9F0
current inbound spi : 8595387F
inbound esp sas:
spi: 0x8595387F (2241149055)
transform: esp-3des esp-md5-hmac no compression
in use settings ={L2L, Tunnel, }
slot: 0, conn_id: 16384, crypto-map: ASA-VPN
sa timing: remaining key lifetime (sec): 28614
IV size: 8 bytes
replay detection support: Y
Anti replay bitmap:
0xFFFFFFFF 0xFFFFFFFF
outbound esp sas:
spi: 0x8251B9F0 (2186394096)
transform: esp-3des esp-md5-hmac no compression
in use settings ={L2L, Tunnel, }
slot: 0, conn_id: 16384, crypto-map: ASA-VPN
sa timing: remaining key lifetime (sec): 28614
IV size: 8 bytes
replay detection support: Y
Anti replay bitmap:
0x00000000 0x00000001
- Nếu bạn VPN không thành công thì hãy thử debug xem nó thế nào nhé
ciscoasa# debug crypto ikev1 255
- Ví dụ như lỗi ở hình dưới đây là do ở pharse 1 việc chọn thuật toán mã hõa, băm hoặc
group diffi không đúng nên vpn thất bại

More Related Content

What's hot

Cau hinh nat tren router cisco
Cau hinh nat tren router ciscoCau hinh nat tren router cisco
Cau hinh nat tren router ciscotuanla79vn
 
Vpn Site-to-site trên Cisco
Vpn Site-to-site trên CiscoVpn Site-to-site trên Cisco
Vpn Site-to-site trên CiscoTài Bùi
 
Báo cáo thực tập tuần 7 - 8 tại athena - đàm văn sáng
Báo cáo thực tập tuần 7 - 8 tại athena - đàm văn sángBáo cáo thực tập tuần 7 - 8 tại athena - đàm văn sáng
Báo cáo thực tập tuần 7 - 8 tại athena - đàm văn sángĐàm Văn Sáng
 
Dokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondoc
Dokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondocDokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondoc
Dokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondocBRBAC
 
Tích hợp microsoft lync, asterisk va skype
Tích hợp microsoft lync, asterisk va skypeTích hợp microsoft lync, asterisk va skype
Tích hợp microsoft lync, asterisk va skypelaonap166
 
Basic cau hinh ip tren solaris
Basic cau hinh ip tren solarisBasic cau hinh ip tren solaris
Basic cau hinh ip tren solarisBui Van Cuong
 
Cau hinh iptv msan
Cau hinh iptv msanCau hinh iptv msan
Cau hinh iptv msanNguyên Tùy
 
Báo cáo thực tập tuần 4
Báo cáo thực tập tuần 4Báo cáo thực tập tuần 4
Báo cáo thực tập tuần 4tran thai
 
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...VNG
 
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...VNG
 
Báo cáo thực tập tuần 3
Báo cáo thực tập tuần 3Báo cáo thực tập tuần 3
Báo cáo thực tập tuần 3duytruyen1993
 
Cisco vpn client to site by woonshine
Cisco vpn client to site by woonshineCisco vpn client to site by woonshine
Cisco vpn client to site by woonshinewoonshine
 
Lab static-route
Lab static-routeLab static-route
Lab static-routeTài Bùi
 
Lab 1 nbar – khám phá những lưu lượng chạy qua router
Lab 1  nbar – khám phá những lưu lượng chạy qua routerLab 1  nbar – khám phá những lưu lượng chạy qua router
Lab 1 nbar – khám phá những lưu lượng chạy qua routerVNG
 
Cài đặt gns3 tích hợp iou 2016
Cài đặt gns3 tích hợp iou 2016Cài đặt gns3 tích hợp iou 2016
Cài đặt gns3 tích hợp iou 2016laonap166
 
Cấu hình cisco auto qos (cisco ios software)
Cấu hình cisco auto qos (cisco ios software)Cấu hình cisco auto qos (cisco ios software)
Cấu hình cisco auto qos (cisco ios software)VNG
 

What's hot (19)

Cau hinh nat tren router cisco
Cau hinh nat tren router ciscoCau hinh nat tren router cisco
Cau hinh nat tren router cisco
 
Vpn Site-to-site trên Cisco
Vpn Site-to-site trên CiscoVpn Site-to-site trên Cisco
Vpn Site-to-site trên Cisco
 
Báo cáo thực tập tuần 7 - 8 tại athena - đàm văn sáng
Báo cáo thực tập tuần 7 - 8 tại athena - đàm văn sángBáo cáo thực tập tuần 7 - 8 tại athena - đàm văn sáng
Báo cáo thực tập tuần 7 - 8 tại athena - đàm văn sáng
 
Dokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondoc
Dokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondocDokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondoc
Dokumen.tips cau hinh-dich-vu-tren-thiet-bi-gpondoc
 
Tích hợp microsoft lync, asterisk va skype
Tích hợp microsoft lync, asterisk va skypeTích hợp microsoft lync, asterisk va skype
Tích hợp microsoft lync, asterisk va skype
 
Basic cau hinh ip tren solaris
Basic cau hinh ip tren solarisBasic cau hinh ip tren solaris
Basic cau hinh ip tren solaris
 
Cau hinh iptv msan
Cau hinh iptv msanCau hinh iptv msan
Cau hinh iptv msan
 
Báo cáo thực tập tuần 4
Báo cáo thực tập tuần 4Báo cáo thực tập tuần 4
Báo cáo thực tập tuần 4
 
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
 
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
Lab 7 cấu hình thực hiện cuộc gọi giữa 2 vùng được quản lý bởi 2 gatekeeper (...
 
Báo cáo thực tập tuần 3
Báo cáo thực tập tuần 3Báo cáo thực tập tuần 3
Báo cáo thực tập tuần 3
 
Eigrp
EigrpEigrp
Eigrp
 
Cisco vpn client to site by woonshine
Cisco vpn client to site by woonshineCisco vpn client to site by woonshine
Cisco vpn client to site by woonshine
 
Lab static-route
Lab static-routeLab static-route
Lab static-route
 
Bao cao final
Bao cao finalBao cao final
Bao cao final
 
Lab 1 nbar – khám phá những lưu lượng chạy qua router
Lab 1  nbar – khám phá những lưu lượng chạy qua routerLab 1  nbar – khám phá những lưu lượng chạy qua router
Lab 1 nbar – khám phá những lưu lượng chạy qua router
 
Báo cáo tuần 2
Báo cáo tuần 2Báo cáo tuần 2
Báo cáo tuần 2
 
Cài đặt gns3 tích hợp iou 2016
Cài đặt gns3 tích hợp iou 2016Cài đặt gns3 tích hợp iou 2016
Cài đặt gns3 tích hợp iou 2016
 
Cấu hình cisco auto qos (cisco ios software)
Cấu hình cisco auto qos (cisco ios software)Cấu hình cisco auto qos (cisco ios software)
Cấu hình cisco auto qos (cisco ios software)
 

Viewers also liked

GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...
GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...
GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...laonap166
 
Iceland Gender Equality
Iceland Gender EqualityIceland Gender Equality
Iceland Gender EqualityAlex Schmaltz
 
Paradigmeskiftet- en grundfortælling
Paradigmeskiftet- en grundfortællingParadigmeskiftet- en grundfortælling
Paradigmeskiftet- en grundfortællingFlemming Hartwich
 
Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...
Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...
Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...richardgmorris
 
Lokpal bill and the role of civil society
Lokpal bill and the role of civil societyLokpal bill and the role of civil society
Lokpal bill and the role of civil societyUmesh Bhosale
 
Nordic Innovation lighthouse project: Innovative Nordic digital solutions
Nordic Innovation lighthouse project: Innovative Nordic digital solutionsNordic Innovation lighthouse project: Innovative Nordic digital solutions
Nordic Innovation lighthouse project: Innovative Nordic digital solutionsRie Aleksandra Walle
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark Kilgard
 
SEO Local : salon E-tourisme 2014
SEO Local : salon E-tourisme 2014SEO Local : salon E-tourisme 2014
SEO Local : salon E-tourisme 2014Aurélien Delefosse
 

Viewers also liked (15)

GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...
GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...
GPO - Adding Local intranet, Trusted Sites to Internet Explorer Using Group P...
 
Iceland Gender Equality
Iceland Gender EqualityIceland Gender Equality
Iceland Gender Equality
 
Paradigmeskiftet- en grundfortælling
Paradigmeskiftet- en grundfortællingParadigmeskiftet- en grundfortælling
Paradigmeskiftet- en grundfortælling
 
Quantumoftheseas
QuantumoftheseasQuantumoftheseas
Quantumoftheseas
 
Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...
Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...
Mobility Measurements Probe Conformational Changes in Membrane-embedded prote...
 
Lei container
Lei containerLei container
Lei container
 
Lokpal bill and the role of civil society
Lokpal bill and the role of civil societyLokpal bill and the role of civil society
Lokpal bill and the role of civil society
 
Unique Sofa Collection from ‪‎Preksh‬
Unique Sofa Collection from ‪‎Preksh‬Unique Sofa Collection from ‪‎Preksh‬
Unique Sofa Collection from ‪‎Preksh‬
 
The believers authority
The believers authority  The believers authority
The believers authority
 
Nordic Innovation lighthouse project: Innovative Nordic digital solutions
Nordic Innovation lighthouse project: Innovative Nordic digital solutionsNordic Innovation lighthouse project: Innovative Nordic digital solutions
Nordic Innovation lighthouse project: Innovative Nordic digital solutions
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 
Normandie
NormandieNormandie
Normandie
 
SEO Local : salon E-tourisme 2014
SEO Local : salon E-tourisme 2014SEO Local : salon E-tourisme 2014
SEO Local : salon E-tourisme 2014
 
cv edited[1]
cv edited[1]cv edited[1]
cv edited[1]
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
 

Similar to Vpn site to site giữa asa và draytek

đinh tuyến tĩnh và định tuyến động
đinh tuyến tĩnh và định tuyến độngđinh tuyến tĩnh và định tuyến động
đinh tuyến tĩnh và định tuyến độngnguyenhoangbao
 
Bai thuc hanh 1 4
Bai thuc hanh 1 4Bai thuc hanh 1 4
Bai thuc hanh 1 4Gió Lạnh
 
Basic cau hinh ip tren solaris
Basic cau hinh ip tren solarisBasic cau hinh ip tren solaris
Basic cau hinh ip tren solarisBui Van Cuong
 
Khái niệm về vlan và cách cấu hình các vlan
Khái niệm về vlan và cách cấu hình các vlanKhái niệm về vlan và cách cấu hình các vlan
Khái niệm về vlan và cách cấu hình các vlanlaonap166
 
Gatekeeper
GatekeeperGatekeeper
GatekeeperVNG
 
Vigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsec
Vigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsecVigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsec
Vigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipseclaonap166
 
Cấu hình nat – pt
Cấu hình nat – ptCấu hình nat – pt
Cấu hình nat – ptHate To Love
 
Tìm Hiểu WLAn, Giao Thức Radius, Mikrotik Router
Tìm Hiểu WLAn, Giao Thức Radius, Mikrotik RouterTìm Hiểu WLAn, Giao Thức Radius, Mikrotik Router
Tìm Hiểu WLAn, Giao Thức Radius, Mikrotik RouterLe Trung Hieu
 
Network address translatio
Network address translatioNetwork address translatio
Network address translatiotranlethuynga
 
Báo cáo thưc tập tuần 1
Báo cáo thưc tập tuần 1Báo cáo thưc tập tuần 1
Báo cáo thưc tập tuần 1td1021
 
Cau hinh router coban
Cau hinh router coban Cau hinh router coban
Cau hinh router coban Hate To Love
 
Load balancing 2 line adsl với draytek vigor 2910
Load balancing 2 line adsl với draytek vigor 2910Load balancing 2 line adsl với draytek vigor 2910
Load balancing 2 line adsl với draytek vigor 2910laonap166
 
Báo cáo thực tập tuần 6
Báo cáo thực tập tuần 6Báo cáo thực tập tuần 6
Báo cáo thực tập tuần 6Quân Quạt Mo
 
Cấu hình Router cơ bản(Cisco)
Cấu hình Router cơ bản(Cisco)Cấu hình Router cơ bản(Cisco)
Cấu hình Router cơ bản(Cisco)NamPhmHoi1
 

Similar to Vpn site to site giữa asa và draytek (20)

đinh tuyến tĩnh và định tuyến động
đinh tuyến tĩnh và định tuyến độngđinh tuyến tĩnh và định tuyến động
đinh tuyến tĩnh và định tuyến động
 
Bai thuc hanh 1 4
Bai thuc hanh 1 4Bai thuc hanh 1 4
Bai thuc hanh 1 4
 
địNh tuyến tĩnh
địNh tuyến tĩnhđịNh tuyến tĩnh
địNh tuyến tĩnh
 
Basic cau hinh ip tren solaris
Basic cau hinh ip tren solarisBasic cau hinh ip tren solaris
Basic cau hinh ip tren solaris
 
Khái niệm về vlan và cách cấu hình các vlan
Khái niệm về vlan và cách cấu hình các vlanKhái niệm về vlan và cách cấu hình các vlan
Khái niệm về vlan và cách cấu hình các vlan
 
Gatekeeper
GatekeeperGatekeeper
Gatekeeper
 
Vigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsec
Vigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsecVigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsec
Vigor3900 vigor2920-cau-hinh-vpn-lan-to-lan-ipsec
 
Cấu hình nat – pt
Cấu hình nat – ptCấu hình nat – pt
Cấu hình nat – pt
 
Baithuchanhso4 5
Baithuchanhso4 5Baithuchanhso4 5
Baithuchanhso4 5
 
Tìm Hiểu WLAn, Giao Thức Radius, Mikrotik Router
Tìm Hiểu WLAn, Giao Thức Radius, Mikrotik RouterTìm Hiểu WLAn, Giao Thức Radius, Mikrotik Router
Tìm Hiểu WLAn, Giao Thức Radius, Mikrotik Router
 
Network address translatio
Network address translatioNetwork address translatio
Network address translatio
 
Bai 1
Bai 1Bai 1
Bai 1
 
Báo cáo thưc tập tuần 1
Báo cáo thưc tập tuần 1Báo cáo thưc tập tuần 1
Báo cáo thưc tập tuần 1
 
Cau hinh router coban
Cau hinh router coban Cau hinh router coban
Cau hinh router coban
 
Ccna lap
Ccna lapCcna lap
Ccna lap
 
Load balancing 2 line adsl với draytek vigor 2910
Load balancing 2 line adsl với draytek vigor 2910Load balancing 2 line adsl với draytek vigor 2910
Load balancing 2 line adsl với draytek vigor 2910
 
Bao Cao Mang
Bao Cao MangBao Cao Mang
Bao Cao Mang
 
Báo cáo thực tập tuần 6
Báo cáo thực tập tuần 6Báo cáo thực tập tuần 6
Báo cáo thực tập tuần 6
 
Ip subnet
Ip subnetIp subnet
Ip subnet
 
Cấu hình Router cơ bản(Cisco)
Cấu hình Router cơ bản(Cisco)Cấu hình Router cơ bản(Cisco)
Cấu hình Router cơ bản(Cisco)
 

More from laonap166

Huong dan xu ly cac loi khi su dung phan mem reset may in
Huong dan xu ly cac loi khi su dung phan mem reset may inHuong dan xu ly cac loi khi su dung phan mem reset may in
Huong dan xu ly cac loi khi su dung phan mem reset may inlaonap166
 
Huong dan reset muc l200 epson
Huong dan reset muc l200 epsonHuong dan reset muc l200 epson
Huong dan reset muc l200 epsonlaonap166
 
NEC Server Documents
NEC Server DocumentsNEC Server Documents
NEC Server Documentslaonap166
 
Mtcv giám đốc tt cntt
Mtcv giám đốc tt cnttMtcv giám đốc tt cntt
Mtcv giám đốc tt cnttlaonap166
 
Nếu bạn làm it bạn cần biết
Nếu bạn làm it  bạn cần biếtNếu bạn làm it  bạn cần biết
Nếu bạn làm it bạn cần biếtlaonap166
 
Nhạp mon lap trinh khong code
Nhạp mon lap trinh khong code Nhạp mon lap trinh khong code
Nhạp mon lap trinh khong code laonap166
 
Ha active active bang gfs2
Ha active  active bang gfs2Ha active  active bang gfs2
Ha active active bang gfs2laonap166
 
Hướng dẫn cài đặt phần mềm turnoffmonitor
Hướng dẫn cài đặt phần mềm turnoffmonitorHướng dẫn cài đặt phần mềm turnoffmonitor
Hướng dẫn cài đặt phần mềm turnoffmonitorlaonap166
 
Bao cao web cake php
Bao cao web cake phpBao cao web cake php
Bao cao web cake phplaonap166
 
He 74 a-thltht-lãxuântâm-11tlt
He 74 a-thltht-lãxuântâm-11tltHe 74 a-thltht-lãxuântâm-11tlt
He 74 a-thltht-lãxuântâm-11tltlaonap166
 
Quản lý cua hang giai khat lxt
Quản lý cua hang giai khat lxtQuản lý cua hang giai khat lxt
Quản lý cua hang giai khat lxtlaonap166
 
Ve ngoi nha lap trinh do hoa bang c
Ve ngoi nha lap trinh do hoa bang cVe ngoi nha lap trinh do hoa bang c
Ve ngoi nha lap trinh do hoa bang claonap166
 
Don xin thanh lap doanh nghiep lien doanh
Don xin thanh lap doanh nghiep lien doanhDon xin thanh lap doanh nghiep lien doanh
Don xin thanh lap doanh nghiep lien doanhlaonap166
 
Thu cam on khach hang
Thu cam on khach hangThu cam on khach hang
Thu cam on khach hanglaonap166
 
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloatCai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloatlaonap166
 
Xd email server zimbra
Xd email server zimbraXd email server zimbra
Xd email server zimbralaonap166
 
Tom tat ly thuyet thi bằng lái xe b2
Tom tat ly thuyet thi bằng lái xe b2Tom tat ly thuyet thi bằng lái xe b2
Tom tat ly thuyet thi bằng lái xe b2laonap166
 
Policy Based Assignment DHCP – Windows Server 2012
Policy Based Assignment DHCP – Windows Server 2012Policy Based Assignment DHCP – Windows Server 2012
Policy Based Assignment DHCP – Windows Server 2012laonap166
 
How to backup active directory domain services database in windows server 201...
How to backup active directory domain services database in windows server 201...How to backup active directory domain services database in windows server 201...
How to backup active directory domain services database in windows server 201...laonap166
 
Dns backup and recovery in windows server 2012 r2
Dns backup and recovery in windows server 2012 r2Dns backup and recovery in windows server 2012 r2
Dns backup and recovery in windows server 2012 r2laonap166
 

More from laonap166 (20)

Huong dan xu ly cac loi khi su dung phan mem reset may in
Huong dan xu ly cac loi khi su dung phan mem reset may inHuong dan xu ly cac loi khi su dung phan mem reset may in
Huong dan xu ly cac loi khi su dung phan mem reset may in
 
Huong dan reset muc l200 epson
Huong dan reset muc l200 epsonHuong dan reset muc l200 epson
Huong dan reset muc l200 epson
 
NEC Server Documents
NEC Server DocumentsNEC Server Documents
NEC Server Documents
 
Mtcv giám đốc tt cntt
Mtcv giám đốc tt cnttMtcv giám đốc tt cntt
Mtcv giám đốc tt cntt
 
Nếu bạn làm it bạn cần biết
Nếu bạn làm it  bạn cần biếtNếu bạn làm it  bạn cần biết
Nếu bạn làm it bạn cần biết
 
Nhạp mon lap trinh khong code
Nhạp mon lap trinh khong code Nhạp mon lap trinh khong code
Nhạp mon lap trinh khong code
 
Ha active active bang gfs2
Ha active  active bang gfs2Ha active  active bang gfs2
Ha active active bang gfs2
 
Hướng dẫn cài đặt phần mềm turnoffmonitor
Hướng dẫn cài đặt phần mềm turnoffmonitorHướng dẫn cài đặt phần mềm turnoffmonitor
Hướng dẫn cài đặt phần mềm turnoffmonitor
 
Bao cao web cake php
Bao cao web cake phpBao cao web cake php
Bao cao web cake php
 
He 74 a-thltht-lãxuântâm-11tlt
He 74 a-thltht-lãxuântâm-11tltHe 74 a-thltht-lãxuântâm-11tlt
He 74 a-thltht-lãxuântâm-11tlt
 
Quản lý cua hang giai khat lxt
Quản lý cua hang giai khat lxtQuản lý cua hang giai khat lxt
Quản lý cua hang giai khat lxt
 
Ve ngoi nha lap trinh do hoa bang c
Ve ngoi nha lap trinh do hoa bang cVe ngoi nha lap trinh do hoa bang c
Ve ngoi nha lap trinh do hoa bang c
 
Don xin thanh lap doanh nghiep lien doanh
Don xin thanh lap doanh nghiep lien doanhDon xin thanh lap doanh nghiep lien doanh
Don xin thanh lap doanh nghiep lien doanh
 
Thu cam on khach hang
Thu cam on khach hangThu cam on khach hang
Thu cam on khach hang
 
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloatCai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
Cai dat su_dung_acronis_snapdeployforpc_debungfilebackuphangloat
 
Xd email server zimbra
Xd email server zimbraXd email server zimbra
Xd email server zimbra
 
Tom tat ly thuyet thi bằng lái xe b2
Tom tat ly thuyet thi bằng lái xe b2Tom tat ly thuyet thi bằng lái xe b2
Tom tat ly thuyet thi bằng lái xe b2
 
Policy Based Assignment DHCP – Windows Server 2012
Policy Based Assignment DHCP – Windows Server 2012Policy Based Assignment DHCP – Windows Server 2012
Policy Based Assignment DHCP – Windows Server 2012
 
How to backup active directory domain services database in windows server 201...
How to backup active directory domain services database in windows server 201...How to backup active directory domain services database in windows server 201...
How to backup active directory domain services database in windows server 201...
 
Dns backup and recovery in windows server 2012 r2
Dns backup and recovery in windows server 2012 r2Dns backup and recovery in windows server 2012 r2
Dns backup and recovery in windows server 2012 r2
 

Vpn site to site giữa asa và draytek

  • 1. VPN site to site giữa ASA và Draytek Hôm nay mượn được con draytek nên làm vài bài lab cho phê I. Sơ đồ và yêu cầu 1. Sơ đồ 2. Yêu cầu - Thực hiện VPN site to site giữa ASA và Draytek (mình dùng con Vigor 2920 vì mình mới được cho mượn con này xài ) - Client truy cập lẫn nhau được II. Triển khai 1. Cấu hình Draytek - Thiết lập IP WAN cho Vigor 2920 trên interface WAN 2 có IP: 200.0.0.2/24
  • 2. - Thiết lập IP LAN cho Vigor
  • 3. - Cấu hình VPN trên Draytek - Vào mục VPN and Remote Access >> LAN to LAN >> Click chọn index 1. - Chọn cấu hình dial in hoặc dial out tùy mục địch config của bạn. Và kết nối VPN bằng interface WAN2.  Profile Name: đặt tên profile để tiện việc quản lý.
  • 4.  Enable: để kích hoạt Profile.  Dial-out: để báo cho router biết chức năng của nó là Dial-out, và chút nữa chúng ta chỉ cần quan tâm phần cấu hình Dial-out trong profile này. - Chuyển xuống mục Dial-out settings (bỏ qua phần Dial-in setting). Chọn IPSec Tunnel để thiết lập kênh VPN theo giao thức IPsec. - Chú ý chọn chỗ mũi tên số 1 (pre-share key giữa ASA và draytek phải giống nhau) và số 2 (kiểu mã hóa, thuật toán băm và chứng thực phải giống với ASA) nếu không nó sẽ ko chạy được
  • 5. - Pharse 1 mình sẽ chọn  main mode  Mã hóa theo thuật toán 3DES  Thuật toán băm là MD5  Thuật toán trao đổi khóa diffie hellman là group 2 - Các bạn chú chọn cho đúng để chút config bên ASA phải giống nếu không nó không chạy được lại khổ
  • 6. - Tiếp tục xuống phần TCP/IP settings (Bỏ qua các mục cấu hình khác)  Ở phần này ta sẽ báo cho Router biết mạng local ở đầu xa có địa chỉ là bao nhiêu.  Điền 192.168.1.0 vào khung Remote Network IP ( Địa chỉ mạng ở đầu xa - IP inside của ASA).  Điền 255.255.255.0 vào khung Remote Network Mask.  Điền 10.1.1.0 vào khung Local Network IP.  Click OK để lưu các mục vừa cấu hình. 2. Cấu hình ASA - Cấu hình IP cho ASA
  • 7. ciscoasa(config)# interface g0 ciscoasa(config-if)# nameif outside ciscoasa(config-if)# ip address 200.0.0.1 255.255.255.0 ciscoasa(config-if)# no shutdown ciscoasa(config-if)# int g1 ciscoasa(config-if)# nameif inside ciscoasa(config-if)# ip address 192.168.1.1 255.255.255.0 ciscoasa(config-if)# no shutdown - Cấu hình VPN cho ASA ciscoasa(config)# crypto ikev1 policy 10 ciscoasa(config-ikev1-policy)# authentication pre-share ciscoasa(config-ikev1-policy)# encryption 3des ciscoasa(config-ikev1-policy)# hash md5 ciscoasa(config-ikev1-policy)# group 2 ciscoasa(config-ikev1-policy)# lifetime 86400 ciscoasa(config)# crypto ikev1 enable outside ciscoasa(config-ikev1-policy)# crypto ipsec ikev1 transform-set SVUIT esp-3des esp-md5-hmac ciscoasa(config)# object network INSIDE-ASA ciscoasa(config-network-object)# subnet 192.168.1.0 255.255.255.0 ciscoasa(config-network-object)# object network INSIDE-Draytek ciscoasa(config-network-object)# subnet 10.2.2.0 255.255.255.0 ciscoasa(config)# access-list VPN-TRAFFIC permit ip object INSIDE-ASA object INSIDE-Draytek ciscoasa(config)# crypto map ASA-VPN 10 match address VPN-TRAFFIC ciscoasa(config)# crypto map ASA-VPN 10 set peer 200.0.0.2 ciscoasa(config)# crypto map ASA-VPN 10 set ikev1 transform-set SVUIT ciscoasa(config)# crypto map ASA-VPN interface outside ciscoasa(config)# tunnel-group 200.0.0.2 type ipsec-l2l ciscoasa(config)# tunnel-group 200.0.0.2 ipsec-attributes ciscoasa(config-tunnel-ipsec)# ikev1 pre-shared-key svuit.com 3. Kiểm tra - Client trong Draytek thực hiện truy cập web server trong vùng inside của ASA thành công
  • 8.
  • 9. 4. Kiếm tra và Lỗi - Nếu VPN thành công bạn hãy kiểm tra trạng thái Crypto ikev1 Code: ciscoasa# sh crypto ikev1 sa IKEv1 SAs: Active SA: 1 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey) Total IKE SA: 1
  • 10. 1 IKE Peer: 200.0.0.2 Type : L2L Role : responder Rekey : no State : MM_ACTIVE - Trạng thái IPsec Code: ciscoasa# sh ipsec sa interface: outside Crypto map tag: ASA-VPN, seq num: 10, local addr: 200.0.0.1 access-list VPN-TRAFFIC extended permit ip 192.168.1.0 255.255.255.0 10.1.1.0 255.255.255.0 local ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (10.1.1.0/255.255.255.0/0/0) current_peer: 200.0.0.2 #pkts encaps: 6, #pkts encrypt: 6, #pkts digest: 6 #pkts decaps: 238, #pkts decrypt: 238, #pkts verify: 238 #pkts compressed: 0, #pkts decompressed: 0 #pkts not compressed: 6, #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: 228 local crypto endpt.: 200.0.0.1/0, remote crypto endpt.: 200.0.0.2/0 path mtu 1500, ipsec overhead 58, media mtu 1500 current outbound spi: 8251B9F0 current inbound spi : 8595387F inbound esp sas: spi: 0x8595387F (2241149055) transform: esp-3des esp-md5-hmac no compression in use settings ={L2L, Tunnel, } slot: 0, conn_id: 16384, crypto-map: ASA-VPN sa timing: remaining key lifetime (sec): 28614 IV size: 8 bytes replay detection support: Y Anti replay bitmap: 0xFFFFFFFF 0xFFFFFFFF outbound esp sas: spi: 0x8251B9F0 (2186394096) transform: esp-3des esp-md5-hmac no compression in use settings ={L2L, Tunnel, } slot: 0, conn_id: 16384, crypto-map: ASA-VPN sa timing: remaining key lifetime (sec): 28614 IV size: 8 bytes replay detection support: Y Anti replay bitmap: 0x00000000 0x00000001 - Nếu bạn VPN không thành công thì hãy thử debug xem nó thế nào nhé
  • 11. ciscoasa# debug crypto ikev1 255 - Ví dụ như lỗi ở hình dưới đây là do ở pharse 1 việc chọn thuật toán mã hõa, băm hoặc group diffi không đúng nên vpn thất bại