<?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>Jimmys Cyber Corner &#187; Uncategorized</title>
	<atom:link href="http://blogg.kvistofta.nu/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogg.kvistofta.nu</link>
	<description>A Cisco Security-guy exploring the world</description>
	<lastBuildDate>Wed, 25 Aug 2010 16:19:19 +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>ASA user authentication with Active Directory</title>
		<link>http://blogg.kvistofta.nu/asa-user-authentication-with-active-directory/</link>
		<comments>http://blogg.kvistofta.nu/asa-user-authentication-with-active-directory/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 16:19:19 +0000</pubDate>
		<dc:creator>Jimmy Larsson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogg.kvistofta.nu/?p=1126</guid>
		<description><![CDATA[Most often we Cisco-guys uses radius or tacacs when we are about to do authentication of users. But did you know that doing authentication from VPN to a user-database in an Active Directory doesn´t require IAS, ACS or any third party software at all. In fact there are multiple ways in ASA to talk to [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Most often we Cisco-guys uses radius or tacacs when we are about to do authentication of users. But did you know that doing authentication from VPN to a user-database in an Active Directory doesn´t require IAS, ACS or any third party software at all. In fact there are multiple ways in ASA to talk to AD built-in.</p>
<p>I have tried them in my home lab by using an ASA firewall and a Windows 2003 Server with Active Directory installed.</p>
<h3>LDAP</h3>
<p><code><br />
aaa-server LDAP protocol ldap<br />
aaa-server LDAP (outside) host 192.168.1.51<br />
ldap-base-dn CN=Users,DC=kvistofta,DC=local<br />
ldap-scope subtree<br />
ldap-naming-attribute sAMAccountName<br />
ldap-login-password *<br />
ldap-login-dn CN=admin,CN=Users,DC=kvistofta,DC=local<br />
server-type microsoft<br />
</code></p>
<p>Verification:<br />
<code><br />
FW(config)# test aaa authen KERBEROS host 192.168.1.51 username vpnuser passwo$<br />
INFO: Attempting Authentication test to IP address &lt;192.168.1.51&gt; (timeout: 12 seconds)<br />
INFO: Authentication Successful<br />
FW(config)# test aaa authen LDAP host 192.168.1.51 username vpnuser password 1$<br />
INFO: Attempting Authenticatio<br />
[75] Session Start<br />
n test to IP address &lt;192.168.1.51&gt; (timeout: 12 seconds)<br />
[75] New request Session, context 0xd5954260, reqType = 1<br />
[75] Fiber started<br />
[75] Creating LDAP context with uri=ldap://192.168.1.51:389<br />
[75] Connect to LDAP server: ldap://192.168.1.51:389, status = Successful<br />
[75] supportedLDAPVersion: value = 3<br />
[75] supportedLDAPVersion: value = 2<br />
[75] Binding as administrator<br />
[75] Performing Simple authentication for admin to 192.168.1.51<br />
[75] LDAP Search:<br />
Base DN = [CN=Users,DC=kvistofta,DC=local]<br />
Filter  = [sAMAccountName=vpnuser]<br />
Scope   = [SUBTREE]<br />
[75] User DN = [CN=vpnuser,CN=Users,DC=kvistofta,DC=local]<br />
[75] Talking to Active Directory server 192.168.1.51<br />
[75] Reading password policy for vpnuser, dn:CN=vpnuser,CN=Users,DC=kvistofta,DC=local<br />
[75] Read bad password count 0<br />
[75] Binding as user<br />
[75] Performing Simple authentication for vpnuser to 192.168.1.51<br />
[75] Processing LDAP response for user vpnuser<br />
[75] <strong>Authentication successful for vpnuser to 192.168.1.51</strong><br />
[75] Retrieved User Attributes:<br />
[75]    objectClass: value = top<br />
[75]    objectClass: value = person<br />
[75]    objectClass: value = organizationalPerson<br />
[75]    objectClass: value = user<br />
[75]    cn: value = vpnuser<br />
[75]    givenName: value = vpnuser<br />
[75]    distinguishedName: value = CN=vpnuser,CN=Users,DC=kvistofta,DC=local<br />
[75]    instanceType: value = 4<br />
[75]    whenCreated: value = 20100706114926.0Z<br />
[75]    whenChanged: value = 20100706114926.0Z<br />
[75]    displayName: value = vpnuser<br />
[75]    uSNCreated: value = 13726<br />
[75]    uSNChanged: value = 13731<br />
[75]    name: value = vpnuser<br />
[75]    objectGUID: value = ..1....O.c.v....<br />
[75]    userAccountControl: value = 66048<br />
[75]    badPwdCount: value = 0<br />
[75]    codePage: value = 0<br />
[75]    countryCode: value = 0<br />
[75]    badPasswordTime: value = 0<br />
[75]    lastLogoff: value = 0<br />
[75]    lastLogon: value = 129228917453688826<br />
[75]    pwdLastSet: value = 129228905663476095<br />
[75]    primaryGroupID: value = 513<br />
[75]    objectSid: value = .............LP...r{..."S...<br />
[75]    accountExpires: value = 9223372036854775807<br />
[75]    logonCount: value = 5<br />
[75]    sAMAccountName: value = vpnuser<br />
[75]    sAMAccountType: value = 805306368<br />
[75]    userPrincipalName: value = vpnuser@kvistofta.local<br />
[75]    objectCategory: value = CN=Person,CN=Schema,CN=Configuration,DC=kvistofta,DC=local<br />
[75] Fiber exit Tx=547 bytes Rx=2053 bytes, status=1<br />
[75] Session End<br />
<strong>INFO: Authentication Successful</strong><br />
FW(config)#<br />
</code></p>
<h3>KERBEROS</h3>
<p><code><br />
aaa-server KERBEROS protocol kerberos<br />
aaa-server KERBEROS (outside) host 192.168.1.51<br />
kerberos-realm KVISTOFTA.LOCAL</code></p>
<p><code> </code></p>
<p>Verification:<br />
<code><br />
FW(config)# test aaa authen KERBEROS host 192.168.1.51 username vpnuser passwo$<br />
INFO: Attempting Authentication test to IP address &lt;192.168.1.51&gt; (timeout: 12 seconds)<br />
kip_lookup_by_sessID: kip with id 76l not found<br />
Kerberos library reports: "Additional preauthentication required"<br />
<strong>INFO: Authentication Successful</strong><br />
FW(config)#<br />
</code></p>
<h3>NT Domain</h3>
<p><code><br />
aaa-server NT (outside) host 192.168.1.51<br />
nt-auth-domain-controller kvistofta<br />
</code></p>
<p>Verification:<br />
<code><br />
FW(config)# test aaa auth NT host 192.168.1.51 username vpnuser password 1qaz!$<br />
INFO: Attempting Authentication test to IP address &lt;192.168.1.51&gt; (timeout: 12 seconds)<br />
smb_iod_request :<br />
smb_iod_process_message :<br />
smb_iod_negotiate : iod_state = No connect<br />
smb_iod_negotiate : tcreate<br />
smb_iod_negotiate : bind<br />
smb_iod_negotiate : tconnect<br />
smb_iod_addrq :<br />
smb_iod_sendrq : iod_state = transport active<br />
smb_iod_waitrq :<br />
smb_iod_removerq :<br />
smb_iod_negotiate : completed<br />
smb_iod_process_message :<br />
smb_iod_thread : going to sleep for 2 secs 0 nsecs<br />
smb_iod_process_message :<br />
smb_iod_thread : going to sleep for 2 secs 0 nsecs<br />
smb_iod_request :<br />
smb_iod_process_message :<br />
smb_iod_ssnsetup : iod_state = unknown stat(3)<br />
smb_iod_addrq :<br />
smb_iod_sendrq : iod_state = unknown stat(4)<br />
smb_iod_waitrq :<br />
smb_iod_removerq :<br />
smb_iod_ssnsetup : completed<br />
smb_iod_process_message :<br />
smb_iod_thread : going to sleep for 2 secs 0 nsecs<br />
smb_iod_process_message :<br />
smb_iod_thread : going to sleep for 2 secs 0 nsecs<br />
Connected to VPNUSER<br />
smb_iod_request :<br />
smb_iod_process_message :<br />
smb_iod_addrq :<br />
smb_iod_sendrq : iod_state = session established<br />
smb_iod_waitrq :<br />
smb_iod_removerq :<br />
smb_iod_process_message :<br />
smb_iod_thread : going to sleep for 2 secs 0 nsecs<br />
smb_iod_request :<br />
smb_iod_process_message :<br />
<strong>INFO: Authentication Successful</strong><br />
FW(config)#<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogg.kvistofta.nu/asa-user-authentication-with-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doing some magic translations in Cisco ASA</title>
		<link>http://blogg.kvistofta.nu/doing-some-magic-translations-in-cisco-asa/</link>
		<comments>http://blogg.kvistofta.nu/doing-some-magic-translations-in-cisco-asa/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 18:59:01 +0000</pubDate>
		<dc:creator>Jimmy Larsson</dc:creator>
				<category><![CDATA[Cisco ASA]]></category>
		<category><![CDATA[English posts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogg.kvistofta.nu/?p=1117</guid>
		<description><![CDATA[I recently got a question from a collegue regarding address translations in Cisco ASA. He wrote: Got a question from a customer if you can do the following: 1. NAT the . IP address of a machine located on the DMZ to inside with the same address as the NAT has been: at the outside [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I recently got a question from a collegue regarding address translations in Cisco ASA. He wrote:</p>
<p><i><br />
Got a question from a customer if you can do the following:</p>
<p>1. NAT the . IP address of a machine located on the DMZ to inside with the same address as the NAT has been: at the outside (ie publish public address inwards too)</p>
<p>2. Source NAT for inside addresses (clients) when they must go above the DMZ server (in the &#8220;public&#8221; address) so that the source is a different puclic address.</p>
<p>Have not tested yet so I do not know but the config must be abit weird. <img src='http://blogg.kvistofta.nu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p></i></p>
<p>ok. Lets try. I put together a quick lab-setup. A 3-legged ASA with a one-legged router on each firewall-interface:</p>
<p><code><br />
interface Vlan10<br />
 nameif outside<br />
 security-level 0<br />
 ip address 200.1.1.1 255.255.255.0<br />
!<br />
interface Vlan20<br />
 nameif inside<br />
 security-level 100<br />
 ip address 10.1.1.1 255.255.255.0<br />
!<br />
interface Vlan30<br />
 no forward interface Vlan20<br />
 nameif dmz<br />
 security-level 50<br />
 ip address 10.2.2.1 255.255.255.0<br />
!<br />
</code></p>
<p>And the routers.</p>
<p>R1:<br />
<code><br />
interface FastEthernet0<br />
 ip address 200.1.1.99 255.255.255.0<br />
 duplex auto<br />
 speed auto<br />
end<br />
</code></p>
<p>R2:<br />
<code><br />
interface FastEthernet0<br />
 ip address 10.1.1.99 255.255.255.0<br />
 duplex auto<br />
 speed auto<br />
end<br />
</code></p>
<p>and R3:<br />
<code><br />
interface FastEthernet0<br />
 ip address 10.2.2.2 255.255.255.0<br />
 duplex auto<br />
 speed auto<br />
end<br />
</code></p>
<p>Ok. R1 is the outside host on internet. R2 is an inside host on our corporate network. R3 is this magical server on DMZ. In this example it is a high performance telnet server!</p>
<p><code><br />
line vty 0 4<br />
 no login<br />
</code></p>
<p>First, make sure that this is reachable from internet. We do a static and allow the traffic on outside acl:</p>
<p><code><br />
static (dmz,outside) 200.1.1.2 10.2.2.2 netmask 255.255.255.255<br />
access-list OUTSIDE extended permit tcp any host 200.1.1.2 eq telnet<br />
</code></p>
<p>Verification. Telnet from R1 to public IP:<br />
<code><br />
R1#telnet 200.1.1.2<br />
Trying 200.1.1.2 ... Open<br />
R3><br />
</code></p>
<p>Great. Now we want to reach the DMZ server from inside. Since this is higher security level to lower and we dont have any acl on inside we dont have to care about open the traffic. But we want to use an OUTSIDE address as destination ip to reach a DMZ host. Lets try a static:</p>
<p><code><br />
FW(config)# static (dmz,inside) 200.1.1.2 10.2.2.2<br />
</code></p>
<p>The command above seems weird, right? I agree. Someday when I have a lot of time I will explain the theory but for now, just trust me!</p>
<p>Verification:<br />
<code><br />
R2#telnet 200.1.1.2<br />
Trying 200.1.1.2 ... Open<br />
R3><br />
</code></p>
<p>Next step is to hide the source address of that telnet client on inside. Right now it is using its own source ip:<br />
<code><br />
R3>en<br />
Password:<br />
R3#<br />
R3#sh users<br />
    Line       User       Host(s)              Idle       Location<br />
   0 con 0                idle                 00:08:09<br />
*  6 vty 0                idle                 00:00:00 10.1.1.99</p>
<p>  Interface    User               Mode         Idle     Peer Address</p>
<p>R3#<br />
</code></p>
<p>So, how do we accomplish that? The easiest way is to use a policy nat-statement. We create an access-list which defines which traffic to translate. We then create a nat-statement with a nat-id of your choice and call the access-list. Finaly we define which global ip to use. (outside. Remember dmz is outside relative to inside since dmz has lower security-level)<br />
<code><br />
access-list Inside2DMZ extended permit tcp 10.1.1.0 255.255.255.0 host 200.1.1.2 eq telnet<br />
nat (inside) 1 access-list Inside2DMZ<br />
global (dmz) 1 200.1.1.10<br />
</code></p>
<p>Verification:<br />
<code><br />
R2#telnet 200.1.1.2<br />
Trying 200.1.1.2 ... Open</p>
<p>R3>sh users<br />
    Line       User       Host(s)              Idle       Location<br />
*  6 vty 0                idle                 00:00:00 200.1.1.10</p>
<p>  Interface    User               Mode         Idle     Peer Address</p>
<p>R3></code></p>
<p>Voila! So, the client is on a private ip network 10.1.1.0 and establish a connection to what he think is on outside, because it is an public/outside ip. The traffic passes the magic ASA and the server on DMZ believes that the client is on internet since it has a public/outside source ip.</p>
<p><a href="http://www.gliffy.com/pubdoc/2075293/L.png"><img src="http://www.gliffy.com/pubdoc/2075293/S.png" alt="Topology" /></a></p>
<p>Mission accomplished.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogg.kvistofta.nu/doing-some-magic-translations-in-cisco-asa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EzVPN Server on IOS in three different flavous</title>
		<link>http://blogg.kvistofta.nu/ezvpn-server-on-ios-in-three-different-flavous/</link>
		<comments>http://blogg.kvistofta.nu/ezvpn-server-on-ios-in-three-different-flavous/#comments</comments>
		<pubDate>Thu, 13 May 2010 21:06:16 +0000</pubDate>
		<dc:creator>Jimmy Larsson</dc:creator>
				<category><![CDATA[Cisco IOS]]></category>
		<category><![CDATA[English posts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://blogg.kvistofta.nu/?p=1099</guid>
		<description><![CDATA[Comparizon between 3 different ways to configure EzVPN on IOS. Example 1: EzVPN-server vanilla-style aaa new-model ! ! aaa authentication login default none aaa authentication login AAA-AUTHEN local aaa authorization network default none aaa authorization network AAA-AUTHOR local ! ! username cisco password 0 cisco ! ! crypto isakmp policy 10 encr aes authentication pre-share [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Comparizon between 3 different ways to configure EzVPN on IOS.</p>
<p><b>Example 1: EzVPN-server vanilla-style</b></p>
<p><code><br />
aaa new-model<br />
!<br />
!<br />
aaa authentication login default none<br />
aaa authentication login AAA-AUTHEN local<br />
aaa authorization network default none<br />
aaa authorization network AAA-AUTHOR local<br />
!<br />
!<br />
username cisco password 0 cisco<br />
!<br />
!<br />
crypto isakmp policy 10<br />
 encr aes<br />
 authentication pre-share<br />
 group 2<br />
!<br />
crypto isakmp client configuration group MYGROUP<br />
 key cisco<br />
 dns 8.8.8.8<br />
 pool LOCALPOOL<br />
 acl SPLITTUNNEL<br />
 save-password<br />
!<br />
!<br />
crypto ipsec transform-set TSET esp-aes esp-sha-hmac<br />
!<br />
crypto dynamic-map DYNMAP 10<br />
 set transform-set TSET<br />
 reverse-route<br />
!<br />
!<br />
crypto map CMAP client authentication list AAA-AUTHEN<br />
crypto map CMAP isakmp authorization list AAA-AUTHOR<br />
crypto map CMAP client configuration address respond<br />
crypto map CMAP 1 ipsec-isakmp dynamic DYNMAP<br />
!<br />
interface GigabitEthernet0/1<br />
 crypto map CMAP<br />
!<br />
!<br />
ip access-list extended SPLITTUNNEL<br />
 permit ip 8.9.5.0 0.0.0.255 any<br />
 permit ip 8.9.6.0 0.0.0.255 any<br />
!<br />
!<br />
</code></p>
<p><b>Example 2: Vanilla-style with ISAKMP profile on top</b></p>
<p><code><br />
aaa new-model<br />
!<br />
!<br />
aaa authentication login default none<br />
aaa authentication login AAA-AUTHEN local<br />
aaa authorization network default none<br />
aaa authorization network AAA-AUTHOR local<br />
!<br />
!<br />
crypto keyring EZVPN-KEYRING<br />
  pre-shared-key address 0.0.0.0 0.0.0.0 key cisco<br />
!<br />
crypto isakmp policy 10<br />
 encr aes<br />
 authentication pre-share<br />
 group 2<br />
!<br />
crypto isakmp client configuration group MYGROUP<br />
 key cisco<br />
 dns 8.8.8.8<br />
 pool LOCALPOOL<br />
 acl SPLITTUNNEL<br />
 save-password<br />
!<br />
crypto isakmp profile ISAKMP-PROFILE<br />
   keyring EZVPN-KEYRING<br />
   match identity group MYGROUP<br />
   client authentication list AAA-AUTHEN<br />
   isakmp authorization list AAA-AUTHOR<br />
   client configuration address respond<br />
!<br />
!<br />
crypto ipsec transform-set TSET esp-aes esp-sha-hmac<br />
!<br />
crypto dynamic-map DYNMAP 10<br />
 set transform-set TSET<br />
 set isakmp-profile ISAKMP-PROFILE<br />
 reverse-route<br />
!<br />
!<br />
crypto map CMAP 1 ipsec-isakmp dynamic DYNMAP<br />
!<br />
!<br />
interface GigabitEthernet0/1<br />
 crypto map CMAP<br />
!<br />
ip local pool LOCALPOOL 8.9.24.201 8.9.24.254<br />
!<br />
!<br />
!<br />
ip access-list extended SPLITTUNNEL<br />
 permit ip 8.9.5.0 0.0.0.255 any<br />
 permit ip 8.9.6.0 0.0.0.255 any<br />
!<br />
!<br />
</code></p>
<p><b>Differences between Example 1 and Example 2:</b><br />
<code><br />
crypto keyring EZVPN-KEYRING<br />
  pre-shared-key address 0.0.0.0 0.0.0.0 key cisco<br />
!<br />
crypto isakmp profile ISAKMP-PROFILE<br />
   keyring EZVPN-KEYRING<br />
   match identity group MYGROUP<br />
   client authentication list AAA-AUTHEN<br />
   isakmp authorization list AAA-AUTHOR<br />
   client configuration address respond<br />
!<br />
crypto dynamic-map DYNMAP 10<br />
 set isakmp-profile ISAKMP-PROFILE<br />
!<br />
<strike>crypto map CMAP client authentication list AAA-AUTHEN</strike><br />
<strike>crypto map CMAP isakmp authorization list AAA-AUTHOR</strike><br />
<strike>crypto map CMAP client configuration address respond</strike><br />
</code></p>
<p><b>Example 3: DVTI</b><br />
<code><br />
aaa new-model<br />
!<br />
!<br />
aaa authentication login default none<br />
aaa authentication login AAA-AUTHEN local<br />
aaa authorization network default none<br />
aaa authorization network AAA-AUTHOR local<br />
!<br />
!<br />
username cisco password 0 cisco<br />
!<br />
crypto keyring EZVPN-KEYRING<br />
  pre-shared-key address 0.0.0.0 0.0.0.0 key cisco<br />
!<br />
crypto isakmp policy 10<br />
 encr aes<br />
 authentication pre-share<br />
 group 2<br />
!<br />
crypto isakmp client configuration group MYGROUP<br />
 key cisco<br />
 dns 8.8.8.8<br />
 pool LOCALPOOL<br />
 acl SPLITTUNNEL<br />
 save-password<br />
!<br />
crypto isakmp profile ISAKMP-PROFILE<br />
   keyring EZVPN-KEYRING<br />
   match identity group MYGROUP<br />
   client authentication list AAA-AUTHEN<br />
   isakmp authorization list AAA-AUTHOR<br />
   client configuration address respond<br />
   virtual-template 1<br />
!<br />
!<br />
crypto ipsec transform-set TSET esp-aes esp-sha-hmac<br />
!<br />
crypto ipsec profile IPSEC-PROFILE<br />
 set transform-set TSET<br />
 set isakmp-profile ISAKMP-PROFILE<br />
!<br />
interface Virtual-Template1 type tunnel<br />
 ip unnumbered GigabitEthernet0/1<br />
 tunnel source GigabitEthernet0/1<br />
 tunnel mode ipsec ipv4<br />
 tunnel protection ipsec profile IPSEC-PROFILE<br />
!<br />
ip local pool LOCALPOOL 8.9.24.201 8.9.24.254<br />
!<br />
!<br />
ip access-list extended SPLITTUNNEL<br />
 permit ip 8.9.5.0 0.0.0.255 any<br />
 permit ip 8.9.6.0 0.0.0.255 any<br />
</code></p>
<p><b>Differences between Example 2 and Example 3</b><br />
<code><br />
crypto isakmp profile ISAKMP-PROFILE<br />
   virtual-template 1<br />
!<br />
crypto ipsec profile IPSEC-PROFILE<br />
 set transform-set TSET<br />
 set isakmp-profile ISAKMP-PROFILE<br />
!<br />
<strike>crypto dynamic-map DYNMAP 10</strike><br />
<strike> set transform-set TSET </strike><br />
<strike> set isakmp-profile ISAKMP-PROFILE</strike><br />
<strike> reverse-route</strike><br />
!<br />
!<br />
<strike>crypto map CMAP 1 ipsec-isakmp dynamic DYNMAP </strike><br />
!<br />
interface GigabitEthernet0/0<br />
<strike> crypto map CMAP</strike><br />
!<br />
interface Virtual-Template1 type tunnel<br />
 ip unnumbered GigabitEthernet0/1<br />
 tunnel source GigabitEthernet0/1<br />
 tunnel mode ipsec ipv4<br />
 tunnel protection ipsec profile IPSEC-PROFILE<br />
!</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogg.kvistofta.nu/ezvpn-server-on-ios-in-three-different-flavous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lab notes &#8211; WB1 Lab4 Part 1</title>
		<link>http://blogg.kvistofta.nu/lab-notes-wb1-lab4-part-1/</link>
		<comments>http://blogg.kvistofta.nu/lab-notes-wb1-lab4-part-1/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 13:46:22 +0000</pubDate>
		<dc:creator>Jimmy Larsson</dc:creator>
				<category><![CDATA[CCIE Security Lab]]></category>
		<category><![CDATA[Cisco ASA]]></category>
		<category><![CDATA[Cisco IOS]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogg.kvistofta.nu/?p=829</guid>
		<description><![CDATA[Today I started to work with IPExpert CCIE Security workbook 1 Lab 4a &#8211; VPN-solutions. During my work I made the following notes which might be interresting to read for other CCIE-candidates. I will also from now on continue to do these notes and post them on this blog. Explaining and writing is simply a [...]]]></description>
			<content:encoded><![CDATA[<p></p><div id="_mcePaste">Today I started to work with <a href="http://www.ipexpert.com/Cisco/CCIE/Security/Workbook/Technology-Focused-Security-Lab-Workbook">IPExpert CCIE Security workbook 1</a> Lab 4a &#8211; VPN-solutions. During my work I made the following notes which might be interresting to read for other CCIE-candidates. I will also from now on continue to do these notes and post them on this blog. Explaining and writing is simply a great way for me to learn.</div>
<div>Also, if my boss some day ask me what the heck I am doing all these work-hours, I will gladly give him a link to this blog. <img src='http://blogg.kvistofta.nu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </div>
<h3>Task 4.1 &#8211; IOS CA</h3>
<div>This was quite straight-forward. Make an IOS become a root certificate authority for later use.</div>
<div id="_mcePaste">
<ul>
<li>What confuses me is that there is nothing in the configuation telling it to authenticate with certificates. All there is compared to &#8220;normal&#8221; preshared-key-auth is a missing &#8220;authen pre-share&#8221;. Which ofcours means that authentication is done with the certificates by default. I understand, I just have to get used to the fact that there is no command visible in the crypto isakmp policy saying &#8220;authentication MY-CA-TRUSTPOINT&#8221;.</li>
<li> When entering a wrong peer in the crypto map, it´s not just enough to re-enter a new ip. Since a crypto map sequence can have multiple peers for redundancy the old one doesnt go away. The effect is that the tunnel goes up, after a while, since it first tries with the bad peer ip before trying the second one. Remove the first.</li>
<li>Me being more used to vpns in asa than in ios usually tear down vpn-tunnels with the commands &#8220;clear crypto isakmp sa&#8221; and &#8220;clear crypto ipsec sa&#8221;. In IOS the corresponding command is &#8220;clear crypto session&#8221;. Cool.</li>
</ul>
</div>
<h3>Task 4.2 &#8211; IOS L2L</h3>
<p>This is all about enrollment of certificates from the CA in previous task to two IOS-routers and setup an ipsec-tunnel.</p>
<ul>
<li> What confuses me is that there is nothing in the configuation telling it to authenticate with certificates. All there is compared to &#8220;normal&#8221; preshared-key-auth is a missing &#8220;authen pre-share&#8221;. Which ofcours means that authentication is done with the certificates by default. I understand, I just have to get used to the fact that there is no command visible in the crypto isakmp policy saying &#8220;authentication MY-CA-TRUSTPOINT&#8221;.</li>
<li>When entering a wrong peer in the crypto map, it´s not just enough to re-enter a new ip. Since a crypto map sequence can have multiple peers for redundancy the old one doesnt go away. The effect is that the tunnel goes up, after a while, since it first tries with the bad peer ip before trying the second one. Remove the first.</li>
<li>Me being more used to vpns in asa than in ios usually tear down vpn-tunnels with the commands &#8220;clear crypto isakmp sa&#8221; and &#8220;clear crypto ipsec sa&#8221;. In IOS the corresponding command is &#8220;clear crypto session&#8221;. Cool.</li>
</ul>
<h3>Task 4.3 &#8211; VPN IOS-ASA</h3>
<p>The task was to setup a tunnel between IOS and ASA. Preshared-key, all straight-forward. However, I was asked to prioritize to certan traffic going into the tunnel from the IOS-router. This was done by creating a service-policy on outside-interface like this:</p>
<p><code><br />
class-map match-all VPN-CLASS</code></p>
<p><code> </code></p>
<p><code>match access-group 150  ! The ACL that defines the traffic to prioritize</code></p>
<p><code>policy-map VPN-POLICY</code></p>
<p><code>class VPNCLASS</p>
<p>priority 200 (I was also assign to restrict the prioritized traffic to 200kbps)</p>
<p>interface Fa1/1</p>
<p></code></p>
<p><code>service-policy output VPN-POLICY<br />
</code></p>
<ul>
<li>And, dont forget to do &#8220;qos pre-classify&#8221; on the crypto map! Otherwise your class-map has to look for ESP-traffic and that is not very granular, is it? <img src='http://blogg.kvistofta.nu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>&#8220;create lo3 on r2, assign it ip 192.168.3.2/24&#8243; and &#8220;create a vpn tunnel between Vlan100 and the newly created loopback network&#8221;. I used &#8220;host 192.168.3.2&#8243; in acl, but it clearly states &#8220;the loopback _network_&#8221;. Darn!</li>
</ul>
<h3>Task 4.4 L2L Aggressive mode with PSK</h3>
<div id="_mcePaste">
<ul>
<li>Stuck Twice.</li>
</ul>
</div>
<div>I PROMISE NEVER TO FORGET TO APPLY THE CRYPTO MAP TO THE INTERFACE AGAIN</div>
<div id="_mcePaste">I PROMISE NOT TO FORGET TO APPLY THE CRYPTO MAP TO IF AGAIN</div>
<div id="_mcePaste">I PROMISE NOTTO FORGET TO APPLY THE CRYPTO MAP TO IF AGAIN</div>
<div id="_mcePaste">
<ul>
<li>Stuck again. Couldn´t get the tunnel up even when comparing my configs with the solution guide. After getting help from <a href="http://www.mail-archive.com/ccie_security@onlinestudylist.com/">OSL </a>I made it:</li>
</ul>
</div>
<p><span style="font-family: arial, sans-serif; line-height: normal; border-collapse: collapse; color: #333333;"><em>Hi</em></span></p>
<div><em><br />
</em></div>
<div><em>I am struggling with this task, I simply cannot get the tunnel up. And I cant see what Ive done wrong. </em></div>
<div><em><br />
</em></div>
<div><em>Background: Make a tunnle between r2 and r5. Assume that r5-ip is dynamic, the tunnel should only be initiated from r5. (that is: dynamic map on r2).</em></div>
<div><em><br />
</em></div>
<div><span style="font-family: arial, sans-serif; line-height: normal; border-collapse: collapse; color: #333333;"><em>The relevant parts of the config looks like this:</em></span></div>
<div><span style="font-family: arial, sans-serif; color: #333333;"><span style="border-collapse: collapse; line-height: normal;"><em><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #000000;"><span style="border-collapse: separate; font-style: normal; line-height: 19px;"><br />
</span></span></em></span></span></div>
<div>Answer from Brandon:</div>
<p><span style="font-family: arial, sans-serif; line-height: normal; border-collapse: collapse; color: #333333;">Not sure if this is it or not but you have crypto isakmp key ipexpert<br />
hostname <a style="color: #364452;" href="http://r5.ipexpert.com/" class="broken_link"  target="_blank">r5.ipexpert.com</a> and the debug shows    FQDN name    : <a style="color: #364452;" href="http://r5.ipexpert.com/" class="broken_link"  target="_blank">R5.ipexpert.com</a></span></p>
<div>Voila! Changed the &#8220;r5&#8243; to &#8220;R5&#8243; and it started working!</div>
<h3>Task 4.5 L2L Overlapping subnets.</h3>
<div id="_mcePaste">The task was to create a tunnel between 4 routers to protect traffic between internal nets. The restrictions was: no static routing, no crypto maps and no GRE.</div>
<div id="_mcePaste">
<ul>
<li>I havent worked  very much with tunnel-interfaces but this was a pleasant first date. It´s kind of magic making a virtual interface and make the router route traffic thru it. Even more coolish when you encrypt the traffic and make a routing protocol talk thru the tunnel.</li>
<li>Since I wasn´t allowed to use static routing I had to create loopback-interfaces to force knowledge of that local networks translated address-space into the routing-protocol. I was thinking of some kind of &#8220;add-reverse-route&#8221;-option for the &#8220;ip nat source static network&#8221;-command but I guess there is no such solution? Or could this routing-issue be solved in another way?</li>
</ul>
</div>
<h3>Task 4.6 &#8211; Easy VPN Server on IOS</h3>
<div id="_mcePaste">
<ul>
<li>This task deals with connecting a plain ipsec-client from XP workstation to an VPN-server on ios. First step was to verify connectivity on XP. Wrong IP, changing it. Now, a good advice from someone &#8220;who knows&#8221;: Do NOT add a default route on the student NIC of the <a href="http://proctorlabs.com/PDF/sec_bp3_top.pdf">labb </a>pc:s. It has 2 nics and the other one is convinently named &#8220;Outside NIC &#8211; Do not Touch!&#8221; which is fine because thats how you reach the machine over internet. But if you add a default &#8220;gateway&#8221; on the student nic (which you are allowed to fool with) you will convert that kind little XP-machine into an unpredicible beast. If you are lucky u will reach it after a while and remove that default gw. So I´ve heard. <img src='http://blogg.kvistofta.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>IOS auto-enroll and the enroll-feature of ipsec vpn client is cool. Just point it to http://&lt;ios ca ip&gt;/cgi-bin/pkiclient.exe and request a certificate.</li>
<li> I had to look at the solution guide quite alot in this case. Even when doing that I couldnt get the vpn-client to connect. I just got these error messages:</li>
</ul>
</div>
<p><code> </code></p>
<p><code></p>
<div id="_mcePaste">Feb 26 12:35:24.740: ISAKMP:(1011):deleting SA reason "Recevied fatal informational" state (R) CONF_XAUTH    (peer 8.9.2.200)</div>
<div id="_mcePaste">Feb 26 12:35:24.740: ISAKMP:(1011):deleting SA reason "Recevied fatal informational" state (R) CONF_XAUTH    (peer 8.9.2.200)</div>
<p></code></p>
<div>
<ul>
<li>Suddenly I looked at the bottom right corner of my screen and saw tht the time was 3 minutes until the lab-period was over. I have never backed up a bunch of routers this fast before. First thing next lab-attempt will be to load the configs and troubleshoot the EasyVPN-config of R4.</li>
</ul>
</div>
<div>Conclusion of this lab so far: It´s intense! I´ve been configuring plenty of VPN-solutions before, but I guess that my experience covers only 20-30% of the VPN-related topics in this lab. All these profiles-configurations in IOS are all new to me. I guess I have some CCO-chapters to read during the weekend&#8230;</div>
<div>Here are my current configurations: <a href="http://blogg.kvistofta.nu/wp-content/uploads/2010/02/asa1.txt" target="_blank">asa1</a>, <a href="http://blogg.kvistofta.nu/wp-content/uploads/2010/02/r2.txt" target="_blank">r2</a>, <a href="http://blogg.kvistofta.nu/wp-content/uploads/2010/02/r4.txt" target="_blank">r4</a>, <a href="http://blogg.kvistofta.nu/wp-content/uploads/2010/02/r5.txt" target="_blank">r5 </a>and <a href="http://blogg.kvistofta.nu/wp-content/uploads/2010/02/r6.txt" target="_blank">r6</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://blogg.kvistofta.nu/lab-notes-wb1-lab4-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
