Router (Configuration) #ip Access List Extended Text
//Defines the ACL naming text.
Router (config-ACL) # PermitTCP (UDP) Source IP Wildcard Mask [eq Port Number] Destination IP Wildcard Mask eq Port Number.
//Define the entries of ACL, allowing specific access port numbers.
Router (configuration) #int f0/0 (interface number)
Router (Configuration -if)#ip Access Group Text Input (Output)
//The interface calls an ACL named TEXT.
1. For example, any IP is allowed to access TCP port 80(HTTP port) on interface F0/0, and the rest are filtered.
Ip access list extension per_HTTP
Allow tcp any any eq http
Reject ip any any
export
int f0/0
Ip access group per_HTTP in
2. For example, interface F0/0 blocks1.1to access tcp and udp 139 ports in 2.2.2.2, and the rest of the traffic is released:
The access list 199 deny TCP host 1. 1. 1 host 2.2.2.2 eq139//ACL another method.
The access list 199 denies udp host1.1.1.1host 2.2.2.2 eq139.
Access-list 199 allows any any//ACL to implicitly deny any any by default.
int f0/0
Ip access-group 199 in