<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techinvasion.net &#187; Cisco</title>
	<atom:link href="http://www.techinvasion.net/category/cisco/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techinvasion.net</link>
	<description></description>
	<lastBuildDate>Tue, 13 Jul 2010 15:44:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MPLS VPN Services</title>
		<link>http://www.techinvasion.net/2010/02/09/mpls-vpn-services/</link>
		<comments>http://www.techinvasion.net/2010/02/09/mpls-vpn-services/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 02:04:40 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[MPLS VRF Routing VPN]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=176</guid>
		<description><![CDATA[This article with aim to take a in depth look at MPLS and explain how your packets get from one side of the MPLS cloud to another. Hopefully this will give you some perspective that will prove useful in troubleshooting issues in your own MPLS implementations. Most enterprise engineers MPLS experience goes something like this: [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-178" href="http://www.techinvasion.net/2010/02/09/mpls-vpn-services/mpls-drawing/"><img class="alignleft size-thumbnail wp-image-178" title="MPLS Architecture" src="http://www.techinvasion.net/wp-content/uploads/2010/02/mpls-drawing-150x150.png" alt="" width="90" height="90" /></a><br />
This article with aim to take a in depth look at MPLS and explain how your packets get from one side of the MPLS cloud to another. Hopefully this will give you some perspective that will prove useful in troubleshooting issues in your own MPLS implementations.</p>
<p>Most enterprise engineers MPLS experience goes something like this: The company needs to connect the office in Miami and the office in London with the corporate headquarters office in Chicago. The VPN design needs to be flexible, and most importantly the network connecting all 3 sites needs to be full mesh. By this I mean to say that any office should be able to talk to any other office using this MPLS VPN. At this point you contact your MPLS provider and ask them to provision 3 MPLS links, 1 for each of the above mentioned offices. The MPLS Sales team puts you in contact with their engineering department and they ask you a couple questions that they need answered in order to properly provision your lines. the number one question that they ask is &#8220;How do you want to send us routes?&#8221;  now depending on the size of your organization and the dynamic or static nature of your network you can opt for several options here are 3 of the most common.</p>
<p>1. Static Routes</p>
<p>2. BGP Peering</p>
<p>3. OSPF Peering</p>
<p>Now if your network is very small, say for instance you have 3 shoe stores that need to talk to the corporate office / warehouse, then you might opt for the static route option. If you are a large organization that is publicly traded and has a robust network and security policy in place you will most likely choose the second option as this gives you the most security and control over what routes enter and leave your network.  However the third option is also very popular, mainly because many organizations are already running OSPF, so this makes it that much easier to peer with the ISP. However using the same IGP to peer with your MPLS provider as you use to run your internal networks does leave you at risk. There are a host of vulnerabilities OSPF has that could be exploited even if you are using OSPF MD5 authentication such as LSA injection attacks. However the biggest reason not to do this is that if the ISP makes a mistake they could inadvertently dump hundred or thousands of routes into your routing table which could destabilize your entire network.</p>
<p>Now wouldn&#8217;t you know after all that negative talk about ospf peering. The example I am going to talk about below is exactly that OSPF peering.</p>
<p><a href="http://www.techinvasion.net/wp-content/uploads/2010/02/mpls-drawing.png"><img class="alignleft size-medium wp-image-178" title="MPLS Architecture" src="http://www.techinvasion.net/wp-content/uploads/2010/02/mpls-drawing-300x136.png" alt="" width="300" height="136" /></a></p>
<p>Please click on the above diagram for a larger view, you may want to download it as well and open it in a image view to zoom in on some of the smaller text and details.</p>
<p>In the example above you have 2 companies. To keep things simple we will call them Company A and Company B. Company A has 2 sites that need to communicate using MPLS, Company B also has 2 sites that need to communicate using MPLS. This ISP is lucky enough to get the business for both Company A and Company B. The ISP has a core network made up of an unspecified number of routers. In this example we will look at a small portion of the companies network. Our little piece of the network shows both customer sites connected to PE routers or (Provider edge) routers. These routers are responsible for providing access to the customers. The core of the network is made of P routers, or Provider routers. This provider has decided to convert their entire network to MPLS. This gives the ISP better performance by allowing the routers to utilize the ASICS built into the routers to switch the packets at incredible speeds. It also allows the ISP to offer many new services such as MPLS VPN&#8217;s as well as VPLS or (Virtual Private Lan Service.) In addition to these services the ISP can Use the tunneling aspect of MPLS to create Traffic engineering tunnels that will allow it to very precisely control which paths through the Provider network certain traffic takes. It also allows them to set very specific and granular QOS or COS policies for customers.</p>
<p>MPLS confuses many people because of its amorphous place in the OSI model. MPLs officially is a layer 2.5 protocol because Layer 3 protocols can be encapsulated in MPLS. MPLS stand for Multi Protocol Label Switching. MPLS can carry many different Layer 3 protocols inside it, just as ethernet a layer 2 protocol can carry TCP/IP inside its frames. However MPLS is more complicated than that. Many people can easily be confused because MPLs depends on the routing table in order to function, in this sense you could think of it like a layer 4 protocol. MPLS cannot function if the routing table is not working. MPLS depends on LDP or the Label Distribution Protocol to form adjacencies with neighbors and distribute its list of labels as well as receive labels from peers. LDP forms adjacencies at the layer 3 level and used the routing table to find peers. LDP is similar to OSPF in that is uses the highest Loopback address to identify itself. In our network Diagram each switch has a loopback address. All of the P routers including the PE routers are running OSPF. This OSPF instance is advertising the subnets owned by the ISP, many ISP&#8217;s use ISIS for this purpose, in fact many ISP&#8217;s use private addresses in their network especially if there network is a transit network. There are many situation in which you have public IP traffic traversing a private network connecting another public network. The 3 P routers and 2 PE routers need to know how to get to all of the non public IP addresses that the ISP is using to connect their network together. OSPF is used to synchronize these addresses as well as advertise each routers loopback address. Once all routers have formed neighbor relationships and all routes have been distributed through OSPF LDP is able to use the routing table to form adjacencies with other routers using their loopback addresses.</p>
<p><a href="http://www.techinvasion.net/wp-content/uploads/2010/02/pe-vrf-config.png"><img class="alignleft size-full wp-image-212" title="pe-vrf-config" src="http://www.techinvasion.net/wp-content/uploads/2010/02/pe-vrf-config.png" alt="" width="248" height="120" /></a></p>
<p>Once LDP has formed neighbor relationships with other routers using their loopback addresses it is able to start synchronizing the tag database. MPLS Assigns a tag or label to every route in the routing table. when a packet enters the MPLS PE routers interface, the router does a route lookup to determine the tag for the destination of the packet. Once this decision had been made, the router will push the tag on the packet and send it out the appropriate interface. The next router in line  has a simpler job. This router does not even have to look at the routing table, it can just look at its forwarding table and see what new tag should be assigned to the packet and send the packet on its way. the reason why this is so fast is because the MPLS tags were designed to look like layer 2 frames to the ASICS on the routers. This allows the programmers to leverage the same high speed chips used to route packets from one switch port to another based on mac addresses.</p>
<p><span id="more-176"></span></p>
<p><a href="http://www.techinvasion.net/wp-content/uploads/2010/02/p-mpls-forwarding.png"><img class="alignleft size-full wp-image-209" title="p-mpls-forwarding" src="http://www.techinvasion.net/wp-content/uploads/2010/02/p-mpls-forwarding.png" alt="" width="580" height="156" /></a></p>
<p>In MPLS the language is push and pop. to push a tag is to add a tag to a packet and to pop is to remove a tag from a packet.</p>
<p>Once MPLS is working the ISP can begin to configure its client connections. To do this the ISP creates two VRF tables (Virtual Routing forwarding). The first VRF table we will call CompanyA and the second VRF table we will call CompanyB. It is important to add 2 things to each VRF table. The first thing is the route-target and the second is the route-discriminator. The route target is used by BGP as an extended community attribute. This lets BGP and other protocols determine what routes should be added to a VRF instance, and it also lets BGP know what routes are from a VRF instance.</p>
<p><a href="http://www.techinvasion.net/wp-content/uploads/2010/02/pe-ospf.png"><img class="alignleft size-full wp-image-213" title="pe-ospf" src="http://www.techinvasion.net/wp-content/uploads/2010/02/pe-ospf.png" alt="" width="397" height="197" /></a></p>
<p>This is important, because we need a way to get the routes from Company A site 1 into Company A site 2 router without mixing them up with routes from any other client. This is one of the key factors that lets two way route redistribution function correctly.</p>
<p>Once the VRF is created the next thing to do is go to the interface that connects the customer and add that interface to the Companies VRF. Once you do this the connected route for that interface should no longer show up on the main routing table. Once this step is complete it is time to configure a second instance of OSPF to communicate with the CPE equipment. this is done by specifying the VRF name when creating the new instance of OSPF.</p>
<p><a href="http://www.techinvasion.net/wp-content/uploads/2010/02/pe-bgp.png"><img class="alignleft size-full wp-image-214" title="pe-bgp" src="http://www.techinvasion.net/wp-content/uploads/2010/02/pe-bgp.png" alt="" width="397" height="331" /></a></p>
<p>Now that the OSPF adjacency is up with the customer you should be able to see a list of the routes under that VRF. The next step is to establish a BGP neighbor relationship with the other PE routers in the ISP or a Route Reflector depending on the size of the environment. Once the BGP relationship is established, the only thing you have to do is redistribute the OSPF routes into BGP and vice versa under the appropriate OSPF Instance.</p>
<p>The end users should see the OSPF routes as simple IA routes. At the end of this post I will attach the full configs for all routers used incase you want to duplicate this in a lab or use GNS3 or Dynamips.</p>
<div id="attachment_218" class="wp-caption alignleft" style="width: 641px"><a href="http://www.techinvasion.net/wp-content/uploads/2010/02/cpe-routes.png"><img class="size-full wp-image-218" title="cpe-routes" src="http://www.techinvasion.net/wp-content/uploads/2010/02/cpe-routes.png" alt="" width="631" height="346" /></a><p class="wp-caption-text">Routes as seen by end USER or MPLS Subscriber</p></div>
<p>Here are links to all the configs for all routers used in the lab &#8211;&gt;<a href="http://www.techinvasion.net/wp-content/uploads/2010/02/mpls.zip">Router Configs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2010/02/09/mpls-vpn-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Public DMVPN network.</title>
		<link>http://www.techinvasion.net/2009/10/03/public-dmvpn-network/</link>
		<comments>http://www.techinvasion.net/2009/10/03/public-dmvpn-network/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 03:10:04 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Juniper]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=147</guid>
		<description><![CDATA[I was thinking about a new project idea. I was thinking of setting up a dynamic multipoint VPN concentrator. Put a small LAN behind it with a couple of servers. Put the configuration instructions on a webpage for Juniper and Cisco devices. I was thinking to run BGP routing protocol over the interface as it [...]]]></description>
			<content:encoded><![CDATA[<p>I was thinking about a new project idea. I was thinking of setting up a dynamic multipoint VPN concentrator. Put a small LAN behind it with a couple of servers. Put the configuration instructions on a webpage for Juniper and Cisco devices. I was thinking to run BGP routing protocol over the interface as it scales reasonably well. </p>
<p>The important part here is I wanted to create a web form which requests the internal and external address ranges of anyones network. Once that person submits that information I will have a Peal script pull those messages from the web form, parse the information, insert the networks and IP addresses into a J-Script template and apply it to my Juniper SRX router automatically.</p>
<p>This project will enable Cisco and Juniper students to participate in the environment and create a public VPN network where p2p APPS and anything else can run over the network without having to worry about any prying eyes. I want to see how far this project will scale. I was even envisioning a time when other people with idle equipment can volunteer to become a secondary hub to take some of the load once my connection reaches 10 thousand or so tunnels. Because of the way DMVPN works. The tunnels between sites will open up as needed when a user from site A needs to talk to site B. This combined with using BGP as the routing protocol will mean that it will require very little bandwidth as traffic destined from site A to C will not transit site B if site B in this scenario is the hub.</p>
<p>Anyways if anyone out there is interested please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2009/10/03/public-dmvpn-network/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using IP SLA with Route-maps</title>
		<link>http://www.techinvasion.net/2009/07/19/using-ip-sla-with-route-maps/</link>
		<comments>http://www.techinvasion.net/2009/07/19/using-ip-sla-with-route-maps/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 14:38:07 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[access list]]></category>
		<category><![CDATA[ip sla]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[route-map]]></category>
		<category><![CDATA[rtr]]></category>
		<category><![CDATA[sla]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[wpad]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=132</guid>
		<description><![CDATA[I recently came across a problem that is not an uncommon problem that small businesses face. I came up with several solutions to their problems and I thought I would take a minute to discuss one of those solutions. This customer has a business requirement to use a proxy server for all outgoing web traffic. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a problem that is not an uncommon problem that small businesses face. I came up with several solutions to their problems and I thought I would take a minute to discuss one of those solutions. This customer has a business requirement to use a proxy server for all outgoing web traffic. This on the face of it seems like a simple problem, there are many good proxy vendors out their such as my favorite vendor Blue Coat. There are many free alternatives such as Squid Caching Proxy server.<br />
<span id="more-132"></span><br />
            Now this is where things get interesting, the office is still using novel e-directory, yes I know Novell is ancient but that is what they are using. The other interesting issue they have is that they went with a proxy server vendor that does not support WCCP. Enough with the limitations now lets talk requirements! The business requirements are as follows, using their existing IT resources and infrastructure they need a proxy solution that is simple to support and highly available, they also need a way of insuring all clients are using the proxy and they do not have the resources to run all over the network manually entering proxy setting or dealing with an overwhelming number of support calls related to incorrect proxy settings. Now that we are done with the limitations and requirements lets spend a little time talking about proxy solutions. </p>
<p>The most popular solution today is to use some sort of interception caching mechanism such as WCCP. Now WCCP is a Cisco protocol that has been more or less adopted by many other vendors even though the name is different foundry supports this protocol in their layer 4 switches, juniper supports it although under a different name, as well as HP switch and router products. The way WCCP works is to grab packets matching either an access-list or the built in web-cache group and forward those packets to the proxy, their by intercepting the packets as they reach the routed interface upstream from the end user. Now Cisco routers do this by creating a one-way GRE tunnel while Cisco switches perform this by using L2 redirects. If you are configuring WCCP on a Catalyst 6500 switch you have a choice of using L2 redirects or GRE tunnels.</p>
<p>The second most popular way to insure inform proxy setting across an enterprise is to use WPAD or (Web Proxy Auto Discovery Protocol) . Wpad works by writing a small JavaScript function in a text file, which tells the browser the proxy settings and what domains or subnets are excluded from the proxy such as local settings. Once you create your text file you save it to a web server on the local LAN in the root directory. An example would be <a href="http://webserver.mycompany.com/wpad.dat">http://webserver.mycompany.com/wpad.dat</a> .</p>
<p>An example of the contents of the above file are as follows:</p>
<pre class="prettyprint">
function FindProxyForURL(url, host) {
// our local URLs from the domains below example.com don't need a proxy:
if (shExpMatch(url,"*.techinvasion.local/*"))   {return "DIRECT";}
// URLs within this network are accessed through
// port 8080 on fastproxy.example.com:
if (isInNet(host, "10.0.0.0",  "255.255.255.0"))    {
return "PROXY proxy.techinvasion.local:3128";
 }
// All other requests go through port 3128 of proxy.example.com.
// should that fail to respond, go directly to the WWW:
return "PROXY proxy.techinvasion.local:3128; DIRECT";
}
</pre>
<p>The next step would be to add option 252 to the dhcp scope with an ASCII text entry of the web server path to the wpad.dat file as listed above. On a Cisco router with DHCP the entry would look like the following:</p>
<pre class="prettyprint">
ip dhcp pool lan
     network 10.0.0.0 255.255.255.0
     update dns both
     domain-name techinvasion.local
     default-router 10.0.0.254
     dns-server 10.0.0.9 10.0.0.2
     option 252 ascii "http://stats.techinvasion.local/proxy.pac"
     lease infinite
 !
</pre>
<p>After this is done you should be in business. The only problem with this approach is that if you do not have active directory to force enable automatic proxy detection in internet explorer you really have no way to force users to look for this pac file. This can create uniformity problems and generate more calls to the help desk.</p>
<p>            The final way we can configure the proxy is to use route-maps to redirect all web traffic to the proxy. The only problem with this approach is that if for some reason the proxy Is to go down the route-map will be directing traffic to a black hole!  To remedy this we can use the IP-SLA feature to monitor the proxy and deactivate the route-map if the proxy is unavailable.</p>
<p>Now some things to remember, the route-map is only sending the traffic on port 80 to the proxy on port 80, if your proxy runs on a different port you will need to do a port redirect using ipfilter on FreeBSD based proxies, or ipchains on Linux based proxies to change the traffic to the correct port. Ok let get started with our configuration.</p>
<p>Step one create a http monitor that will use your proxy to pull an outside site like yahoo.com.</p>
<pre class="prettyprint">
ip sla monitor 1
 type http operation get url http://www.yahoo.com name-server 10.0.0.9 proxy http://10.0.0.8/
 timeout 5000
!
ip sla monitor schedule 1 start-time now
</pre>
<p>The above code polls yahoo.com every 60 seconds to verify that the proxy server is working. Once you have that turned on you can issue the following commands to test it.</p>
<pre class="prettyprint">
#sh ip sla monitor statistics 1
Round trip time (RTT)            Index 1
            Latest RTT: 266 ms
Latest operation start time: 04:19:13.020 edt Mon Jul 13 2009
Latest operation return code: OK
Latest DNS RTT: 0 ms
Latest TCP Connection RTT: 18 ms
Latest HTTP Transaction RTT: 248 ms
Number of successes: 55
Number of failures: 5
Operation time to live: 0
</pre>
<p>If you see:<br />
Last operation return code: OK</p>
<p>Then that means everything is ok, it will say timeout if the proxy is down. Now I do the proxy test on port 80 because I want to verify that the ipchains port redirection rule is working as well, however you could specify a different port such as 3128 or 8080 if you wanted to.</p>
<p>The next step is to build the route-map and the track object. The track object is what the route map references to check availability of the next hop, in this case the next hop is the proxy. You setup as track object as follows.</p>
<p>Track option1 option2 option3 </p>
<p>Option 1<br />
(&lt;1-500 &gt;     Tracked object)</p>
<p>Option 2<br />
(interface  Select an interface to track)<br />
  (ip         IP protocol)<br />
  (list       Group objects in a list)<br />
  (rtr        Response Time Reporter (RTR) entry)</p>
<p>Option 3<br />
(&lt;1-2147483647&gt;  Entry number)  ß this refers to the monitor number in the IP SLA command</p>
<p>In our case we want a response time reporter because we are interested in up/down information about the proxy.</p>
<pre class="prettyprint">
track 1 rtr 1
</pre>
<p>Now we need to build and apply the route-map.  First we need to build an access-list to specify the interesting traffic the route-map will be forwarding.</p>
<pre class="prettyprint">
ip access-list extended proxy
10 deny ip host 10.0.0.8 any
! Block proxy traffic, we do not want to create a routing loop.
20 permit tcp 10.0.0.0 0.0.0.255 any eq 80
</pre>
<p>Here is the appropriate route-map below</p>
<pre class="prettyprint">
route-map proxy permit 10
 match ip address proxy
 set ip next-hop verify-availability 10.0.0.8 1 track 1
</pre>
<p>To test this we can issue the command</p>
<pre class="prettyprint">
#show route-map proxy
route-map proxy, permit, sequence 10
  Match clauses:
    ip address (access-lists): proxy
  Set clauses:
    ip next-hop verify-availability 10.0.0.8 1 track 1  [up]
  Policy routing matches: 41673 packets, 6145267 bytes
</pre>
<p>You will notice the “UP” this means that it sees our track object and it is getting th response time code from the ip sla monitor that we setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2009/07/19/using-ip-sla-with-route-maps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rotary Pools for Semi-Static NAT / Port range Forwarding</title>
		<link>http://www.techinvasion.net/2008/12/22/rotary-pools-for-semi-static-nat-port-range-forwarding/</link>
		<comments>http://www.techinvasion.net/2008/12/22/rotary-pools-for-semi-static-nat-port-range-forwarding/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 21:23:41 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Cisco Port Range Forwarding]]></category>
		<category><![CDATA[Destination Pools]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[NAT Ranges]]></category>
		<category><![CDATA[Rotary Pools]]></category>
		<category><![CDATA[Static NAT]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=84</guid>
		<description><![CDATA[  Cisco routers have a very robust network address translation feature set. The NAT software allows you to control translation with access-list, route-maps, and destination pools. With the wide array of commands, it is sometimes difficult for beginners and experts to figure out how to combine these elements to solve a problem.       [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt; text-indent: 0.5in;"><a href="http://www.techinvasion.net/wp-content/uploads/2008/12/topology1.png"></a> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-indent: 0.5in;"><span style="font-size: small; font-family: Times New Roman;">Cisco routers have a very robust network address translation feature set. The NAT software allows you to control translation with access-list, route-maps, and destination pools. With the wide array of commands, it is sometimes difficult for beginners and experts to figure out how to combine these elements to solve a problem.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="mso-spacerun: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p style="text-align: center;"> </p>
<p style="text-align: center;"> </p>
<p style="text-align: center;"> </p>
<p><img class="alignnone size-full wp-image-83" title="topology1" src="http://www.techinvasion.net/wp-content/uploads/2008/12/topology2.png" alt="" width="500" height="448" /></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"><span id="more-84"></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;">I have a small network at home for the computers in my house, and I find that some of the strangest configurations and explorations come about because I try to solve problems in a way that is cost affective with the limited broadband available to consumers. I recently purchased a CheckPoint UTM firewall appliance to add to my network. CheckPoint invented the stateful firewall and has one of the best firewalls in the market. I wanted to add this firewall to my network but I faced 2 main problems. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<ol style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-size: small; font-family: Times New Roman;">The first problem is that my ISP only offers 1 static IP, and my router connects with a WIC1-ADSL card. </span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-size: small; font-family: Times New Roman;">The second problem Is that my router is also a call manager express server and therefore needs to be able to receive traffic destined for the router itself.</span></li>
</ol>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in; text-indent: 0.25in;"><span style="font-size: small; font-family: Times New Roman;">Notice that the outside interface of the firewall has a private IP address. This is a necessity because my ISP only offers 1 static IP and it must be assigned to the router. This is a problem if I leave my router configured the way it was with port overloading enabled, all the traffic not specifically forwarded via the router will be dropped at the Cisco which renders the inside firewall useless.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span style="mso-tab-count: 1;">      </span>So the first thing I did was to change the following configuration from port overloading to static NAT</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"><strong>Original Configuration</strong></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"> </p>
<pre class="prettyprint">ip nat inside source list 10 interface dialer1 overload

access-list 10 permit ip 10.11.0.0 0.0.0.255
access-list 10 permit ip 192.168.10.0 0.0.0.255</pre>
<p><span style="font-size: small; font-family: Times New Roman;"><strong>New Test Configuration</strong></span></p>
<pre class="prettyprint">ip nat inside source static 10.11.0.1 interface dialer1</pre>
<p><span style="font-size: small; font-family: Times New Roman;">     The problem with the above configuration is that it forwards all packets to the firewall. This means that packets from my VOIP provider destined for the call manager software on the router itself were being forwarded to the firewall. This is a big problem and one that stumped me for a while. </span><span style="font-size: small; font-family: Times New Roman;">In order to fix this problem I decided to use “Destination Lists.” Destination Lists allow the router to evaluate incoming connections based on an access-list and translate the packets matching the criteria to hosts in a specific pool. </span></p>
<p><span style="font-size: small; font-family: Times New Roman;">     The interesting thing about this technique is that you can have as many pools and destination lists as you want, which means that you can use this technique to translate ranges of ports to different hosts. I know many newbies to Cisco routers look for a port range forwarding mechanism similar to what is available on consumer home gateways and routers like those from D-Link and Linksys. </span><span style="font-size: small; font-family: Times New Roman;">The following configuration allows all ports and protocols to be forwarded to the firewall except for any traffic from the VOIP provider.</span></p>
<p> </p>
<pre class="prettyprint">ip host sip.broadvoice.com 98.98.200.12
!
!
ip nat inside source list 10 interface Dialer1 overload
!
ip nat pool nonvoip 10.11.0.1 10.11.0.1 netmask 255.255.255.0 type rotary
!
ip nat inside destination list 101 pool nonvoip
!
!
      access-list 10 permit ip 10.11.0.0 0.0.0.255
      access-list 10 permit ip 192.168.10.0 0.0.0.255
      !
      Access-list 101 deny ip host 98.98.200.12 any
      Access-lsit 101 permit ip any any</pre>
<p> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">Lets take the above from the beginning. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">The first line above code, hard codes the ip address of the Broadvoice server. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">The second line configures the NAT for port address translation just like a normal PAT configuration.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">The next line creates a rotary pool called nonvoip with the ip address of<span style="mso-spacerun: yes;">  </span>the outside firewall as the only IP address in the pool.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">The 4th line in the configuration tells the router to check access-list 101 and translate packets that match that access-list to the rotary pool nonvoip. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">Access-list 10 is used to PAT the VOIP network And the 10.11.0.0 network which is used for the external interface on the firewall. Access-list 10 is required for nat to function.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">Access-list 101 tells the router to exclude all traffic from the NAT process, but send every other protocol and port to the outside interface of the checkpoint firewall.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: small; font-family: Times New Roman;">The above configuration can also be easily modified to forward port ranges to different hosts on the network. Once you figure out that you can have as many destination pools as you want with as many access-lists as you want the combination of port forwarding options becomes almost endless. For instance the above can be modified as follows to forward a range of ports to two different hosts.</span></p>
<pre class="prettyprint">ip nat inside source list 10 interface Dialer1 overload
!
ip nat pool groupA 10.11.0.1 10.11.0.1 netmask 255.255.255.0 type rotary
!
ip nat pool groupB 10.11.0.2 10.11.0.2 netmask 255.255.255.0 type rotary
!
ip nat inside destination list 101 pool groupA
!
ip nat inside destination list 101 pool groupB

!
      access-list 10 permit ip 10.11.0.0 0.0.0.255
      !
      Access-lsit 101 permit tcp any any range 8000 9400
      !
       Access-list 102 permit tcp any any range 50 1024</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/12/22/rotary-pools-for-semi-static-nat-port-range-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content Based Access Control &#8220;CBAC&#8221;</title>
		<link>http://www.techinvasion.net/2008/10/21/content-based-access-control-cbac/</link>
		<comments>http://www.techinvasion.net/2008/10/21/content-based-access-control-cbac/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 14:56:28 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[access list]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[cbac]]></category>
		<category><![CDATA[content based access control]]></category>
		<category><![CDATA[firewall ios]]></category>
		<category><![CDATA[ip inspect]]></category>
		<category><![CDATA[stateful]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=77</guid>
		<description><![CDATA[In the beginning God created heaven and earth, and then he created routers, so packets could flow from one part of the earth to the other. As he rested he looked down on his creation and smiled for all was good. Packets were flowing from one interface to another. Then as he beheld his creation [...]]]></description>
			<content:encoded><![CDATA[<p>In the beginning God created heaven and earth, and then he created routers, so packets could flow from one part of the earth to the other. As he rested he looked down on his creation and smiled for all was good. Packets were flowing from one interface to another. Then as he beheld his creation he watches as some pad packets decided to flow where they didn&#8217;t belong! So God created access-lists and again everything was as it should be, packets only flowed to areas where they belonged. After some time naughty packets found out that they could sneak by God’s great protectors of the network by setting the ACK bit in their headers.</p>
<p><span id="more-77"></span></p>
<p>The access-list thought that these packets were part of an ongoing conversation and allowed them to sneak past. To fix this problem God shook heaven and earth and created reflexive access-lists. With these new and improved protectors of Gods interfaces packets were only allowed through if they matched a rule created for traffic flowing in the other direction. With this new method, return packets would only be allowed through if they matched a dynamic rule created by the original outgoing packet. God set back and looked at his creation and all was as it should be. Then one day applications were created that used dynamic ports for return traffic. For instance a person connects to a server on port 80, and the server responds with a packet on a random port between 45000 and 62000. Since the return packets did not match the originating packets the return packets would be dropped.</p>
<p>To fix this new problem God created CBAC or Content Based Access Control. With this new enhanced type of security found in the Firewall Feature set, traffic is inspected at layer 4 on the way out, and a dynamic access-list is created inbound on the interface to allow the traffic to return. Since CBAC inspects traffic on a higher level of the OSI model it can understand protocols that use dynamic port assignment, it can glean useful information from upper layer protocols that will help it make intelligent state full firewalling decisions and improve security while reducing false positives. You can see how over the years the security that we use has become ever more sophisticated to combat the ever clever internet hacker.</p>
<p>Below I will show you how to use CBAC on your router, Keep in mind that CBAC is part of the firewall feature set so may require additional licensing if your organization has to upgrade the ios. Ip inspect is configured in two areas. The first thing you have to do is create an inspection rule, and define what higher layer protocols you want to inspect. The next thing you have to do is apply the rule in the outbound direction on the interface you want to protect. You must also have either an access-list applied in the inbound direction; the access-list can be blank. When configuring the inspection rule you can choose from a number of protocols to look at. For ip inspect to work and to fix the issue with reflexive access-lists you only have to inspect layer 4 protocols such as tcp and udp. However CBAC supports many higher level protocols such as http, SMTP, real-audio, and other session and presentation, layer protocols.</p>
<p>Here is a config that shows some of the many possible protocols that can be inspected with CBAC. I have listed the two main ones at the top. Another tip, if you have sip phones with private nat&#8217;d addresses behind this router and you want them to connect outside you need the ip inspect sip command to translate that properly through nat.</p>
<pre class="prettyprint">!
ip inspect name cbac-example tcp
ip inspect name cbac-example udp
ip inspect name cbac-example vdolive
ip inspect name cbac-example smtp
ip inspect name cbac-example http
ip inspect name cbac-example rtsp
ip inspect name cbac-example sip
ip inspect name cbac-example skinny
ip inspect name cbac-example tftp
ip inspect name cbac-example ftp
ip audit po max-events 100
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.1.254 255.255.255.0
 ip access-group from_internet in
 ip inspect cbac-example out
 duplex auto
 speed auto
!</pre>
<p><a href="http://packetlife.net/blog/2009/jun/01/access-list-syslog-correlation/">Here is a related article on ACL&#8217;s.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/10/21/content-based-access-control-cbac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to access-lists part 2</title>
		<link>http://www.techinvasion.net/2008/10/16/introduction-to-access-lists-part-2/</link>
		<comments>http://www.techinvasion.net/2008/10/16/introduction-to-access-lists-part-2/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 17:47:21 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[access list]]></category>
		<category><![CDATA[ack]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[cbac]]></category>
		<category><![CDATA[established]]></category>
		<category><![CDATA[ip inspect]]></category>
		<category><![CDATA[reflexive]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=65</guid>
		<description><![CDATA[In the second installment of our guide to access-lists we are going to talk a little about named access-lists, how they work, what the benefits are, and how using them allows us to create reflexive access-lists. Named access-lists are exactly what they sound like, they are an extended access-list that has a name instead of [...]]]></description>
			<content:encoded><![CDATA[<p>In the second installment of our guide to access-lists we are going to talk a little about named access-lists, how they work, what the benefits are, and how using them allows us to create reflexive access-lists. Named access-lists are exactly what they sound like, they are an extended access-list that has a name instead of a number. One of the nice features of named access-lists is that each line of the access-list has a number. this way you can delete just one line in an access-list without removing the whole access-list. You can create a named access list by using the following command.</p>
<p><span id="more-65"></span></p>
<pre class="prettyprint">
#ip access-list extended  (name goes here)
</pre>
<p>The neat thing about named access-lists is that when you do a show access-list command you see number s next to the lines in the acl. This allows you to add or remove lines without deleting the whole access-list.</p>
<pre class="prettyprint">
test#sh ip access-list

extended ip access-list example
	10 permit ip any any
	20 deny tcp any any eq 80
	30 permit udp any any eq 53
</pre>
<p>Reflexive access-lists allow you to filter connections based on session. Reflexive ACL&#8217;s are part of the ip plus feature set and was the first attempt to create a statefull inspection firewall on routers. Before the invention of reflexive access-lists the only way we had to allow stateful return traffic from the internet was by using the establish keyword. The problem with the established keyword is that the router only checks for the ack bit on the packets. The ack bit is set on packets once the 3 way handshake has been completed. the problem with this is that it does not do anything for udp packets since those connections are stateless, and it is very easy for hackers to set the ack bit. To get around this problem Cisco invented the reflexive access-list.</p>
<pre class="prettyprint">
permit tcp any any eq 80 established
</pre>
<p> Reflexive access-lists are very easy. I have added the code for the access-list below. Basically reflexive access-list are made up of two parts. The first part, is the access-list that filters outbound traffic. This access-list is made up of statements that allow outbound traffic. thekey part here is the reflect statement. What this means is that you want to reflect that packet in another access list. </p>
<p>In my example below I reflected the statements in an access-list called dynamic. Now I created two access-lists. I created an inbound access-list to allow static inbound traffic to my webserver. I created an outbound access-list to allow traffic from my lan to the internet. I told my inbound access-list to check the reflexive entries before blocking traffic using the evaluate command. This is all there is too it. With these simple commands you can commands you can configure a statefull firewall to protect your network from harm. As good as this is though it isn&#8217;t perfect. It doesn&#8217;t work for application which use dynamic port numbers for return traffic. To solve this problem cisco added layer 4 inspection and refined reflexive access-lists in what they call Content Based Access Control or CBAC. However CBAC is part of the ios fw feature set and is a topic for another time.</p>
<pre class="prettyprint">
interface FastEthernet0/0
 description WAN Interface
 ip address 192.168.0.1 255.255.255.0
 ip access-group internet_in in
 ip access-group lan_out out
 duplex auto
 speed auto
!
!
ip access-list extended internet_in
 remark Internet---->lan traffic
 permit tcp any any eq 80
 permit tcp any any eq 443
 evaluate dynamic
!
!
ip access-list extended lan_out
 remark inside----->internet traffic
 permit tcp any any eq www reflect dynamic
 permit tcp any any eq 443 reflect dynamic
 permit tcp any any eq 22 reflect dynamic
 permit tcp any any eq ftp reflect dynamic
 permit tcp any any eq telnet reflect dynamic
 permit tcp any any eq pop3 reflect dynamic
 permit tcp any any eq nntp reflect dynamic
 permit tcp any any eq smtp reflect dynamic
!
!
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/10/16/introduction-to-access-lists-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to access-lists part 1</title>
		<link>http://www.techinvasion.net/2008/10/15/introduction-to-access-lists-part-1/</link>
		<comments>http://www.techinvasion.net/2008/10/15/introduction-to-access-lists-part-1/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 02:12:35 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[access list]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[extended]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=59</guid>
		<description><![CDATA[Today I would like to take some time and talk about security. I want to discuss access-lists, extended access-lists, reflexive access-lists, and CBAC or content based access control. Learning how to properly use access-lists is so crucial to becoming a good network administrator. They are vital to securing your network and as you progress with [...]]]></description>
			<content:encoded><![CDATA[<p>Today I would like to take some time and talk about security. I want to discuss access-lists, extended access-lists, reflexive access-lists, and CBAC or content based access control. Learning how to properly use access-lists is so crucial to becoming a good network administrator. They are vital to securing your network and as you progress with your studies you will find that access-lists are used quite extensively in routing, QoS, and other important things.</p>
<p><span id="more-59"></span></p>
<p>Access-lists are used to match traffic and can be applied in either the in or out direction. It is important to note that the direction is from the perspective of the interface. For instance on a switch port “IN” would be coming into the switch or traffic being sent to the switch, whereas “OUT” would be the traffic the switch sends to the device connected to the port. So think of it like this:  OUT means traffic flowing out of the switch, while IN means traffic flowing into the switch. See I knew you would get it, it’s very easy stuff.</p>
<p>There are two basic kinds of access-lists extended and standard. Access-lists over 100 inclusive are extended access lists, while access-lists numbered 99 and less are standard access-lists. Standard access lists can only filter based on ip address, while extended access-lists can filter based on layer 3 protocols such as tcp, udp, gre, and others. They can also filter based on tcp/udp port numbers. Lets take a look at an access list :</p>
<pre class="prettyprint">

access-list 1 permit any any
access-list 2 permit host 127.0.0.1 0.0.0.255  any
access-list 3 deny 10.0.0.0 0.0.0.254  any
access-list (1-99) (permit/deny) (source) (destination)
</pre>
<p>All of these are standard access-lists, let’s take them apart in detail. The first part is the command “access-list” this is followed by either a “permit/deny” the next entry is the source and can be  “any”,  it can be a individual ip “host x.x.x.x” or it can be a network “192.168.1.0 0.0.0.255” The last part is a wild card mask which is the opposite of a subnet mask. Remember that standard access-lists  can only filter based on source and or destination, but not any other information. If you want to filter on more than source and destination you can choose extended access-lists. Extended access-lists can filter on much more and take a slightly different format.</p>
<pre class="prettyprint">
Access-list 101 permit tcp any any eq 443
Access-list 101 deny udp any any eq 500
Access-list 101 permit gre any any
</pre>
<p>Lets have a look at some of the possible options that the Cisco IOS gives you to match packets, if you don&#8217;t understand all of the options or know how to use them at first, don&#8217;t worry. These kind of things look useless or seldom used at first, however as you progress you will make use of most of these options.</p>
<pre class="prettyprint">
#access-list 102 ?

  deny              Specify packets to reject
  dynamic       Specify a DYNAMIC list of PERMITs or DENYs
  permit          Specify packets to forward
  remark        Access list entry comment
</pre>
<p>!</p>
<pre class="prettyprint">
#access-list 102 permit ?

  <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
</pre>
<p>!</p>
<pre class="prettyprint">

#access-list 102 permit tcp any any ?

  ack          Match on the ACK bit
  dscp         Match packets with given dscp value
  eq           Match only packets on a given port number
  established  Match established connections
  fin          Match on the FIN bit
  fragments    Check non-initial fragments
  gt           Match only packets with a greater port number
  log          Log matches against this entry
  log-input    Log matches against this entry, including input interface
  lt           Match only packets with a lower port number
  neq          Match only packets not on a given port number
  option       Match packets with given IP Options value
  precedence   Match packets with given precedence value
  psh          Match on the PSH bit
  range        Match only packets in the range of port numbers
  rst          Match on the RST bit
  syn          Match on the SYN bit
  time-range   Specify a time-range
  tos          Match packets with given TOS value
  urg          Match on the URG bit
  <cr>
</pre>
<p>!</p>
<pre class="prettyprint">

#access-list 102 permit tcp any any eq 80 ?

  ack          Match on the ACK bit
  dscp         Match packets with given dscp value
  established  Match established connections
  fin          Match on the FIN bit
  log          Log matches against this entry
  log-input    Log matches against this entry, including input interface
  option       Match packets with given IP Options value
  precedence   Match packets with given precedence value
  psh          Match on the PSH bit
  rst          Match on the RST bit
  syn          Match on the SYN bit
  time-range   Specify a time-range
  tos          Match packets with given TOS value
  urg          Match on the URG bit
  <cr>
</pre>
<p>!</p>
<p>This has been a brief intro to access lists. In the next Installment we will talk a little bit about named access-lists and how they can be used to construct reflexive access lists. Reflexive access-lists can be used to create dynamic entries in an access-list based on some event or matching criteria, and can be really important tool for securing a network. Also named access-lists allow you to easily manage a large access-list more easily by allowing you to change an entry or change the order of the acl without rewriting removing and rewriting the entire access-list.</p>
<p>One last thing…. Access-lists are applied to an interface by using the following command:</p>
<pre class="prettyprint">
#Config t
(config )# Int fastethernet 0/1
(Config int)# Ip access-group in
Or
(Config int)# Ip access-group out
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/10/15/introduction-to-access-lists-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replace a running config without reloading!</title>
		<link>http://www.techinvasion.net/2008/10/04/replace-a-running-config-without-reloading/</link>
		<comments>http://www.techinvasion.net/2008/10/04/replace-a-running-config-without-reloading/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 17:03:20 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[12.4]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[rollback]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=51</guid>
		<description><![CDATA[The new Cisco IOS 12.4 train has many new features that any engineer will find useful; one of the features that fix a pain point for me is the new config options available in 12.4. Have you ever been in a situation where an entered configuration does not work as expected? Now usually you have [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Courier New;">The new Cisco IOS 12.4 train has many new features that any engineer will find useful; one of the features that fix a pain point for me is the new config options available in 12.4. Have you ever been in a situation where an entered configuration does not work as expected? Now usually you have to back out the configuration one command at a time and hope for the best. Sometimes you may even reach a point where you can not completely remove a configuration without reloading the device, this is the case sometimes when trying to remove sub interfaces. Now if this is a datacenter or work environment then you may not be able to reload the router.<br />
 <span id="more-51"></span></p>
<p><font face="Courier New"><br />
It is for situations just like these that Cisco changed the configure command. If you have ever used the copy startup-config running-config command you know that this command does not replace what is running but instead merges the two configurations which often times will create a bigger mess.<br />
Cisco has added the “configure replace” command. This command will go through the configuration line by line and replace your configuration with the configuration you specify and it will go through the config as many times as it takes to back out all of the differences and replace them with the file specified. The amazing thing about this command is that it does not interrupt the operation of the router, so you can rollback changes without affecting business continuity.<br />
Here is an excerpt from my router running the command to replace the running configuration with the startup configuration:</p>
<p></font></span></p>
<p> </p>
<p> </p>
<pre class="prettyprint">Lord_Yu# configure replace ?
  archive:  URL of config file that will replace running-config
  cns:      URL of config file that will replace running-config
  flash:    URL of config file that will replace running-config
  ftp:      URL of config file that will replace running-config
  http:     URL of config file that will replace running-config
  https:    URL of config file that will replace running-config
  null:     URL of config file that will replace running-config
  nvram:    URL of config file that will replace running-config
  pram:     URL of config file that will replace running-config
  rcp:      URL of config file that will replace running-config
  scp:      URL of config file that will replace running-config
  snmp:     URL of config file that will replace running-config
  system:   URL of config file that will replace running-config
  tftp:     URL of config file that will replace running-config
  xmodem:   URL of config file that will replace running-config
  ymodem:   URL of config file that will replace running-config

Lord_Yu# configure replace nv
Lord_Yu# configure replace nvram:?
nvram:ifIndex-table   nvram:persistent-data  nvram:private-config
nvram:startup-config

Lord_Yu# configure replace nvram:sta
Lord_Yu# configure replace nvram:startup-config ?
  force       Forcibly replace without prompting for user input
  ignorecase  Ignore case
  list        List the commands applied in each pass
  time        Time for which to wait for confirmation

Lord_Yu# configure replace nvram:startup-config
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: y
Total number of passes: 0
Rollback Done</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/10/04/replace-a-running-config-without-reloading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encrypting GRE tunnels!</title>
		<link>http://www.techinvasion.net/2008/09/08/encrypting-gre-tunnels/</link>
		<comments>http://www.techinvasion.net/2008/09/08/encrypting-gre-tunnels/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 19:21:11 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[GRE]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[IPSEC]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=49</guid>
		<description><![CDATA[In our Last article we looked at creating GRE tunnels between networks to allow non-routable traffic to pass between remote offices.  GRE tunnels are a great solution however the traffic passing inside these tunnels is not encrypted and thus could be intercepted by unauthorized parties. In this article we are going to look at tunneling [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Lucida Sans Unicode;">In our Last article we looked at creating GRE tunnels between networks to allow non-routable traffic to pass between remote offices.  GRE tunnels are a great solution however the traffic passing inside these tunnels is not encrypted and thus could be intercepted by unauthorized parties. In this article we are going to look at tunneling GRE inside of IPSEC. This will allow us to get the benefits of GRE and the security of IPSEC.<br />
</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span id="more-49"></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"> </p>
<pre class="prettyprint">!
crypto isakmp policy 10        #create crypto policy file
authentication pre-share      #use pre shared key
crypto isakmp key integer address 192.168.1.2 #address of remote tunnel
!
!
!
#use aes encryption and comp-lzs conpression. use transport mode.
crypto ipsec transform-set myset esp-aes esp-md5-hmac comp-lzs
!
mode transport   # transport mode tells IPSEC not to create a tunnel,
                       # this is used when you are using IPSEC for
                       # encryption only and not for tunneling.
!
crypto map mymap 10 ipsec-isakmp   # create the crypto map
set peer 192.168.1.2                      # the peer must match the ISAKMP statement
set transform-set myset                  # use the encyption we defined above
match address match-gre                # encrypt only packets in GRE tunnel
!
!
!
!
interface Tunnel0
ip address 172.20.1.1 255.255.255.252
keepalive 10 3
tunnel source FastEthernet0/0
tunnel destination 192.168.1.2
tunnel path-mtu-discovery
crypto map mymap              # crypto map must be applied to tunnel
!
!
!
!
interface FastEthernet0/1
description LAN INTERFACE
ip address 10.0.0.254 255.255.255.0
ip nat inside
duplex auto
speed auto
!
!
!
!
interface FastEthernet0/0
description Internet Interface
ip address 192.168.1.1 255.255.255.0
ip access-group allow-gre in
ip nat inside
duplex auto
speed auto
crypto map mymap   # crypto map must be applied to tunnel and public interface
!
!
!
!
ip access-list extended allow-gre
permit gre any any               # allow gre through the firewall
permit esp any any              #allow esp for ipsec through the firewall
permit udp any any eq 500    #allow udp port 500 through which ipsec also uses
!
!
#access-list to match tunnel traffic.
#This access list must be in the form (my public ip) (destination public ip)
ip access-list extended match-gre
 permit gre host 192.168.1.1 host 192.168.1.2 log</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/09/08/encrypting-gre-tunnels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a GRE tunnel between endpoints!</title>
		<link>http://www.techinvasion.net/2008/09/08/create-a-gre-tunnel-between-endpoints/</link>
		<comments>http://www.techinvasion.net/2008/09/08/create-a-gre-tunnel-between-endpoints/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 18:20:02 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GRE]]></category>
		<category><![CDATA[IPSEC]]></category>
		<category><![CDATA[TUNNEL]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.techinvasion.net/?p=48</guid>
		<description><![CDATA[Many time it is necessary to link a remote office to your main site and today we have many technologies to accomplish this task. We have IPSEC tunnels, IP-IN-IP tunnels, and GRE or Generic Routing Encapsulation Tunnels. Each type of connectivity offers advantages and disadvantages. Some of these tunnels can even be overlaid on top [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 10pt; color: #000000;"><span style="font-family: Times New Roman;">Many time it is necessary to link a remote office to your main site and today we have many technologies to accomplish this task. We have IPSEC tunnels, IP-IN-IP tunnels, and GRE or Generic Routing Encapsulation Tunnels.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">Each type of connectivity offers advantages and disadvantages. Some of these tunnels can even be overlaid on top of one another. For instance IPSEC can be used in a transport mode, which allows you to use the encryption with other tunnels or protocols. For this article we are going to discuss GRE tunnels. GRE is unique as tunneling technologies go in that is started out as a proprietary protocol developed by Cisco and later adopted as a standard. GRE was invented as a way of encapsulating non routable protocols in IP which is a routable protocol. In this way protocols such as multicast (this include OSPF, EIGRP), and other protocols like IPX could be tunneled across routable links.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"> <span id="more-48"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">GRE offers several advantages today when used as a tunnel to connect private LANs. The main advantages are the ability to carry multicast traffic, i.e. routing protocols across the internet. For instance, lets say you had a main office in London, which has Frame Relay links to 15 offices in Europe, and you have your headquarters in Washington D.C. with a MPLS network of 25 offices across North and South America. Now suppose due to the costs of bandwidth and particularly the cost of private connection such as frame across the pond, you decided to go with a 45mbps T3 line. Between London and D.C.<span style="mso-spacerun: yes;">  </span>Now you could connect these offices with an IPSEC VPN however if you did this you would be limited to building static <span style="mso-spacerun: yes;"> </span>routes for each network on each side of the ocean, this is not a very scalable solution and does not allow you the advantages of a dynamic routing protocol. This solution may even limit you should you decide to add a second T3 later say to an office in Madrid. With dynamic routing protocols, the traffic would automatically swing to the Madrid office if something were to happen to the link between D.C. and London. The solution <span style="mso-spacerun: yes;"> </span>to this problem is to use GRE tunnels, since GRE tunnels pass all types of traffic you can easily run a dynamic routing protocol, like OSPF or EIGRP. These protocols will allow seamless easy route adjustments when a route goes down.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">Configuring GRE tunnels is easy with a few simple steps you will be on your way. Before we can talk about configuring GRE tunnels we need to discuss exactly what the requirements for GRE are! GRE is a protocol, like IP you need to make sure this protocol is allowed through your firewall if you want to terminate a GRE tunnel. GRE to be more exact is protocol 47. Please be mindful that this is not port 47 but protocol 47. Allowing port 47 through your firewall will not allow GRE to work.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">Steps to configure a GRE tunnel</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"> </span></span></p>
<ol style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">create access-list on outside interface to permit GRE</span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">create tunnel interface</span></span></li>
</ol>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"> </span></span></p>
<pre class="prettyprint">
interface Tunnel0
 ip address 172.20.1.1 255.255.255.252
 keepalive 10 3
 tunnel source FastEthernet0/0
 tunnel destination 192.168.1.2
 tunnel path-mtu-discovery
!
!
!
!
interface FastEthernet0/1
 description LAN INTERFACE
 ip address 10.0.0.254 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
!
!
!
interface FastEthernet0/0
 description Internet Interface
 ip address 192.168.1.1 255.255.255.0
 ip access-group allow-gre in
 ip nat inside
 duplex auto
 speed auto
!
!
!
!
ip access-list extended allow-gre
 permit gre any any</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techinvasion.net/2008/09/08/create-a-gre-tunnel-between-endpoints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
