Access Control List or ACL is a technic of controling network traffic. It is a list of rules with which traffic flow can be manipulated - permitted or denied. By default, traffic flow from the interface with the higher security level (for example "inside" interface) to interface with the lower security level (example "outside" interface) is allowed by default, but the flow of traffic from "outside" to the "inside" interface must be explicitly permited.
The syntax of acl is:
access-list name extended permit | deny protocol source_IP destination_IP eq | gt | lt port.
In the example below, "outside_in" is the name of acl, after which follows the keyword "extended" - which defines type of acl. After that folows the permit | deny statement. "Tcp" defines protocol (it can be udp, icmp, ip ...), "any" is the soure_IP (it can be a real IP address followed by the subnetmask, keyword "host" followed by the real IPaddress - defines specific host, or it can be keyword "any" like in our example which means it can be any address/all), 88.134.155.11 is destination_IP, "eq" stands for "equal" to ftp port 21. In other words, this access-list allows tcp traffic from any outside address to 88.134.155.11 on port 21.
With the command access-group, acl "outside_in" is bound the the "outside" interface, and to the inbound intraffic. Acl needs to bind on a interface only once:
If You want to list all rules in specific access-list, use show acess-list with "access-list name":
Rules in acl-s are checked sequentially from top to bottom. Every rule in acl has a line number, so rules with lower line number are processed prior. Also every access-list has bult-in implicit "deny all" statement at the end, which is not visible with the "show access-list" command. This means that only explicitly permitted flow of traffic is allowed.
If want to deny traffic from specific address, example from 78.234.5.22, You have to insert that rule in acl before "permit" rule that allows all traffic:
Let's see couple of more examples.
Deny all traffic from 209.165.211.0 255.255.255.240 subnet:
Deny web traffic traffic from 209.165.221.0 255.255.255.0 subnet to 88.134.155.12:
Allow all traffic to ports greater than 11000 to address 88.134.155.12:
Allow icmp traffic from 88.134.155.12 to 149.145.221.34:
Allow traffic to address 88.134.155.12 on a range of ports 11500-11600:
Comments
Post a Comment