Mô tả: Mô hình gồm 1 firewall kết nối với internet qua cổng Gi0/1, vùng DMZ có subnet là 172.16.0.0/24 chứa một máy linux, Vùng client là vùng có subnet 192.168.1.0/24 gồm 1 switch và 1 máy window.
Phần thực hành
1. Làm quen với các chế độ trên ASA.
Khi khởi động lên asa sẽ ở chế độ EXEC Mode. Để vào chế độ Privileged EXEC Mode dùng lệnh
| ciscoasa> enable Password: # Nhấn enter khi chưa đặt mật khẩu |
| ciscoasa# configure terminal |
| ciscoasa(config)# exit ciscoasa#exit |
| ciscoasa> en Password: ciscoasa# conf t ciscoasa(config)# hostname asa |
| asa# conf t asa(config)# enable password VnPro@123 asa(config)# exit asa# exit |
Cấu hình ip trên interface gigabitEthernet0/2
| asa(config)# interface g0/2 asa(config-if)# security-level 100 asa(config-if)# nameif Inside asa(config-if)# ip address 192.168.1.1 255.255.255.0 asa(config-if)# no shut asa(config-if)# exit |
| asa(config)# interface g0/3 asa(config-if)# ip address 172.16.0.1 255.255.255.0 asa(config-if)# security-level 50 asa(config-if)# nameif DMZ asa(config-if)# no shut asa(config-if)# exit |
| asa# show interface ip brief |
| asa# show nameif |
5. Cấu hình cho phép ICMP từ vùng Inside tới vùng DMZ.
| asa(config)# class-map inspection_default asa(config-cmap)# match default-inspection-traffic asa(config-cmap)# exit asa(config)# policy-map global_policy asa(config-pmap)# class inspection_default asa(config-pmap-c)# inspect icmp asa(config-pmap-c)# exit asa(config-pmap)# exit asa(config)# service-policy global_policy global |
6. Cấu hình cấp DHCP vùng Inside.
| asa(config)# dhcpd address 192.168.1.2-192.168.1.254 Inside asa(config)# dhcpd option 3 ip 192.168.1.1 interface Inside asa(config)# dhcpd option 6 ip 8.8.8.8 interface Inside asa(config)# dhcpd enable Inside |
7. Nhận DHCP từ vùng Outside.
| asa(config)# int g0/1 asa(config-if)# nameif Outside INFO: Security level for "Outside" set to 0 by default. asa(config-if)# security-level 0 asa(config-if)# ip address dhcp setroute asa(config-if)# no shut |
| show ip address outside dhcp lease |
8. Cấu hình NAT overload.
| asa(config)# object network Inside.Zone asa(config-network-object)# subnet 192.168.1.0 255.255.255.0 asa(config-network-object)# nat (Inside,Outside) dynamic interface asa(config-network-object)# exit |
9. Lưu lại cấu hình
| asa# write memory |