root

Leader IT/Architect
Dec 31, 2012
1,153
72
48

Lab Cisco ASA and nat port redirection draytek


Bài lab Cisco ASA and nat port redirection draytek sử dụng Draytek làm Router kết nối với ISP.
Trên Router ISP chúng ta sẽ thực hiện NAT các port public vào các port Private cho các Web Server nằm trong mạng LAN.
Mô tả luồng traffic từ Internet truy cập đến các Web Server trong hệ thống mạng LAN:
  • Traffic từ Internet sẽ được đẩy vào cho Route Draytek. Router Draytek sẽ thực hiện NAT các port từ IP internet truy cập đến đúng với Web Server đó.
  • Những truy cập từ internet có Destination port = 81 thì sẽ được forward cho Webserver 10.1.1.0
  • Những truy cập từ internet có Destination port = 81 thì sẽ được forward cho Webserver 192.168.2.20. Traffic này sẽ phải đi ngang qua Firewall Cisco ASA. Firewall Cisco ASA sẽ đứng ra kiểm soát gói tin từ internet đi vào và cấu hình Access-List để cho phép forward những gói tin hợp lệ vào các Web Server tương ứng trong hệ thống mạng.

I. Mô hình Lab Cisco ASA and nat port redirection draytek

1. Sơ đồ Lab Cisco ASA and nat port redirection draytek

 Cisco ASA and nat port redirection draytek (1)


2. yêu cầu
- ngoài internet truy cập vào IP wan port 80 thì sẽ truy cập đến web server 10.1.1.10
- ngoài internet truy cập vào IP wan port 81 thì sẽ truy cập đến web server 192.168.2.20

II. Triển khai Lab Cisco ASA and nat port redirection draytek


1. Cấu hình Draytek
- các bạn config lại port web quản lý draytek mặc định là 80 thành 8080 để không bị trùng với port 80 khi thực hiện NAT port redirec
- bỏ chọn "disable PING from the internet" để bạn có thể ping được draytek.

 Cisco ASA and nat port redirection draytek (2)


- cấu hình IP WAN, có thể là cấu hình pppoe... user/pass sẽ do ISP cấp. Ở đây mình sẽ dùng IP static và bỏ qua bước pppoe vì ko có xài :)

 Cisco ASA and nat port redirection draytek (3)


- IP WAN của mình là 172.16.1.19 và gateway của mình là 172.16.1.254.

 Cisco ASA and nat port redirection draytek (4)

- Thiết lập IP trong LAN.

 Cisco ASA and nat port redirection draytek (5)

 Cisco ASA and nat port redirection draytek (6)


- Thực hiện route mạng inside 192.168.2.0/24 của ASA để mạng inside ra internet.

 Cisco ASA and nat port redirection draytek (7)

 Cisco ASA and nat port redirection draytek (11)


- Thực hiện NAT port cho web server:
  • port 80 thì cho web server 10.1.1.10
  • port 81 thì cho web server 192.168.2.20
 Cisco ASA and nat port redirection draytek (8)

 Cisco ASA and nat port redirection draytek (9)


2. Cấu hình Cisco ASA
- cấu hình IP và Route asa về draytek.

Code:
ciscoasa(config)#interface GigabitEthernet0
ciscoasa(config-if)# nameif outside
ciscoasa(config-if)# ip address 10.1.1.254 255.255.255.0

ciscoasa(config-if)# interface GigabitEthernet1
ciscoasa(config-if)# nameif inside
ciscoasa(config-if)# ip address 192.168.2.254 255.255.255.0
ciscoasa(config-if)# exit
ciscoasa(config)# route outside 0 0 10.1.1.1
ciscoasa(config)# fixup protocol icmp


- Viết ACL cho phép outside truy cập port 80 vào bên trong inside của ASA

Code:
ciscoasa(config)# access-list OUTSIDE-INSIDE extended permit tcp any host 192.168.2.20 eq 80
ciscoasa(config)# access-group OUTSIDE-INSIDE in interface outside


- ASA ping ra internet thành công
ciscoasa(config)# ping 8.8.8.8


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 30/38/60 ms


3. Test
- Test Lab Cisco ASA and nat port redirection draytek
- client truy cập bằng IP wan của draytek port 80 và 81 thành công.

 Cisco ASA and nat port redirection draytek (10)
 
Last edited:

About us

  • Securityzone.vn là một trang web chuyên về an ninh mạng và công nghệ thông tin. Trang web này cung cấp các bài viết, tin tức, video, diễn đàn và các dịch vụ liên quan đến lĩnh vực này. Securityzone.vn là một trong những cộng đồng IT lớn và uy tín tại Việt Nam, thu hút nhiều người quan tâm và tham gia. Securityzone.vn cũng là nơi để các chuyên gia, nhà nghiên cứu, sinh viên và người yêu thích an ninh mạng có thể trao đổi, học hỏi và chia sẻ kiến thức, kinh nghiệm và giải pháp về các vấn đề bảo mật trong thời đại số.

Quick Navigation

User Menu