Vous êtes sur la page 1sur 2

Standard Access-list

Cấu hình Access-list:


1. Định nghĩa Access-list:
1.1 Định nghĩa Standard Access-list:
Sử dụng lê ̣nh ip nat inside source static
Router(config)# access-list [list number] [permit|deny] [IP address]
[wildcard mask|optional]

[list number] : Access list number 1-99.


[permit|deny] : cho phép hoặ
c cấm.
[IP address] [wildcard mask|optional]: Cặ
p IP và wildcard
1.2 Định nghĩa Extended Access-list:
access-list [list number] [permit|deny] [protocol] [source
specification] [destination specification] [protocol qualification]
[logging]

[list number]: Access list number 100 đến 199.


[permit|deny] : cho phép hoặ
c cấm.
[protocol]: ip, tcp, udp, tcmp.
[source specification]:
+ [IP address] [wildcard mask|optional] [port number
specification]
 [IP address] [wildcard mask|optional]: cặ p IP và
wildcard.
 [port number specification]: chỉ sủ dụng cho tcp hoặ
c
udp.
[protocol qualification]:
[logging]:

Ví dụ:
access-list 110 permit tcp any 172.22.0.0 0.0.255.255 established
access-list 110 permit tcp any host 172.22.15.83 eq 25
access-list 110 permit tcp 10.0.0.0 0.255.255.255 172.22.114.0 0.0.0.255 
eq 23
access-list 110 deny any

Line 1: Cho phép tất cả các gói TCP từ bất kỳ mạng nào đến network 172.22.0.0 nếu như
network này established.

Line 2: Cho phép tất cả các gói TCP từ bất kỳ mạng nào có port 25 (SMTP) đến host
172.22.15.83.

Line 3: Cho phép tất cả các gói TCP từ mạng 10.0.0.0/8 có port 23 (telnet) đến bất kỳ
host nào trong mạng 172.22.114.0/24.

UDP Access Lists

Lê ̣nh tổng quát:


access-list [access-list-number] {deny|permit} udp [ip source] [source-
wildcard] [operator port [port]] [ip destination] [destination-wildcard]
[operator port [port]] [protocol qualification] [logging]

Ví dụ:

access-list 110 permit udp 10.64.32.0 0.0.0.255 host 172.22.15.87 eq 69
access-list 110 permit udp any host 172.22.15.85 eq 53
access-list 110 permit udp any any eq 161
access-list 110 deny any

Line 1: Cho phép các gói UDP từ subnet 10.64.32.0/24 đến TFTP (port 69) của host
172.22.15.87.

Line 2: Cho phép các gói UDP từ bất kỳ mạng nào đến Domain Name Server (port 53)
của host 172.22.15.85.

Line 3: Cho phép tất cả gói SNMP (port 161) từ bất kỳ mạng nào đến bất kỳ mạng náo.

Line 4: Còn lại thì cấm.

ICMP Access Lists

Dạng tổng quát:

access-list [access-list-number] {deny|permit} icmp [ip source] [source-


wildcard] [ip destination] [destination-wildcard] [icmp-type[icmp-code]]
[protocol qualification] [logging]

access-list 111 deny icmp 172.22.0.0 0.0.255.255 any 0
access-list 111 deny icmp 172.22.0.0 0.0.255.255 any 3 9
access-list 111 deny icmp 172.22.0.0 0.0.255.255 any 3 10
access-list 111 permit ip any any

Line 1: Cấm ICMP ping responses (Echo Reply, ICMP type 0) từ network 172.22.0.0
đến bất kỳ mạng đích nào.

Line 2: Deny ICMP destination unreachable packets (type 3) with a code number of 9
(Network Administratively Prohibited) from network 172.22.0.0 to any destination.

Line 3: Deny ICMP destination unreachable packets (type 3) with a code number of 10
(Host Administratively Prohibited) from network 172.22.0.0 to any destination.

Line 4: Cho phép tất cả các gói tin IP còn lại.

Vous aimerez peut-être aussi