root
Specialist
Bài lab này sử dụng trên ASA 8.3 trở về trước nhé. Tuy nhiên vẫn áp dụng được cho các ASA có version mới hơn nếu bạn biết biến đổi 1 chút. Tuy nhiên đã có 1 bài lab cho ASA 8.4 sử dụng ASDM bạn có thể tham khảo thêm
I. Mô hình
1. Mô hình triển khai
2. Yêu cầu:
- Khi client dùng trình duyệt web và quay VPN về ASA client có thể truy cập các ứng dụng Windows server 2003 như sau, theo 2 cách sau:
- Cách 1: Port Forwarding:
1. Cấu hình IP
- Cấu hình IP trên ASA
3. Cấu hình Port Forwarding
- Cấu hình port forwarding với các port là các ứng dụng mà server inside mở để client ngoài internet khi VPN có thể kết nối vào. Ở đây mình sẽ mở 3 ứng dụng
- Plug-in là chương trình Java hoạt động trên trình duyệt web. Cho phép sử dụng các ứng dụng Java thông qua các plug-in được Import. Hỗ trợ các ứng dụng đã được định nghĩa sắn như: SSH, Telnet, VNC, RDP...
- Các bạn có thể download plug-in RDP tại đây: https://docs.google.com/file/d/0B6-...Zi00OGNlLTlkMDEtNGU5MzAxNmFmNDI4/edit?ddrp=1#
- Sau khi Download plugin trên các bạn cho file đó vào TFTP server. Và bật TFTP lên
- Các bạn xác định giao thức và đường dẫn của plug-in mà các bạn đã download ở trên và import vào như hình
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa# import webvpn plug-in protocol rdp tftp://192.168.80.1/rdp-plugin.090203.jar[/TD]
[/TR]
[/TABLE]
- Quá trình import thành công5. Cấu hình Smart-Tunnel
- Smart-Tunnel hỗ trợ các ứng dụng chạy trên nền TCP. Các bạn cần xác định trước chương trình thực thi cho ứng dụng
Ví du: mstsc.exe là chương trình thực thi cho ứng dụng Remote Desktop
- Cấu hình group policy để áp các chính sách cho client khi VPN
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa(config-webvpn)# group-policy WEBVPN internal
ciscoasa(config)# group-policy WEBVPN attributes
ciscoasa(config-group-webvpn)# port-forward name APPLICATION
ciscoasa(config-group-webvpn)# port-forward enable APPLICATION
ciscoasa(config-group-webvpn)# smart-tunnel enable REMOTE_DESKTOP[/TD]
[/TR]
[/TABLE]
7. Cấu hình Connect Profile
- Định nghĩa Alias và thực hiện kết hợp với Connection Profile.
- Kích hợp Webvpn trên interface outside của ASA
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa(config-group-webvpn)# tunnel-group WEBVPN type remote-access
ciscoasa(config)# tunnel-group WEBVPN general-attributes
ciscoasa(config-tunnel-general)# default-group-policy WEBVPN
ciscoasa(config-tunnel-general)# tunnel-group WEBVPN webvpn-attributes
ciscoasa(config-tunnel-webvpn)# group-alias APPLICATION enable[/TD]
[/TR]
[/TABLE]
I. Mô hình
1. Mô hình triển khai
2. Yêu cầu:
- Khi client dùng trình duyệt web và quay VPN về ASA client có thể truy cập các ứng dụng Windows server 2003 như sau, theo 2 cách sau:
- Cách 1: Port Forwarding:
- Remote Desktop: 127.0.0.1:4000
- Telnet: 127.0.0.1:4023
- WWW: 127.0.0.1:4080
- Remote Desktop: 192.168.56.10
- Telnet: 192.168.56.10
- WWW: 192.168.56.10
1. Cấu hình IP
- Cấu hình IP trên ASA
[TABLE="class: outer_border, width: 600"]
[TR]
[TD]// interface outside kết nối ra internet
ciscoasa(config)# int e0/0
ciscoasa(config-if)# nameif outside
ciscoasa(config-if)# ip add 151.1.1.1 255.255.255.0
ciscoasa(config-if)# no shutdown
// interface inside kết nối với WIndows server 2003
ciscoasa(config-if)# int e0/1
ciscoasa(config-if)# ip add 192.168.56.254 255.255.255.0
ciscoasa(config-if)# no shut
// interface DMZ để kết nối với TFTP server
ciscoasa(config-if)# int e0/2
ciscoasa(config-if)# nameif dmz
ciscoasa(config-if)# ip add 192.168.80.131 255.255.255.0
ciscoasa(config-if)# no shut
// tạo username/password cho client VPN
ciscoasa(config-if)# username svuit password svuit.vn[/TD]
[/TR]
[/TABLE]
- Kiểm tra kết nối giữa ASA và TFTP server[TR]
[TD]// interface outside kết nối ra internet
ciscoasa(config)# int e0/0
ciscoasa(config-if)# nameif outside
ciscoasa(config-if)# ip add 151.1.1.1 255.255.255.0
ciscoasa(config-if)# no shutdown
// interface inside kết nối với WIndows server 2003
ciscoasa(config-if)# int e0/1
ciscoasa(config-if)# ip add 192.168.56.254 255.255.255.0
ciscoasa(config-if)# no shut
// interface DMZ để kết nối với TFTP server
ciscoasa(config-if)# int e0/2
ciscoasa(config-if)# nameif dmz
ciscoasa(config-if)# ip add 192.168.80.131 255.255.255.0
ciscoasa(config-if)# no shut
// tạo username/password cho client VPN
ciscoasa(config-if)# username svuit password svuit.vn[/TD]
[/TR]
[/TABLE]
Mã:
ciscoasa(config-if)#[COLOR=#ff0000][B] ping 192.168.80.1[/B][/COLOR]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.80.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
3. Cấu hình Port Forwarding
- Cấu hình port forwarding với các port là các ứng dụng mà server inside mở để client ngoài internet khi VPN có thể kết nối vào. Ở đây mình sẽ mở 3 ứng dụng
- Remote Desktop
- Web
- Telnet
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa(config-webvpn)# enable outside
ciscoasa(config-webvpn)# port-forward APPLICATION 4000 192.168.56.10 3389 REMOTE-DESKTOP
ciscoasa(config-webvpn)# port-forward APPLICATION 4023 192.168.56.10 23 TELNET
ciscoasa(config-webvpn)# port-forward APPLICATION 4080 192.168.56.10 80 WWW[/TD]
[/TR]
[/TABLE]
4. Cấu hình Plug-in[TR]
[TD]ciscoasa(config-webvpn)# enable outside
ciscoasa(config-webvpn)# port-forward APPLICATION 4000 192.168.56.10 3389 REMOTE-DESKTOP
ciscoasa(config-webvpn)# port-forward APPLICATION 4023 192.168.56.10 23 TELNET
ciscoasa(config-webvpn)# port-forward APPLICATION 4080 192.168.56.10 80 WWW[/TD]
[/TR]
[/TABLE]
- Plug-in là chương trình Java hoạt động trên trình duyệt web. Cho phép sử dụng các ứng dụng Java thông qua các plug-in được Import. Hỗ trợ các ứng dụng đã được định nghĩa sắn như: SSH, Telnet, VNC, RDP...
- Các bạn có thể download plug-in RDP tại đây: https://docs.google.com/file/d/0B6-...Zi00OGNlLTlkMDEtNGU5MzAxNmFmNDI4/edit?ddrp=1#
- Sau khi Download plugin trên các bạn cho file đó vào TFTP server. Và bật TFTP lên
- Các bạn xác định giao thức và đường dẫn của plug-in mà các bạn đã download ở trên và import vào như hình
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa# import webvpn plug-in protocol rdp tftp://192.168.80.1/rdp-plugin.090203.jar[/TD]
[/TR]
[/TABLE]
- Smart-Tunnel hỗ trợ các ứng dụng chạy trên nền TCP. Các bạn cần xác định trước chương trình thực thi cho ứng dụng
Ví du: mstsc.exe là chương trình thực thi cho ứng dụng Remote Desktop
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa(config-webvpn)# tunnel-group-list enable
ciscoasa(config-webvpn)# smart-tunnel list REMOTE_DESKTOP RDP "mstsc.exe"[/TD]
[/TR]
[/TABLE]
6. Cấu hình Group policy[TR]
[TD]ciscoasa(config-webvpn)# tunnel-group-list enable
ciscoasa(config-webvpn)# smart-tunnel list REMOTE_DESKTOP RDP "mstsc.exe"[/TD]
[/TR]
[/TABLE]
- Cấu hình group policy để áp các chính sách cho client khi VPN
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa(config-webvpn)# group-policy WEBVPN internal
ciscoasa(config)# group-policy WEBVPN attributes
ciscoasa(config-group-webvpn)# port-forward name APPLICATION
ciscoasa(config-group-webvpn)# port-forward enable APPLICATION
ciscoasa(config-group-webvpn)# smart-tunnel enable REMOTE_DESKTOP[/TD]
[/TR]
[/TABLE]
7. Cấu hình Connect Profile
- Định nghĩa Alias và thực hiện kết hợp với Connection Profile.
- Kích hợp Webvpn trên interface outside của ASA
[TABLE="class: outer_border, width: 800"]
[TR]
[TD]ciscoasa(config-group-webvpn)# tunnel-group WEBVPN type remote-access
ciscoasa(config)# tunnel-group WEBVPN general-attributes
ciscoasa(config-tunnel-general)# default-group-policy WEBVPN
ciscoasa(config-tunnel-general)# tunnel-group WEBVPN webvpn-attributes
ciscoasa(config-tunnel-webvpn)# group-alias APPLICATION enable[/TD]
[/TR]
[/TABLE]
Bài viết liên quan
Bài viết mới