10 Access Lists Flashcards

1
Q

What are Access Lists ?

A

An access list is essentially a list of conditions that categorize packets, and they really come in handy when you need to exercise control over network traffic. An ACL would be your tool of choice for decision making in these situations. One of the most common and easiest-to-understand uses of access lists is to filter unwanted packets when implementing security policies. For example, you can set them up to make very specific decisions about regulating traffic patterns so that they’ll allow only certain hosts to access web resources on the Internet while restricting others. With the right combination of access lists, network managers have the power to enforce nearly any security policy they can invent. Creating access lists is a lot like programming a series of if-then statements—if a given condition is met, then a given action is taken. If the specific condition isn’t met, nothing happens and the next statement is evaluated. Access-list statements are basically packet filters that packets are compared against, categorized by, and acted upon accordingly. Once the lists are built, they can be applied to either inbound or outbound traffic on any interface. Applying an access list causes the router to analyze every packet crossing that interface in the specified direction and take the appropriate action.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Three important rules that a packet follows when it’s being compared with an access list :

A

■ The packet is always compared with each line of the access list in sequential order—it will always start with the first line of the access list, move on to line 2, then line 3, and so on.

■ The packet is compared with lines of the access list only until a match is made. Once it matches the condition on a line of the access list, the packet is acted upon and no further comparisons take place.

■ There is an implicit “deny” at the end of each access list—this means that if a packet doesn’t match the condition on any of the lines in the access list, the packet will be discarded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Standard access lists

A

These ACLs use only the source IP address in an IP packet as the condition test. All decisions are made based on the source IP address. This means that standard access lists basically permit or deny an entire suite of protocols. They don’t distinguish between any of the many types of IP traffic such as Web, Telnet, UDP, and so on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Extended access lists

A

Extended access lists can evaluate many of the other fields in the layer 3 and layer 4 headers of an IP packet. They can evaluate source and destination IP addresses, the Protocol field in the Network layer header, and the port number at the Transport layer header. This gives extended access lists the ability to make much more granular decisions when controlling traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Named access lists

A

Technically there really are only two access lists since named access lists are either standard or extended and not actually a distinct type. They’re created and referred to differently than standard and extended access lists are, but they’re still functionally the same.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Inbound access lists

A

When an access list is applied to inbound packets on an interface, those packets are processed through the access list before being routed to the outbound interface. Any packets that are denied won’t be routed because they’re discarded before the routing process is invoked.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Outbound access lists

A

When an access list is applied to outbound packets on an interface, packets are routed to the outbound interface and then processed through the access list before being queued.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

General access-list guidelines that you should keep in mind when creating and implementing access lists on a router :

A

■ You can assign only one access list per interface per protocol per direction. This means that when applying IP access lists, you can have only one inbound access list and one outbound access list per interface. When you consider the implications of the implicit deny at the end of any access list, it makes sense that you can’t have multiple access lists applied on the same interface in the same direction for the same protocol. That’s because any packets that don’t match some condition in the first access list would be denied, and there wouldn’t be any packets left over to compare against a second access list!

■ Organize your access lists so that the more specific tests are at the top.

■ Anytime a new entry is added to the access list, it will be placed at the bottom of the list (use a text editor for access lists).

■ You can’t remove one line from an access list. If you try to do this, you will remove the entire list. This is why it’s best to copy the access list to a text editor before trying to edit the list. The only exception is when you’re using named access lists.

■ Unless your access list ends with a permit any command, all packets will be discarded if they do not meet any of the list’s tests. This means every list should have at least one permit statement or it will deny all traffic.

■ Create access list permit and deny statements first and then apply them to an interface. Any access list applied to an interface without access list test statements already created will not filter traffic.

■ Access lists are designed to filter traffic going through the router. They will not filter traffic that has originated from the router.

■ Place IP standard access lists as close to the destination as possible. This is the reason we don’t really want to use standard access lists in our networks. You can’t put a standard access list close to the source host or network because you can only filter based on source address and all destinations would be affected as a result.

■ Place IP extended access lists as close to the source as possible. Since extended access lists can filter on very specific addresses and protocols, you don’t want traffic to traverse the entire network just to be denied. By placing this list as close to the source address as possible, you can filter traffic before it uses up precious bandwidth.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Mitigating Security Issues with ACLs

A

The most common attack is a denial of service (DoS) attack. Although ACLs can help with a DoS, you really need an intrusion detection system (IDS) and intrusion prevention system (IPS) to help prevent these common attacks. Cisco sells the new Firepower and Firepower Threat Defense (FTD) products that is the best next generation firewall (NGFW) in the industry. Here’s a list of the many security threats you can mitigate with ACLs:

■ IP address spoofing, inbound

■ IP address spoofing, outbound

■ Denial of service (DoS) TCP SYN attacks, blocking external attacks

■ DoS TCP SYN attacks, using TCP Intercept

■ DoS smurf attacks

■ Denying/filtering ICMP messages, inbound

■ Denying/filtering ICMP messages, outbound

■ Denying/filtering Traceroute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List of rules to live by when configuring ACLs from the Internet to your production network to mitigate security problems:

A

■ Deny any source addresses from your internal networks.

■ Deny any local host addresses (127.0.0.0/8).

■ Deny any reserved private addresses (RFC 1918).

■ Deny any addresses in the IP multicast address range (224.0.0.0/4).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Standard Access Lists Configuration

A

Standard IP access lists filter network traffic by examining the source IP address in a packet. You create a standard IP access list by using the access-list numbers 1–99 or numbers in the expanded range of 1300–1999 because the type of ACL is generally differentiated numerically. Based on the number used when the access list is created, the router knows which type of syntax to expect as the list is entered. By using numbers 1–99 or 1300–1999, you’re telling the router that you want to create a standard IP access list, so the router will expect syntax specifying only the source IP address in the test lines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Access Lists Number Ranges

A

Corp(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1000-1099> IPX SAP access list
<1100-1199> Extended 48-bit MAC address access list
<1200-1299> IPX summary address access list
<1300-1999> IP standard access list (expanded range)
<200-299> Protocol type-code access list
<2000-2699> IP extended access list (expanded range)
<2700-2799> MPLS access list
<300-399> DECnet access list
<700-799> 48-bit MAC address access list
<800-899> IPX standard access list
<900-999> IPX extended access list
dynamic-extended Extend the dynamic ACL absolute timer
rate-limit Simple rate-limit specific access list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Denying a host

A

By using the access-list numbers 1–99 or 1300–1999, you’re telling the router that you want to create a standard IP access list, which means you can only filter on source IP address. Once you’ve chosen the access-list number, you need to decide whether you’re creating a permit or deny statement.

Corp(config)#access-list 10 deny ?
Hostname or A.B.C.D Address to match
any Any source host
host A single host address

The next step is more detailed because there are three options available in it:

  1. The first option is any parameter, used to permit or deny any source host or network.
  2. The second choice is to use an IP address to specify either a single host or a range of them.
  3. The last option is to use the host command to specify a specific host only. The any command is pretty obvious—any source address matches the statement, so every packet compared against this line will match. The host command is relatively simple too, as you can see here:

Corp(config)#access-list 10 deny host ?
Hostname or A.B.C.D Host address
Corp(config)#access-list 10 deny host 172.16.30.2
This tells the list to deny any packets from host 172.16.30.2. The default parameter is host. In other words, if you type access-list 10 deny 172.16.30.2, the router assumes you mean host 172.16.30.2 and that’s exactly how it will show in your running-config.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Wildcard Masking

A

Wildcards are used with access lists to specify an individual host, a network, or a specific range of a network or networks. Wildcards are used with the host or network address to tell the router a range of available addresses to filter. To specify a host, the address would look like this:
172.16.30.5 0.0.0.0
The four zeros represent each octet of the address. Whenever a zero is present, it indicates that the octet in the address must match the corresponding reference octet exactly. To specify that an octet can be any value, use the value 255. Here’s an example of how a /24 subnet is specified with a wildcard mask:
172.16.30.0 0.0.0.255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Controlling VTY (Telnet/SSH) Access

A
  1. Create a standard IP access list that permits only the host or hosts you want to be able to telnet into the routers.
  2. Apply the access list to the VTY line with the access-class in command.

Lab_A(config)#access-list 50 permit host 172.16.10.3
Lab_A(config)#line vty 0 4
Lab_A(config-line)#access-class 50 in

Because of the implied deny any at the end of the list, the ACL stops any host from telnetting into the router except the host 172.16.10.3 regardless of the individual IP address on the router being used as a target. It’s a good idea to include an admin subnet address as the source instead of a single host, but the reason I demonstrated this was to show you how to create security on your VTY lines without adding latency to your router.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Extended Access Lists

A

Applying a standard IP access list won’t allow users to get to one network service but not another because a standard ACL won’t allow you to make decisions based on both source and destination addresses. It makes decisions based only on source address. Using an extended access list will save the day because extended ACLs allow us to specify source and destination addresses as well as the protocol and port number, which identify the upper-layer protocol or application. An extended ACL is just what we need to affectively allow users access to a physical LAN while denying them access to specific hosts—even specific services on those hosts! You must use the extended access-list range from 100 to 199. The 2000–2699 range is also available for extended IP access lists.

17
Q

Extended Access Lists Configuration

A

Corp(config)# access-list 110 deny ?
<0-255> An IP protocol number
ahp Authentication Header Protocol
eigrp Cisco’s EIGRP routing protocol
esp Encapsulation Security Payload
gre Cisco’s GRE tunneling
icmp Internet Control Message Protocol
igmp Internet Gateway Message Protocol
ip Any Internet Protocol
ipinip IP in IP tunneling
nos KA9Q NOS compatible IP over IP tunneling
ospf OSPF routing protocol
pcp Payload Compression Protocol
pim Protocol Independent Multicast
tcp Transmission Control Protocol
udp User Datagram Protocol

In this output, you can see that any source IP address that has a destination IP address of 172.16.30.2 has been denied:

Corp(config)#access-list 110 deny tcp any host 172.16.30.2 ?

And once we have the destination host addresses in place, we just need to specify the type of service to deny using the equal to command, entered as eq. The following help screen reveals the options available now. You can choose a port number or use the application name:

Corp(config)#access-list 110 deny tcp any host 172.16.30.2 eq ?

18
Q

What do we need to do to deny access to a host at 172.16.50.5 on the finance department LAN for both Telnet and FTP services?

A

Here’s the ACL we must create:

Lab_A# config t
Lab_A(config)# access-list 110 deny tcp any host 172.16.50.5 eq 21
Lab_A(config)# access-list 110 deny tcp any host 172.16.50.5 eq 23
Lab_A(config)# access-list 110 permit ip any any

19
Q

We need to prevent Telnet access to the networks attached to the E1 and E2 interfaces.

A

Router(config)# access-list 110 deny tcp any 172.16.48.0 0.0.15.255 eq 23
Router(config)# access-list 110 deny tcp any 172.16.192.0 0.0.63.255 eq 23
Router(config)# access-list 110 permit ip any any
Router(config)# interface Ethernet 1
Router(config-if)# ip access-group 110 out
Router(config-if)# interface Ethernet 2
Router(config-if)# ip access-group 110 out

20
Q

Named ACLs

A

Named access lists are just another way to create standard and extended access lists. Let’s say you come into an existing network and are looking at access lists on a router. Suppose you find an access list 177, which happens to be an extended access list that’s very long. It be a whole lot easier to identify an access list with a name like “FinanceLAN” rather than one obscurely dubbed “177”? Named access lists allow us to use names for creating and applying either standard or extended access lists. There’s really nothing different about these ACLs aside from being identifiable in a way that makes sense to humans. There are some subtle changes to the syntax.

Lab_A(config)#ip access-list standard ?
<1-99> Standard IP access-list number
<1300-1999> Standard IP access-list number (expanded range)
WORD Access-list name
Lab_A(config)#ip access-list standard BlockSales
Lab_A(config-std-nacl)#

Lab_A#sh running-config | begin ip access
ip access-list standard BlockSales
deny 172.16.40.0 0.0.0.255
permit any
!

Next, I’ll need to apply the access list to the correct interface:
Lab_A#config t
Lab_A(config)#int fa0/1
Lab_A(config-if)#ip access-group BlockSales out

Allow HTTP access to the Finance server from source Host B only. All other traffic is permitted:

Lab_A#config t
Lab_A(config)#ip access-list extended 110
Lab_A(config-ext-nacl)#permit tcp host 192.168.177.2 host 172.22.89.26 eq 80
Lab_A(config-ext-nacl)#deny tcp any host 172.22.89.26 eq 80
Lab_A(config-ext-nacl)#permit ip any any
Lab_A(config-ext-nacl)#int fa0/1
Lab_A(config-if)#ip access-group 110 out

21
Q

Remarks

A

They give you the ability to include comments (remarks) regarding the entries you’ve made in both your IP standard and extended ACLs. Remarks they efficiently increase your ability to examine and understand your ACLs. They only show up in the running-config.

R2#config t
R2(config)#access-list 110 remark Permit Bob from Sales Only To Finance
R2(config)#access-list 110 permit ip host 172.16.40.1 172.16.50.0 0.0.0.255
R2(config)#access-list 110 deny ip 172.16.40.0 0.0.0.255 172.16.50.0 0.0.0.255
R2(config)#ip access-list extended No_Telnet
R2(config-ext-nacl)#remark Deny all of Sales from Telnetting to Marketing
R2(config-ext-nacl)#deny tcp 172.16.40.0 0.0.0.255 172.16.60.0 0.0.0.255 eq 23
R2(config-ext-nacl)#permit ip any any

22
Q

Monitoring Access Lists

A

show access-list
Displays all access lists and their parameters configured on the router. Also shows statistics about how many times the line either permitted or denied a packet. This command does not show you which interface the list is applied on.

show access-list 110
Reveals only the parameters for access list 110. Again, this command will not reveal the specific interface the list is set on.

show ip access-list
Shows only the IP access lists configured on the router.

show ip interface
Displays which interfaces have access lists set on them.

show running-config Shows the access lists and the specific interfaces that have ACLs applied on them.

23
Q

What are the standard and extended IP access-list number ranges ?

A

The number ranges you can use to configure a standard IP access list are 1–99 and 1300–1999. The number ranges for an extended IP access list are 100–199 and 2000–2699.

24
Q

What is implicit deny ?

A

At the end of every access list is an implicit deny. This means is that if a packet does not match any of the lines in the access list, it will be discarded. Also, if you have nothing but deny statements in your list, the list will not permit any packets.

25
Q

the standard IP access-list configuration command :

A

To configure a standard IP access list, use the access-list numbers 1–99 or 1300–1999 in global configuration mode. Choose permit or deny, then choose the source IP address you want to filter on.