(+84) 236.3827111 ex. 402

Time-range ACL


Sơ đồ:

Mô tả:

Thực hiện Time-range ACL để hạn chế việc truy cập tài nguyên theo thời gian.

Cấu hình:

- Cấu hình time-range

Gateway(config)# time-range TIME_ACL

Gateway(config-time-range)# absolute start 07:00 15 April 2017 end 23:59 30 April 2017

//Được Active vào 7h, 15/4/2017 đến 23h59, 30/4/2017

Gateway(config-time-range)# periodic daily 8:00 to 17:00

//Định kỳ Active vào 8h => 17h mỗi ngày

- Định nghĩa ACL kết hợp với Time-range

Access-list 100 permit icmp any host 192.168.1.2 time-range TIME_ACL

Access-list 100 permit tcp any host 192.168.1.2 eq 445 time-range TIME_ACL

Access-list 100 deny ip any any

- Cấu hình trên Interface f0/1

Interface f0/1

Ip add 192.168.2.1 255.255.255.0

Ip access-group 100 in

- Kiểm tra

Gateway# show clock

Gateway# show access-list

R1#sh access-lists

Extended IP access list 100

10 permit icmp any host 192.168.1.2 time-range TIME_ACL (active) (5 matches)

20 permit tcp any host 192.168.1.2 eq 445 time-range TIME_ACL (active)

30 deny ip any any (114 matches)

R1#

Đưa ra 1 vài kiểm thử vi phạm & xem kết quả.

- Thay đổi thời gian

Gateway# clock set 08:01:00 1 April 2017