Network & System

Home / ACL

Access Control List

Access Control List

42 comments

In Cisco devices, ACL (Access Control List) is a mechanism used to control the traffic flow through the device by permitting or denying packets based on defined criteria. ACLs are commonly used in routers, switches, and firewalls to enforce security policies and filter traffic.
Here's a basic overview of how ACLs work and how to configure them on a Cisco devic

Types of ACLs:

  • Standard ACL: Standard ACLs filter traffic based only on the source IP address. They are simple to configure but may not provide granular control over traffic.
  • Extended ACL: Extended ACLs filter traffic based on various criteria such as source/destination IP address, protocol type, source/destination port numbers, etc. They offer more flexibility and granularity compared to standard ACLs.

Steps to Configure ACLs on a Cisco Device:

  • 1. Enter Global Configuration Mode:
  • Router> enable
    Router# configure terminal
    
  • 2. Create an ACL:
    For a standard ACL:
    Router(config)# access-list acl_number permit|deny source_ip [wildcard_mask]
    
    For an extended ACL:
    Router(config)# access-list acl_number permit|deny protocol source_ip source_wildcard destination_ip destination_wildcard [operator] [port]
    
  • 3. Apply the ACL:
    Apply the ACL to an interface or specific direction (inbound or outbound) on the interface.
    Router(config)# interface interface_type interface_number
    Router(config-if)# ip access-group acl_number {in | out}
    
        
Example:

Let's say we want to create an extended ACL to permit HTTP traffic from a specific source IP address:

Router(config)# access-list 101 permit tcp 192.168.1.0 0.0.0.255 any eq www

Then, apply this ACL to an interface:

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip access-group 101 in

This configuration permits HTTP traffic (port 80) from any source IP address in the 192.168.1.0/24 subnet.
Remember to carefully plan your ACLs and consider the order of entries, as ACLs are processed sequentially, with the first matching entry taking precedence. Incorrectly configured ACLs can inadvertently block legitimate traffic or allow unauthorized access, so thorough testing and verification are essential.

Prajan Dangol.

Leave a comment