Access Control List
Access Control List
Access Control List
Cisco Access Control Lists are the set of conditions grouped together by name or
number. These conditions are used in filtering the traffic passing from router. Through
these conditions we can filter the traffic; either when it enters in router or when it exits
from router.
Basically ACL is the integrated feature of IOS software that is used to filter the network
traffic passing through the IOS devices. Network traffic flows in the form of packets. A
packet contains small piece of data and all necessary information which are required to
deliver it.
This default behavior does not provide any security. Anyone who know the correct
destination address can send his packet through the router.
In this network, no security policy is applied on router. So router will not be able to
distinguish between user’s packet and bad element’s packet. From router’s point of
view, both packets have correct destination address so they should be forwarded from
exit interface.
Suppose we tell the router that only 172.16.64.66 has the right to access the
172.16.0.100. To match with this condition router will take following actions:
Now only the packets from 172.16.64.66 are allowed to pass from router. With this
condition, bad elements/hackers will not be able to access the server. We can create as
much conditions as we want. Technically these conditions are known as ACLs. Besides
filtering unwanted traffic, ACLs are used for several other purposes such as prioritizing
traffic for QoS (Quality of Services), triggering alert, restricting remote access,
debugging, VPN and much more.
We cannot filter the packet in the middle of router where it makes forward decision.
Decision making process has its own logic and should not be interfered for filtering
purpose. After excluding/coming out of this location, we have two locations – entrance
and exit. We can apply our ACL conditions on these locations.
Inbound ACLs filter the traffic before router makes forward decision. Outbound ACLs
filter the traffic after the router makes forward decision.
An ACL filter condition has to two actions; permit and deny. We can permit certain types
of traffic while blocking rest or we can block certain types of traffic while allowing rest.
Key points
ACLs must be applied in data flow direction. Inbound ACLs must be placed in entrance
interface. Outbound ACLs must be placed in exit interface.
Once applied, ACL will filter every packet passing through the interface.
Types of ACLs
There are two types of ACLs:
Named ACLs
Named ACLs are the extended version of existing ACLs. Named standard ACL is the
extended version of standard ACL. Named extended ACL is the enhanced version of
extended ACL. Existing ACLs (Standard and Extended) assign a unique number among
all the ACLs. While Named ACLs assign a unique name among all the ACLs.
For example, we want to allow only one host address 20.0.0.10 255.0.0.0, blocking all
others. To meet with this requirement, we need to create two ACL conditions.
2. Block All
Order of the rules/conditions plays big role in filtration. If we have created denied
condition first as shown below, then we would have blocked entire traffic from all hosts
including 20.0.0.10.
This happens because the conditions are matched from top to bottom order and once a
match is found, no further conditions are matched. First condition in this ACL will match
all packets from all hosts including 20.0.0.10. First condition has a block action. In a
block action, packet will be dropped immediately. So all packets from all hosts will
dropped in first condition. No packets will remain to match the second condition.
IMPORTANT: The deny condition is not really required, as a block condition for all traffic
as it is already created and placed in the end of all ACLs. It is called Implicit deny
statement.
Or
For single host entry we can use both 0.0.0.0 wildcard mask or host keyword.
In classic method we are allowed to insert new condition only at end of the ACL.
We cannot insert a new condition in the middle of ACL. The only way to insert new
line in middle is to delete existing ACL and create new ACL with modification. In
modern method we can insert new condition in ACL wherever we want without
recreating entire ACL.
In classic method we are not allowed to remove a condition from ACL. The only
way to remove condition is delete entire ACL and recreate it. In modern method we
can delete any condition from ACL.
Modern approach uses sequence numbers for conditions that we create. With
these sequence numbers we can modify an existing ACL without recreating it.
No matter which method we use to create a standard ACL, implanting process will be
same.
Examples:
Following commands will activate Standard ACL number 10 on Serial 0/0/0 interface in
inbound direction.
Following commands will activate Standard ACL name Secure_telnet on Serial 0/0/1
interface in outbound direction.
Key points
Ex: acce-list 102 deny tcp 192.168.1.0 0.0.0.255 host 172.16.0.100 eq www