08.02.2015 Views

Table of Contents

Table of Contents

Table of Contents

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When you name access lists, it makes sense to name them well. I’ve seen many installations<br />

<strong>of</strong> PIX firewalls where the inbound access list is named something like “out.”<br />

Imagine troubleshooting this command:<br />

access-group out in interface outside<br />

If you’re not used to configuring ASA or PIX firewalls, that command might be difficult<br />

to interpret. If the access list were instead named “Inbound,” the command would be<br />

much more readable:<br />

access-group Inbound in interface outside<br />

The ability to quickly determine what a device is configured to do can save time during<br />

an outage, which can literally save your job. I like to begin my access list names with<br />

capital letters to help identify them in code. This is a personal preference that may or<br />

may not suit your style—I’ve worked with people who complain when they have to<br />

use the Shift key when typing.<br />

Top-Down Processing<br />

Access lists are processed from the top down, one line at a time. When a match is made,<br />

processing stops. This is an important rule to remember when building and troubleshooting<br />

access lists. A common mistake is to add a specific line to match something<br />

that’s already been matched in a less specific line above it. Let’s look at an example<br />

from a 3750 switch:<br />

ip access-list extended GAD<br />

permit tcp any 10.10.10.0 0.0.0.255 eq www<br />

permit tcp any host 10.10.10.100 eq www<br />

permit tcp any host 10.10.10.100 eq domain<br />

In this example, the second permit line will never be matched, because the IP address<br />

and protocol are matched in the previous line. Even so, in the event that the first line<br />

doesn’t match, the second line will still be evaluated, wasting time and processing<br />

power. This is a very common problem in enterprise networks. On larger firewalls,<br />

where more than one person is administering the device, the problem can be severe. It<br />

may also be hard to spot, because it doesn’t prevent protocols from working. This type<br />

<strong>of</strong> problem is usually uncovered during a network audit.<br />

Most-Used on Top<br />

Access lists should be built in such a way that the lines that are matched the most are<br />

at the beginning <strong>of</strong> the list. Recall that an ACL is processed until a match is made. Once<br />

a match is made, the remainder <strong>of</strong> the ACL is not processed. If you’ve only worked on<br />

routers with small ACLs, this may not seem like a big deal, but in real-world enterprise<br />

firewalls, ACLs can be extensive. I’ve worked on firewalls where there were over 50,000<br />

rules in place. How many <strong>of</strong> those entries do you suppose were valid<br />

Designing Access Lists | 419

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!