<?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>CCIE Lab &#187; acl</title>
	<atom:link href="http://ccielab.ro/tag/acl/feed/" rel="self" type="application/rss+xml" />
	<link>http://ccielab.ro</link>
	<description>Cry in the Lab, Laugh in the Datacenter</description>
	<lastBuildDate>Wed, 09 May 2012 12:02:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ACL case study: The hidden defaults of ACLs</title>
		<link>http://ccielab.ro/2011/12/the-hidden-defaults-of-acls/</link>
		<comments>http://ccielab.ro/2011/12/the-hidden-defaults-of-acls/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 10:42:45 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[CCNA]]></category>
		<category><![CDATA[Cisco IOS]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[any]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[permit]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=164</guid>
		<description><![CDATA[Unlike Linux&#8217;s iptables, Cisco&#8217;s filtering via Access Control Lists sometimes has hidden behavior.
Let us test how ACL filtering works using the following topology. We assume that we have Layer 3 connectivity via static routes. We will apply ACLs on the outbound direction of F1/0 on R2 (we want it to be somewhere in the path [...]]]></description>
			<content:encoded><![CDATA[<p>Unlike Linux&#8217;s iptables, Cisco&#8217;s filtering via Access Control Lists sometimes has hidden behavior.</p>
<p>Let us test how ACL filtering works using the following topology. We assume that we have Layer 3 connectivity via static routes. We will apply ACLs on the outbound direction of F1/0 on R2 (we want it to be somewhere in the path from R1 to R3)</p>
<p><img class="aligncenter size-medium wp-image-165" src="http://ccielab.ro/wp-content/uploads/2011/12/3r-300x148.png" alt="3r" width="300" height="148" /></p>
<p>With no ACLs applied anywhere, <strong>all </strong>traffic will flow.</p>
<blockquote><p>R1#ping 3.3.3.3 source 1.1.1.1<br />
Packet sent with a source address of 1.1.1.1<br />
!!!!!<br />
Success rate is 100 percent</p></blockquote>
<p>Let&#8217;s start with the basics and make a classic standard access list that denies R1&#8217;s loopback.</p>
<blockquote><p>R2(config)#access-list 42 deny host 1.1.1.1<br />
R2(config)#int f1/0<br />
R2(config-if)#ip access-group 42 out</p></blockquote>
<p>The loopback on R1 is blocked&#8230;</p>
<blockquote><p>R1#ping 3.3.3.3 source 1.1.1.1<br />
U.U.U<br />
Success rate is 0 percent (0/5)</p></blockquote>
<p>&#8230; but so is any other traffic that goes out of R2&#8217;s F1/0.</p>
<blockquote><p>R1#ping 3.3.3.3 source F0/0<br />
U.U.U<br />
Success rate is 0 percent (0/5)</p></blockquote>
<p>The first rule of Cisco&#8217;s ACLs is that <strong>there is an implicit deny (ip) all (all) rule at the end of every ACL</strong>. But this is <strong>not visible</strong> anywhere. You have to know it.</p>
<blockquote><p>R2#sh access-lists<br />
Standard IP access list 42<br />
10 deny   1.1.1.1 (8 matches)<br />
Extended IP access list BLOCK_HTTP</p></blockquote>
<p>But if that ACL is empty? What if you apply an access list that does not contain any rules (was not declared)?</p>
<blockquote><p>R2(config)#int f1/0<br />
R2(config-if)#ip access-group 28 out<br />
R2(config-if)#do sh access-lists<br />
Standard IP access list 42<br />
10 deny   1.1.1.1 (8 matches)<br />
Extended IP access list BLOCK_HTTP</p>
<p>R1#ping 3.3.3.3 source 1.1.1.1</p>
<p>Type escape sequence to abort.<br />
!!!!!<br />
Success rate is 100 percent</p></blockquote>
<p>Traffic passes. The inexistent ACL applied on an interface is ignored. But this is because you can&#8217;t have an empty classical (numbered) ACL. What if you do the same thing with a named ACL?</p>
<blockquote><p>R2(config)#ip access-list standard EMPTY_ACL<br />
R2(config-std-nacl)#exit<br />
R2(config)#do sh ip access-list<br />
Standard IP access list 42<br />
10 deny   1.1.1.1 (8 matches)<br />
Standard IP access list EMPTY_ACL<br />
Extended IP access list BLOCK_HTTP<br />
R2(config)#int f1/0<br />
R2(config-if)#ip access-group EMPTY_ACL out</p></blockquote>
<blockquote>
<p style="text-align: left">R1#ping 3.3.3.3 source 1.1.1.1</p>
<p style="text-align: left">Type escape sequence to abort.<br />
!!!!!<br />
Success rate is 100 percent</p></blockquote>
<p style="text-align: left">Traffic is still not filtered. So, the rule is that <strong>a empty (inexistant or deleted)  ACL is ignored by the interface filter</strong>.</p>
<p style="text-align: left">One more ACL applied on R2 with a deny all rule (no traffic should pass out of F1/0).</p>
<blockquote><p>R2(config)#ip access-list standard DENY_ALL_ACL<br />
R2(config-std-nacl)#deny any<br />
R2(config-std-nacl)#do sh ip access<br />
Standard IP access list 42<br />
10 deny   1.1.1.1 (8 matches)<br />
Standard IP access list DENY_ALL_ACL<br />
10 deny   any (8 matches)<br />
Standard IP access list EMPTY_ACL<br />
10 deny   any (8 matches)<br />
Extended IP access list BLOCK_HTTP<br />
R2(config-std-nacl)#int f1/0<br />
R2(config-if)#ip access-group DENY_ALL_ACL out</p></blockquote>
<p>Ping form R1 is filtered.</p>
<p>R1#ping 3.3.3.3 source 1.1.1.1<br />
Packet sent with a source address of 1.1.1.1<br />
U.U.U<br />
Success rate is 0 percent (0/5)</p>
<p>Since no traffic should go out the interface, a ping from R2 to R3 should also fail, yet it doesn&#8217;t.</p>
<blockquote><p>R2#ping 3.3.3.3<br />
!!!!!<br />
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/20/44 ms</p></blockquote>
<p>As a final rule, <strong>traffic generated by a router is never filtered by an ACL applied any interface of that router</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2011/12/the-hidden-defaults-of-acls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anti-lockout best practice</title>
		<link>http://ccielab.ro/2010/07/anti-lockout-best-practice/</link>
		<comments>http://ccielab.ro/2010/07/anti-lockout-best-practice/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 19:43:25 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[CCNA]]></category>
		<category><![CDATA[CCNP]]></category>
		<category><![CDATA[Cisco IOS]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[reload]]></category>
		<category><![CDATA[reload cancel]]></category>
		<category><![CDATA[reload in]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=130</guid>
		<description><![CDATA[ACL are usually configured for firewall configurations, for traffic filtering. When configuring ACLs, careful planing should be made so that in the moment when you are applying an ACL, things get filtered exactly the way you want it. In a lab environment tests can be made and if somethings doesn&#8217;t work right, you can start [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">ACL are usually configured for firewall configurations, for traffic filtering. When configuring ACLs, careful planing should be made so that in the moment when you are applying an ACL, things get filtered exactly the way you want it. In a lab environment tests can be made and if somethings doesn&#8217;t work right, you can start over. But in a live network router, filtering the wrong traffic could cause network outages.</p>
<p style="text-align: justify">If you are connected to the router via telnet or ssh (most likely in productions routers) it is very easy to lock yourself out of the router by denying the telnet or ssh traffic on an interface between you to that router. This is mostly because how IOS works. Any commands given in IOS are instantly commited to the live configuration. And, for example, if you make a configuration with an ACL and you forget about the implicit <strong>deny any (any)</strong> and you also forget to permit the telnet/ssh traffic, you might find yourself with the router not responding to any input after you apply the rules. It might take a while to figure out that you can&#8217;t access the router anymore and need to get physically to its location and either reload it or  use the console port to remove the ACL from the running-config.</p>
<p style="text-align: justify">One way of avoiding this is to schedule an automated reload in 10-15 minutes, while you are configuring, From enable mode issue the command:</p>
<blockquote>
<p style="text-align: justify"><strong>#reload in MINUTES</strong></p>
</blockquote>
<p style="text-align: justify">This will reload the router after the specified number of minutes. It will ensure that if you lock yourself out, the router will revert back to the working startup-config. If the configuration was applied successfully, you can cancel the scheduled reload with the command</p>
<blockquote>
<p style="text-align: justify"><strong>#reload cancel</strong></p>
</blockquote>
<div style="overflow: hidden;width: 1px;height: 1px;text-align: justify">http://www.youtube.com/watch?v=SMWi7CLoZ2Q</div>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2010/07/anti-lockout-best-practice/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Basic packet crafting</title>
		<link>http://ccielab.ro/2010/06/basic-pachet-crafting/</link>
		<comments>http://ccielab.ro/2010/06/basic-pachet-crafting/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 19:47:40 +0000</pubDate>
		<dc:creator>Dragos Draghicescu</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[craft]]></category>
		<category><![CDATA[hping]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=86</guid>
		<description><![CDATA[Ok, this will be a short one  . I just want to raise attention on how can one bypass an extended (or standard) ACL (or access-list).
So, for this example, i have one router with an IP address of 10.10.10.2, which can be accessed only by the admin, only from 20.20.20.20. That is done with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">Ok, this will be a short one <img src='http://ccielab.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I just want to raise attention on how can one bypass an extended (or standard) ACL (or access-list).</p>
<p style="text-align: justify">So, for this example, i have one router with an IP address of 10.10.10.2, which can be accessed only by the admin, only from 20.20.20.20. That is done with an inbound ACL, put on the egress interface of the router. Looks like this:</p>
<pre>Extended IP access list 111</pre>
<pre>20 permit ip host 20.20.20.20 host 10.10.10.2 log</pre>
<p style="text-align: justify">There is a little problem with spoofing: the return traffic has to be routed back to the attacker. But everything will work just fine if you happen to be in the same network with the admin (you can achieve bidirectional communication). In case the attack is done over the Internet, there is still the possibility of a DOS (Denial Of Service), by sending tons of packets that will be accepted. I assumed another thing: your ISP does not check for the source of the packets (DOS attacks are less frequent if that simple measure is taken).</p>
<p style="text-align: justify">For the demonstration, i chose a well-known packet crafter named HPING3. It allows one to customize a packet at different layers and it`s well documented, but for now we will only use a fraction of it`s power:</p>
<pre><em><strong>$</strong></em><em> sudo hping3 -S 10.10.10.2 -a 20.20.20.20</em></pre>
<p>The result could be:</p>
<pre style="text-align: justify"><em>*Mar 1 05:52:01.702: %SEC-6-IPACCESSLOGP:</em></pre>
<pre style="text-align: justify"><em>list 111 permitted tcp 20.20.20.20(0) -&gt; 10.10.10.2(0), 360 packets</em></pre>
<p style="text-align: justify"><em>To check the amount of pings, you can issue the command &#8220;</em><em><strong>show ip traffic | section ICMP</strong></em><em>&#8220;. You can &#8220;<strong>clear ip traffic</strong></em><em>&#8221; before that.</em></p>
<p style="text-align: justify"><em>Despite this, ACLs are still adding a serious amount of security to your network. But in front of a determined attacker, one should do more than that in order to have a healthy network. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2010/06/basic-pachet-crafting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

