Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


June 2008

9 Steps to Setting Up a Cisco Router

Practical Networking and IOS
RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

4. Set up access lists
Next, you need to configure two access lists, both of which will be applied in the inbound direction. Note that in the remainder of this article, I use the terms inbound and outbound frequently. As Figure 1 shows, inbound refers to traffic entering the interface; outbound refers to traffic leaving the interface. Listing 1 shows the two access lists: The first will be applied to the LAN interface (in my case, BVI1), and the second will be applied to the WAN interface (in my case, FastEthernet4).

Access list 100 will be applied to the LAN interface. The first line sets up the access list and places the router in access list configuration mode. The next line allows any IP traffic matching the network (192.168.100.0/24) to pass into the interface. If the subnet mask looks odd to you, that’s not a typo. IOS uses inverse subnet masks in its access lists. You can compute these manually quite easily by subtracting each octet of your standard mask from 255. So mask 255.255.252.0 becomes 0.0.3.255, 255.252.0.0 becomes 0.3.255.255, and so on.

The third line denies any other traffic from entering the LAN interface. Although all access lists have an implicit deny all at the end, including an explicit deny line is a good practice so that you know where your access list ends and to aid the readability of your configuration. The final line takes the router out of access list configuration mode.

Access list 101 will be applied to the WAN interface. The first line sets up the access list and places the router in access list configuration mode. I use a cable modem, so the next line allows DHCP (bootps and bootpc) traffic to enter the WAN interface. Without this entry, my WAN interface would never receive a public IP address, and I’d never get on the Internet. You can use the same configuration in a test lab as long as you have a DHCP server set up and your networking team is OK with what you’re doing. The third and fourth lines allow any TCP and UDP traffic from any source destined for anywhere to enter the WAN interface.

The fifth, sixth, and seventh lines allow any Internet Control Message Protocol (ICMP) traffic that’s from any source; is headed for any destination; and is an echo-reply, time-exceeded, or unreachable message to enter the WAN interface. You should be cautious about which types of ICMP traffic you allow on your network because ICMP can be used for various exploits, especially Denial of Service (DoS) attacks. However, you need these three lines to use ping and traceroute for troubleshooting. The last two lines are the same as in the LAN access list.

5. Configure basic TCP/UDP/ ICMP inspection
My IOS version includes the IOS firewall feature set. If yours does as well, you’ll definitely want to use it. Although the IOS firewall doesn’t offer the deep application-layer inspection that, say, an ISA Server firewall does, enabling it is a good idea for two reasons. The first is to ensure that traffic which is claiming to be TCP, UDP, or ICMP is in fact TCP, UDP, or ICMP. The second is that enabling this inspection also enables Context-Based Access Control. CBAC allows IOS to create dynamic access list entries that allow return traffic to flow through the router. Although our access lists above are very generic (e.g., all TCP is allowed), once your setup is working, you’ll certainly want to harden them, set up internal servers reachable from the Internet, and so on. After you’ve done that, CBAC will allow return traffic to pass through the router. For example, if you browse to Amazon.com, CBAC will dynamically place entries in the inbound access list applied to your external (WAN) interface to allow return traffic from Amazon.com to enter the router. When the connection is closed, these entries are dynamically removed.

First, set up a TCP SYN timeout threshold to help mitigate SYN flood DoS attacks:

 ip tcp synwait-time 30

This command tells IOS to drop any TCP session that’s not established within 30 seconds.

Next, set up an inspection rule each for ICMP, TCP, and UDP:

 ip inspect name InspectRule icmp
  ip inspect name InspectRule tcp
  ip inspect name InspectRule udp

(You can substitute a name you prefer for InspectRule.)

6. Apply the access lists and inspection rules
Now, apply both the access lists and the inspection rules to the appropriate interfaces in the inbound direction. For the WAN interface—in my case, FastEthernet4— first enter the interface configuration mode:

 interface FastEthernet4

Then apply the access list:

 ip access-group 101 in

(Note that you use access-group, not access-list here.) Then apply the inspection rule:

 ip inspect InspectRule in

And finally, exit the interface configuration mode:

exit

Next, for the LAN interface (BVI1, in this example), type:

 interface BVI1
  ip access-group 100 in
  ip inspect InspectRule in
  exit

Some of you sharpies might be wondering if you could apply the IP inspection rule in the outbound direction as well as or in place of the inbound direction. The answer is yes, you can.

Continued on page 4

   Previous  1  2  [3]  4  Next 


Learning Path To learn about a free IOS auditing tool
"Use RAT to Improve Your Network's Router Security"


To set up a lab network with existing Cisco equipment and IOS
"Cisco's Simple Route to a Secure Lab Environment"


Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Articles Cisco's Simple Route to a Secure Lab Environment

Use RAT to Improve Your Network's Router Security

Networking Whitepapers Should Your Email Live in the Cloud?

A New Backup and DR Solution Available for SMBs

Related Events Managing IT Across Multiple Locations

No Do Overs – Get Virtualization Right the First Time

Check out our list of Free Email Newsletters!

Networking eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

SQL Server Administration for Oracle DBAs

Related Networking Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement