Ví dụ 1:
Dữ liệu Inbound tới DMZ Web Server

Không có ACL, mặc định dữ liệu inbound sẽ bị chặn.
Để cho phép dữ liệu inbound, làm theo như sau:
– Cấu hình NAT tĩnh cho Web server
– Cấu hình inbound ACL
– Gán ACL cho interface Outside
– Cấu hình NAT tĩnh cho Web server


Ánh xạ một địa chỉ trong vùng DMZ 172.16.1.2 tương ứng với một địa chỉ public 192.168.1.9
Cấu hình inbound Outside


Cho phép từ bên ngoài được truy nhập web server ở DMZ server
Gán ACL cho interface Outside

Ciscoasa(config)#

Gán ACL cho interface

Muốn xem thông tin ACL sử dụng lệnh
ciscoasa# show run access-list [id]
Xóa ACL
ciscoasa# clear configure access-list [id]
Chú ý: Các từ viết tắt
+ lt: less than (nhỏ hơn)
+ gt: greater than (lớn hơn)
+ eq: equal to (bằng)
+ neq: not equal to (không bằng)
Ví dụ 2:
Cho phép truy cập dịch vụ ngoài internet với yêu cầu:
– Lưu lượng thuộc mạng 192.168.1.0/24 là tcp hoặc udp sẽ được NAT tương ứng với dãy địa chỉ 192.168.2.10 – 192.168.2.100.
– Lưu lượng thuộc mạng 192.168.1.0/24 là icmp sẽ được PAT tương ứng với địa chỉ 192.168.2.9.

Xác định luồng dữ liệu được NAT
ASA(config)# access-list NAT extended permit tcp 192.168.1.0 255.255.255.0 any
ASA(config)# access-list NAT extended permit udp 192.168.1.0 255.255.255.0 any
Xác định luồng dữ liệu được PAT
ASA(config)# access-list PAT extended permit icmp 192.168.1.0 255.255.255.0 any
Thực hiện NAT
ASA (config)# nat (inside) 1 access-list NAT
ASA (config)#global (outside) 1 192.168.2.10-192.168.2.100 netmask 255.255.255.0
Thực hiện PAT
ASA (config)# nat (inside) 2 access-list PAT
ASA (config)# global (outside) 2 192.168.2.9 netmask 255.255.255.0
Dữ liệu Inbound tới DMZ Web Server

Không có ACL, mặc định dữ liệu inbound sẽ bị chặn.
Để cho phép dữ liệu inbound, làm theo như sau:
– Cấu hình NAT tĩnh cho Web server
– Cấu hình inbound ACL
– Gán ACL cho interface Outside
– Cấu hình NAT tĩnh cho Web server


Ánh xạ một địa chỉ trong vùng DMZ 172.16.1.2 tương ứng với một địa chỉ public 192.168.1.9
Cấu hình inbound Outside


Cho phép từ bên ngoài được truy nhập web server ở DMZ server
Gán ACL cho interface Outside

Ciscoasa(config)#

Gán ACL cho interface

Muốn xem thông tin ACL sử dụng lệnh
ciscoasa# show run access-list [id]
Xóa ACL
ciscoasa# clear configure access-list [id]
Chú ý: Các từ viết tắt
+ lt: less than (nhỏ hơn)
+ gt: greater than (lớn hơn)
+ eq: equal to (bằng)
+ neq: not equal to (không bằng)
Ví dụ 2:
Cho phép truy cập dịch vụ ngoài internet với yêu cầu:
– Lưu lượng thuộc mạng 192.168.1.0/24 là tcp hoặc udp sẽ được NAT tương ứng với dãy địa chỉ 192.168.2.10 – 192.168.2.100.
– Lưu lượng thuộc mạng 192.168.1.0/24 là icmp sẽ được PAT tương ứng với địa chỉ 192.168.2.9.

Xác định luồng dữ liệu được NAT
ASA(config)# access-list NAT extended permit tcp 192.168.1.0 255.255.255.0 any
ASA(config)# access-list NAT extended permit udp 192.168.1.0 255.255.255.0 any
Xác định luồng dữ liệu được PAT
ASA(config)# access-list PAT extended permit icmp 192.168.1.0 255.255.255.0 any
Thực hiện NAT
ASA (config)# nat (inside) 1 access-list NAT
ASA (config)#global (outside) 1 192.168.2.10-192.168.2.100 netmask 255.255.255.0
Thực hiện PAT
ASA (config)# nat (inside) 2 access-list PAT
ASA (config)# global (outside) 2 192.168.2.9 netmask 255.255.255.0
Trần Khánh Huy – VnPro