What is ACL?
Access
control list (ACL)
are basically a set of commands, grouped together by a number or name that is
used to filter traffic entering or leaving an interface.
Or
Access control list (ACL) is a
set of rules which will allow/deny the specific traffic moving through the interface.
When activating an ACL on an interface, we must specify in which direction the traffic should be filtered:
Router processes each access list statement against each packet in sequential manner. If the router reaches the end of the list and no match for the packet, then the particular packet will be discarded. So, it’s important that each access list contain at least one permit statement. When activating an ACL on an interface, we must specify in which direction the traffic should be filtered:
- Inbound (as the traffic comes into an interface).
- Outbound (before the traffic exits an interface).
- An access list is a sequential list consisting of at least one permit statement and possibly one or more deny statements.
- IP access lists statements can be apply to IP addresses, upper-layer IP protocols, or other fields in IP packets.
- Access list is identified and referenced by a name or a number.
- Access list acts as a packet filter, filtering packets based on the criteria defined in the access list.
- Access list does not filter the traffic originated by the router itself.
- Generally Access list implemented on distribution layer router.
Access Control Lists can be used for:
- Filtering IP traffic.
- Defining traffic to Network Address Translate (NAT) or encrypt.
- Filtering non-IP protocols such as AppleTalk, IPX etc.
Benefit of ACL:
The following are the benefit
of Access Control List -
- Block Unwanted Traffic or Users: Access lists can filter incoming or outgoing packets on an interface based on source addresses, destination addresses, or user authentication. We can configure access lists to determine which types of traffic to be forwarded or blocked at the router interfaces. For example, we can permit e-mail traffic to be routed, but at the same time block all Telnet traffic.
- Reduce the Chance of DOS Attacks: Access list can be used to reduce the chance of denial-of-service attacks. For example, by specifying IP source addresses, we can control whether traffic from hosts, networks, or users access our network.
- Control Access to Virtual Terminal Lines: We can place an access list on inbound vty (Telnet) line access from certain nodes or networks. We can also place an access list on outbound vty access, blocking or permitting Telnet access to other devices.
- Restrict the Content of Routing Updates: Access lists can control routing updates being sent, received, or redistributed.
- Provide Bandwidth Control: An access list on a slow link can prevent excess traffic.
- Identify or Classify Traffic for QoS Features: Access lists can provide congestion avoidance by setting IP precedence for WRED or CAR. It can provide congestion management for class-based weighted fair queuing (WFQ), priority queuing, and custom queuing.
- Trigger Dial-on-Demand (DDR) Calls: An access list can enforce dialing and disconnect criteria.
- Limit Debug Command Output: An access list can limit debug output based on an address or protocol.
- Provide NAT Control: Access lists can control which addresses are translated by Network Address Translation (NAT).
- Authenticate Incoming RSH and RCP Requests: To enable the Cisco IOS software to receive incoming Remote Shell (RSH) protocol and Remote Copy (RCP) protocol requests, customers must configure an authentication database to control access to the router. Access lists can simplify the identification of local users, remote hosts, and remote users in the database authentication configuration.
Access List Rules:
Use the following process and rules when configuring an IP access
list:
- The software checks the source or destination address or the protocol of each packet against the conditions in the access list, one condition (permit or deny statement) at a time.
- If a packet does not match an access list statement, the packet is then tested against the next statement in the list.
- If the packet and an access list statement match, the remaining statements in the list will skip and the packet will be permitted or denied as mention in the matched statement.
- If the access list denies the address or protocol, the software discards the packet and returns an Internet Control Message Protocol (ICMP) Host Unreachable message.
- If no conditions match, the software drops the packet because each access list ends with an implicit deny statement.
- The access list should contain at least one permit statement or else all packets are denied.
- Order of statements is important because the software stops testing conditions after the first match. Put the most restrictive statements at the top of the list and the least restrictive at the bottom.
- Create the access list before applying it to an interface. An interface to which an empty access list is applied permits all traffic.
- Only one access list per interface, per protocol, per direction is allowed.
- For inbound lists, permit means continue to process the packet after receiving it on an inbound interface; deny means discard the packet.
- For outbound lists, permit means send it to the output buffer; deny means discard the packet.
- An access list cannot be removed if that access list is in use. To remove an access list, remove the access group form interface and then remove the access list.
- An access list must exist before we use “ip access group” command in an interface.
- To identify the purpose of access list statement, we can write a helpful remark before or after any statement.
Processing of Access Control List (ACL):
- For inbound access lists, after receiving a packet, the router checks the source address of the packet against the access list. If the access list permits the address, the router continues to process the packet. If the access list rejects the address, the router discards the packet and returns an ICMP Host Unreachable message.
- For outbound access lists, after receiving and routing a packet to an interface, the router checks the source address of the packet against the access list. If the access list permits the address, the router transmits the packet. If the access list rejects the address, the router discards the packet and returns an ICMP Host Unreachable message.
- When we configure an access list (standard or extended) which is not yet applied to an interface, then the router will accept all packets.
Types of Access Control List (ACL):
Access Control List (ACL) is of
two types –
- Standard Access Control List.
- Extended Access Control List.
Standard Access Control List:
Standard access control list
can be used to allow or deny packets based on source IP address in an IP datagram
packet or allow or deny entire TCP/IP protocol suite.
- Standard ACL is range from 1 – 99 & 1300 – 1999.
- Standard ACL is used to block a particular host or a network.
- Standard ACL implement near to destination.
- Standard ACL block all the services.
- Standard ACL block two way communications.
- Standard ACL works on Layer 3 OSI model.
Standard ACLs are used for the
following situation:
Extended Access Control List:
- Restricting access to a router through the VTY lines (Telnet and SSH).
- Restricting access to a router through HTTP or HTTPS.
- Filtering routing updates.
Extended Access Control List:
Extended access control list
can be used to allow or deny packets based on Source IP address, Destination
IP addresses, Protocols type (IP, TCP, UDP, and ICMP) and Protocol information
(i.e. port number for TCP & USP, message type for ICMP) in an IP datagram
packet.
Extended ACLs are used for the
following situation.- Extended ACL is range from 100 – 199 & 2000 – 2699.
- Extended ACL is used to block specific services like HTP, FTP etc.
- Extended ACL implement near to destination.
- Extended ACL block only specific services not all.
- Extended ACL block one way communication.
- Extended ACL works on Layer 3 & 4 of OSI model.
- Filtering IP Options.
- Filtering TCP flags.
- Filtering non initial fragments of packets.
- Time-based entries.