<?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>Networking with Cisco &#187; Cisco configuration</title>
	<atom:link href="http://www.gho.no/category/cisco-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gho.no</link>
	<description>How to get the best networks!</description>
	<lastBuildDate>Wed, 02 Sep 2009 18:10:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cisco 3750 Password Recovery</title>
		<link>http://www.gho.no/2009/06/cisco-3750-password-recovery/</link>
		<comments>http://www.gho.no/2009/06/cisco-3750-password-recovery/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 11:41:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[3750]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[password recovery]]></category>
		<category><![CDATA[rename config]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=293</guid>
		<description><![CDATA[		
		
		
		
This password recovery method also applies to at least the:
Cisco 2950, Cisco 2960, Cico 3550, Cisco 3560 and Cisco 3750 series.
The only difference will be for how long you will hold the mode button,
from my experience just try to hold it longer if it doesn&#8217;t work.
(It should be around 15 seconds for the 3750.)

Connect the [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2009/06/cisco-3750-password-recovery/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Cisco+3750+Password+Recovery";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em><br />
This password recovery method also applies to at least the:<br />
Cisco 2950, Cisco 2960, Cico 3550, Cisco 3560 and Cisco 3750 series.<br />
The only difference will be for how long you will hold the mode button,<br />
from my experience just try to hold it longer if it doesn&#8217;t work.<br />
(It should be around 15 seconds for the 3750.)<br />
</em></p>
<p>Connect the PC to the console port<br />
<strong>Settings:</strong></p>
<ul>
<li>9600 bits</li>
<li>8 data bits</li>
<li>&#8216;none&#8217; parity</li>
<li>1 stop bit</li>
</ul>
<p>If the switch is powered on, power it off and press and hold the <strong>mode</strong> button while you power on the switch again. Hold it for about 15 seconds until the SYS led is solid green, then release it.</p>
<p>The switch should then give you this prompt</p>
<blockquote><p>
switch:
</p></blockquote>
<p>To initialize the flash file system, run the command</p>
<blockquote><p>
switch: <strong>flash_init</strong>
</p></blockquote>
<p>The switch will now print a bunch of messages about the flash memory, hopefully one of them will be &#8216;done initializing flash&#8217;.<br />
The next command is <strong>load_helper</strong> to load any helper images required by boot.</p>
<p>You can now list the contents of your flash by running <strong>dir flash:</strong><br />
There should be a file named &#8216;config.text&#8217;, you can rename this file</p>
<blockquote><p>
switch: rename flash:config.text flash:oldconfig.backup
</p></blockquote>
<p>To further boot the switch run the <strong>boot</strong> command, this will start the boot you are used to. When the switch is booted up, you will realize that the configuration is gone..  But you are enabled on the switch now.</p>
<p>To recover the old configuration:</p>
<blockquote><p>
Switch#rename flash:oldconfig.backup flash:config.text
</p></blockquote>
<p>And now to replace the running configuration with the backup</p>
<blockquote><p>
Switch#copy flash:config.text running-config<br />
Destination filename [running-config]?
</p></blockquote>
<p>Press enter, and you will have your old switch configuration back and you are enabled.<br />
Just remember to change your password now! <img src='http://www.gho.no/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2009/06/cisco-3750-password-recovery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cisco IP Phone Configuration with Asterisk</title>
		<link>http://www.gho.no/2009/05/cisco-ip-phone-configuration-with-asterisk/</link>
		<comments>http://www.gho.no/2009/05/cisco-ip-phone-configuration-with-asterisk/#comments</comments>
		<pubDate>Tue, 19 May 2009 22:20:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[cisco 7960]]></category>
		<category><![CDATA[cisco 7970]]></category>
		<category><![CDATA[cisco 7970G]]></category>
		<category><![CDATA[cisco config]]></category>
		<category><![CDATA[cisco ip phone]]></category>
		<category><![CDATA[config files]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[ip phone]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=220</guid>
		<description><![CDATA[		
		
		
		Getting the Cisco IP Phone 7970 G to work together with the software PBX Asterisk was something I had my hands on a couple of years back. Here&#8217;s how you can get them talking together.
You need a couple of things to get this working:

A functioning DHCP server
A functioning TFTP server
SIP Firmware from Cisco This is [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2009/05/cisco-ip-phone-configuration-with-asterisk/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Cisco+IP+Phone+Configuration+with+Asterisk";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>Getting the Cisco IP Phone 7970 G to work together with the software PBX Asterisk was something I had my hands on a couple of years back. Here&#8217;s how you can get them talking together.</em></p>
<p>You need a couple of things to get this working:</p>
<ol>
<li>A functioning DHCP server</li>
<li>A functioning TFTP server</li>
<li>SIP Firmware from <a href="http://www.cisco.com">Cisco</a> This is just a gzipped and tar&#8217;ed file.</li>
<li>A functioning asterisk server</li>
<li>A Cisco IP Phone</li>
</ol>
<p>According to a recent installation, the TFTP server must contain the following files</p>
<blockquote><p>apps70.1-1-2-26.sbn<br />
cnu70.3-1-2-26.sbn<br />
cvm70sip.8-0-2-25.sbn<br />
dsp70.1-1-2-26.sbn<br />
jar70sip.8-0-2-25.sbn<br />
SIP70.8-0-3S.loads<br />
term70.default.loads<br />
term71.default.loads<br />
SEP&lt;MACADDRESS&gt;.cnf.xml</p></blockquote>
<p>The file you should pay the most attention to is the SEP&lt;MACADDRESS&gt;.cnf.XML file, this is the configuration file. The configuration file is in XML format. You can find a sample configuration <a>here</a> that should work.</p>
<blockquote><p>
&lt;device  xsi:type=&#8221;axl:XIPPhone&#8221; ctiid=&#8221;203849429&#8243; uuid=&#8221;{96f8508b-10ef-f98c-d20d-0471777ec725}&#8221;&gt;<br />
&lt;fullConfig&gt;true&lt;/fullConfig&gt;<br />
&lt;deviceProtocol&gt;SIP&lt;/deviceProtocol&gt;<br />
&lt;sshUserId&gt;&lt;/sshUserId&gt;<br />
&lt;sshPassword&gt;&lt;/sshPassword&gt;<br />
&lt;devicePool  uuid=&#8221;{a755aa55-089c-2b47-9603-c7d51b9ca4b5}&#8221;&gt;<br />
&lt;dateTimeSetting  uuid=&#8221;{9ec4850a-7748-11d3-bdf0-00108302ead1}&#8221;&gt;<br />
&lt;dateTemplate&gt;M/D/Y&lt;/dateTemplate&gt;<br />
&lt;timeZone&gt;Greenwich Standard Time&lt;/timeZone&gt;<br />
&lt;/dateTimeSetting&gt;<br />
&lt;callManagerGroup&gt;<br />
&lt;tftpDefault&gt;true&lt;/tftpDefault&gt;<br />
&lt;members&gt;<br />
&lt;member  priority=&#8221;0&#8243;&gt;<br />
&lt;callManager&gt;<br />
&lt;name&gt;ccm-beta-5-1&lt;/name&gt;<br />
&lt;description&gt;CallManager 5.0 Beta Pub &#8211; 5.0.1.032&lt;/description&gt;<br />
&lt;ports&gt;<br />
&lt;ethernetPhonePort&gt;2000&lt;/ethernetPhonePort&gt;<br />
&lt;sipPort&gt;5060&lt;/sipPort&gt;<br />
&lt;securedSipPort&gt;5061&lt;/securedSipPort&gt;<br />
&lt;mgcpPorts&gt;<br />
&lt;listen&gt;2427&lt;/listen&gt;<br />
&lt;keepAlive&gt;2428&lt;/keepAlive&gt;<br />
&lt;/mgcpPorts&gt;<br />
&lt;/ports&gt;<br />
&lt;processNodeName&gt;ccm-beta-5-1&lt;/processNodeName&gt;<br />
&lt;/callManager&gt;<br />
&lt;/member&gt;<br />
&lt;/members&gt;<br />
&lt;/callManagerGroup&gt;<br />
&lt;srstInfo  uuid=&#8221;{cd241e11-4a58-4d3d-9661-f06c912a18a3}&#8221;&gt;<br />
&lt;name&gt;Disable&lt;/name&gt;<br />
&lt;srstOption&gt;Disable&lt;/srstOption&gt;<br />
&lt;userModifiable&gt;false&lt;/userModifiable&gt;<br />
&lt;ipAddr1&gt;&lt;/ipAddr1&gt;<br />
&lt;port1&gt;2000&lt;/port1&gt;<br />
&lt;ipAddr2&gt;&lt;/ipAddr2&gt;<br />
&lt;port2&gt;2000&lt;/port2&gt;<br />
&lt;ipAddr3&gt;&lt;/ipAddr3&gt;<br />
&lt;port3&gt;2000&lt;/port3&gt;<br />
&lt;sipIpAddr1&gt;<strong>IP ADDRESS TO SIP SERVER</strong>&lt;/sipIpAddr1&gt;<br />
&lt;sipPort1&gt;5060&lt;/sipPort1&gt;<br />
&lt;sipIpAddr2&gt;&lt;/sipIpAddr2&gt;<br />
&lt;sipPort2&gt;5060&lt;/sipPort2&gt;<br />
&lt;sipIpAddr3&gt;&lt;/sipIpAddr3&gt;<br />
&lt;sipPort3&gt;5060&lt;/sipPort3&gt;<br />
&lt;isSecure&gt;false&lt;/isSecure&gt;<br />
&lt;/srstInfo&gt;<br />
&lt;mlppDomainId&gt;-1&lt;/mlppDomainId&gt;<br />
&lt;mlppIndicationStatus&gt;Default&lt;/mlppIndicationStatus&gt;<br />
Default<br />
&lt;connectionMonitorDuration&gt;120&lt;/connectionMonitorDuration&gt;<br />
&lt;/devicePool&gt;<br />
&lt;sipProfile&gt;<br />
&lt;sipProxies&gt;<br />
&lt;backupProxy&gt;USECALLMANAGER&lt;/backupProxy&gt;<br />
&lt;backupProxyPort&gt;5060&lt;/backupProxyPort&gt;<br />
&lt;emergencyProxy&gt;USECALLMANAGER&lt;/emergencyProxy&gt;<br />
&lt;emergencyProxyPort&gt;5060&lt;/emergencyProxyPort&gt;<br />
&lt;outboundProxy&gt;USECALLMANAGER&lt;/outboundProxy&gt;<br />
&lt;outboundProxyPort&gt;5060&lt;/outboundProxyPort&gt;<br />
&lt;registerWithProxy&gt;true&lt;/registerWithProxy&gt;<br />
&lt;/sipProxies&gt;<br />
&lt;sipCallFeatures&gt;<br />
&lt;cnfJoinEnabled&gt;true&lt;/cnfJoinEnabled&gt;<br />
&lt;callForwardURI&gt;x-cisco-serviceuri-cfwdall&lt;/callForwardURI&gt;<br />
&lt;callPickupURI&gt;x-cisco-serviceuri-pickup&lt;/callPickupURI&gt;<br />
&lt;callPickupListURI&gt;x-cisco-serviceuri-opickup&lt;/callPickupListURI&gt;<br />
&lt;callPickupGroupURI&gt;x-cisco-serviceuri-gpickup&lt;/callPickupGroupURI&gt;<br />
&lt;meetMeServiceURI&gt;x-cisco-serviceuri-meetme&lt;/meetMeServiceURI&gt;<br />
&lt;abbreviatedDialURI&gt;x-cisco-serviceuri-abbrdial&lt;/abbreviatedDialURI&gt;<br />
&lt;rfc2543Hold&gt;false&lt;/rfc2543Hold&gt;<br />
&lt;callHoldRingback&gt;2&lt;/callHoldRingback&gt;<br />
&lt;localCfwdEnable&gt;true&lt;/localCfwdEnable&gt;<br />
&lt;semiAttendedTransfer&gt;true&lt;/semiAttendedTransfer&gt;<br />
&lt;anonymousCallBlock&gt;2&lt;/anonymousCallBlock&gt;<br />
&lt;callerIdBlocking&gt;2&lt;/callerIdBlocking&gt;<br />
&lt;dndControl&gt;0&lt;/dndControl&gt;<br />
&lt;remoteCcEnable&gt;true&lt;/remoteCcEnable&gt;<br />
&lt;/sipCallFeatures&gt;<br />
&lt;sipStack&gt;<br />
&lt;sipInviteRetx&gt;6&lt;/sipInviteRetx&gt;<br />
&lt;sipRetx&gt;10&lt;/sipRetx&gt;<br />
&lt;timerInviteExpires&gt;180&lt;/timerInviteExpires&gt;<br />
&lt;timerRegisterExpires&gt;3600&lt;/timerRegisterExpires&gt;<br />
&lt;timerRegisterDelta&gt;5&lt;/timerRegisterDelta&gt;<br />
&lt;timerKeepAliveExpires&gt;120&lt;/timerKeepAliveExpires&gt;<br />
&lt;timerSubscribeExpires&gt;120&lt;/timerSubscribeExpires&gt;<br />
&lt;timerSubscribeDelta&gt;5&lt;/timerSubscribeDelta&gt;<br />
&lt;timerT1&gt;500&lt;/timerT1&gt;<br />
&lt;timerT2&gt;4000&lt;/timerT2&gt;<br />
&lt;maxRedirects&gt;70&lt;/maxRedirects&gt;<br />
&lt;remotePartyID&gt;true&lt;/remotePartyID&gt;<br />
&lt;userInfo&gt;None&lt;/userInfo&gt;<br />
&lt;/sipStack&gt;<br />
&lt;autoAnswerTimer&gt;1&lt;/autoAnswerTimer&gt;<br />
&lt;autoAnswerAltBehavior&gt;false&lt;/autoAnswerAltBehavior&gt;<br />
&lt;autoAnswerOverride&gt;true&lt;/autoAnswerOverride&gt;<br />
&lt;transferOnhookEnabled&gt;false&lt;/transferOnhookEnabled&gt;<br />
&lt;enableVad&gt;false&lt;/enableVad&gt;<br />
none<br />
&lt;dtmfAvtPayload&gt;101&lt;/dtmfAvtPayload&gt;<br />
&lt;dtmfDbLevel&gt;3&lt;/dtmfDbLevel&gt;<br />
&lt;dtmfOutofBand&gt;avt&lt;/dtmfOutofBand&gt;<br />
&lt;alwaysUsePrimeLine&gt;false&lt;/alwaysUsePrimeLine&gt;<br />
&lt;alwaysUsePrimeLineVoiceMail&gt;false&lt;/alwaysUsePrimeLineVoiceMail&gt;<br />
&lt;kpml&gt;3&lt;/kpml&gt;<br />
&lt;phoneLabel&gt;&lt;/phoneLabel&gt;<br />
&lt;stutterMsgWaiting&gt;2&lt;/stutterMsgWaiting&gt;<br />
&lt;callStats&gt;false&lt;/callStats&gt;<br />
&lt;offhookToFirstDigitTimer&gt;15000&lt;/offhookToFirstDigitTimer&gt;<br />
&lt;silentPeriodBetweenCallWaitingBursts&gt;10&lt;/silentPeriodBetweenCallWaitingBursts&gt;<br />
&lt;disableLocalSpeedDialConfig&gt;true&lt;/disableLocalSpeedDialConfig&gt;<br />
&lt;startMediaPort&gt;16384&lt;/startMediaPort&gt;<br />
&lt;stopMediaPort&gt;32766&lt;/stopMediaPort&gt;<br />
&lt;sipLines&gt;<br />
&lt;line  button=&#8221;1&#8243;&gt;<br />
&lt;featureID&gt;9&lt;/featureID&gt;<br />
&lt;featureLabel&gt;&lt;/featureLabel&gt;<br />
&lt;proxy&gt;USECALLMANAGER&lt;/proxy&gt;<br />
&lt;port&gt;5060&lt;/port&gt;<br />
&lt;name&gt;3302&lt;/name&gt;<br />
&lt;displayName&gt;3302&lt;/displayName&gt;<br />
&lt;autoAnswer&gt;<br />
&lt;autoAnswerEnabled&gt;2&lt;/autoAnswerEnabled&gt;<br />
&lt;/autoAnswer&gt;<br />
&lt;callWaiting&gt;3&lt;/callWaiting&gt;<br />
&lt;authName&gt;&lt;/authName&gt;<br />
&lt;sharedLine&gt;false&lt;/sharedLine&gt;<br />
&lt;messageWaitingLampPolicy&gt;3&lt;/messageWaitingLampPolicy&gt;<br />
&lt;messagesNumber&gt;&lt;/messagesNumber&gt;<br />
&lt;ringSettingIdle&gt;4&lt;/ringSettingIdle&gt;<br />
&lt;ringSettingActive&gt;5&lt;/ringSettingActive&gt;<br />
&lt;contact&gt;7b452e87-4496-4762-e11f-b26751a1884b&lt;/contact&gt;<br />
&lt;forwardCallInfoDisplay&gt;<br />
&lt;callerName&gt;true&lt;/callerName&gt;<br />
&lt;callerNumber&gt;false&lt;/callerNumber&gt;<br />
&lt;redirectedNumber&gt;false&lt;/redirectedNumber&gt;<br />
&lt;dialedNumber&gt;true&lt;/dialedNumber&gt;<br />
&lt;/forwardCallInfoDisplay&gt;<br />
&lt;/line&gt;<br />
&lt;/sipLines&gt;<br />
&lt;voipControlPort&gt;5060&lt;/voipControlPort&gt;<br />
&lt;dscpForAudio&gt;184&lt;/dscpForAudio&gt;<br />
&lt;ringSettingBusyStationPolicy&gt;0&lt;/ringSettingBusyStationPolicy&gt;<br />
&lt;dialTemplate&gt;&lt;/dialTemplate&gt;<br />
&lt;softKeyFile&gt;SK50719900-3bee-4594-bc3f-6400e1a33bf0.xml&lt;/softKeyFile&gt;<br />
&lt;/sipProfile&gt;<br />
&lt;commonProfile&gt;<br />
&lt;phonePassword&gt;&lt;/phonePassword&gt;<br />
&lt;backgroundImageAccess&gt;true&lt;/backgroundImageAccess&gt;<br />
&lt;callLogBlfEnabled&gt;2&lt;/callLogBlfEnabled&gt;<br />
&lt;/commonProfile&gt;<br />
&lt;loadInformation&gt;SIP70.8-0-3S&lt;/loadInformation&gt;<br />
&lt;vendorConfig&gt;<br />
&lt;disableSpeaker&gt;false&lt;/disableSpeaker&gt;&lt;disableSpeakerAndHeadset&gt;false&lt;/disableSpeakerAndHeadset&gt;&lt;pcPort&gt;0&lt;/pcPort&gt;&lt;settingsAccess&gt;1&lt;/settingsAccess&gt;&lt;garp&gt;0&lt;/garp&gt;&lt;voiceVlanAccess&gt;0&lt;/voiceVlanAccess&gt;&lt;videoCapability&gt;0&lt;/videoCapability&gt;&lt;autoSelectLineEnable&gt;0&lt;/autoSelectLineEnable&gt;&lt;webAccess&gt;0&lt;/webAccess&gt;&lt;daysDisplayNotActive&gt;1,7&lt;/daysDisplayNotActive&gt;&lt;displayOnTime&gt;07:30&lt;/displayOnTime&gt;&lt;displayOnDuration&gt;10:30&lt;/displayOnDuration&gt;&lt;displayIdleTimeout&gt;01:00&lt;/displayIdleTimeout&gt;&lt;spanToPCPort&gt;1&lt;/spanToPCPort&gt;&lt;/vendorConfig&gt;<br />
&lt;versionStamp&gt;1136931633-57191cee-5ffc-4342-b286-4246b4991890&lt;/versionStamp&gt;<br />
&lt;userLocale&gt;<br />
&lt;name&gt;English_United_States&lt;/name&gt;<br />
&lt;uid&gt;1&lt;/uid&gt;<br />
&lt;langCode&gt;en_US&lt;/langCode&gt;<br />
&lt;version&gt;1.0.0.0-1&lt;/version&gt;<br />
&lt;winCharSet&gt;iso-8859-1&lt;/winCharSet&gt;<br />
&lt;/userLocale&gt;<br />
&lt;networkLocale&gt;United_States&lt;/networkLocale&gt;<br />
&lt;networkLocaleInfo&gt;<br />
&lt;name&gt;United_States&lt;/name&gt;<br />
&lt;uid&gt;64&lt;/uid&gt;<br />
&lt;version&gt;1.0.0.0-1&lt;/version&gt;<br />
&lt;/networkLocaleInfo&gt;<br />
&lt;deviceSecurityMode&gt;1&lt;/deviceSecurityMode&gt;<br />
&lt;idleTimeout&gt;0&lt;/idleTimeout&gt;<br />
&lt;authenticationURL&gt;http://ccm-beta-5-1:8080/ccmcip/authenticate.jsp&lt;/authenticationURL&gt;<br />
&lt;directoryURL&gt;http://ccm-beta-5-1:8080/ccmcip/xmldirectory.jsp&lt;/directoryURL&gt;<br />
&lt;idleURL&gt;&lt;/idleURL&gt;<br />
&lt;informationURL&gt;http://ccm-beta-5-1:8080/ccmcip/GetTelecasterHelpText.jsp&lt;/informationURL&gt;<br />
&lt;messagesURL&gt;&lt;/messagesURL&gt;<br />
&lt;proxyServerURL&gt;&lt;/proxyServerURL&gt;<br />
&lt;servicesURL&gt;http://10.86.5.102/CiscoServices/index.xml&lt;/servicesURL&gt;<br />
&lt;dscpForSCCPPhoneConfig&gt;96&lt;/dscpForSCCPPhoneConfig&gt;<br />
&lt;dscpForSCCPPhoneServices&gt;0&lt;/dscpForSCCPPhoneServices&gt;<br />
&lt;dscpForCm2Dvce&gt;96&lt;/dscpForCm2Dvce&gt;<br />
&lt;transportLayerProtocol&gt;4&lt;/transportLayerProtocol&gt;<br />
&lt;capfAuthMode&gt;0&lt;/capfAuthMode&gt;<br />
&lt;capfList&gt;<br />
&lt;capf&gt;<br />
&lt;phonePort&gt;3804&lt;/phonePort&gt;<br />
&lt;processNodeName&gt;ccm-beta-5-1&lt;/processNodeName&gt;<br />
&lt;/capf&gt;<br />
&lt;/capfList&gt;<br />
&lt;certHash&gt;&lt;/certHash&gt;<br />
&lt;encrConfig&gt;false&lt;/encrConfig&gt;<br />
&lt;line  button=&#8221;3&#8243;&gt;<br />
&lt;featureID&gt;2&lt;/featureID&gt;<br />
&lt;featureLabel&gt;2000&lt;/featureLabel&gt;<br />
&lt;speedDialNumber&gt;2000&lt;/speedDialNumber&gt;<br />
&lt;/line&gt;<br />
&lt;natReceivedProcessing&gt;true&lt;/natReceivedProcessing&gt;<br />
&lt;natEnabled&gt;true&lt;/natEnabled&gt;<br />
&lt;natAddress&gt;&lt;/natAddress&gt;<br />
&lt;dialTemplate&gt;dialplan.xml&lt;/dialTemplate&gt;<br />
&lt;/device&gt;
</p></blockquote>
<p>On the Asterisk server, you will have a file named sip.conf and to have the Cisco IP Phone talking to Asterisk you need this</p>
<blockquote><p>
[999999999]<br />
username=999999999<br />
type=friend<br />
secret=password<br />
nat=no<br />
host=dynamic<br />
canreinvite=no<br />
dtmfmode=rfc2833<br />
context=incoming<br />
qualify=yes<br />
disallow=all<br />
allow=ulaw
</p></blockquote>
<p>That should be it, good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2009/05/cisco-ip-phone-configuration-with-asterisk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Port Mirroring on Cisco &#8211; Monitoring the network</title>
		<link>http://www.gho.no/2009/05/port-mirroring-on-cisco-monitoring-the-network/</link>
		<comments>http://www.gho.no/2009/05/port-mirroring-on-cisco-monitoring-the-network/#comments</comments>
		<pubDate>Wed, 13 May 2009 23:03:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[cisco 2950]]></category>
		<category><![CDATA[cisco 3750]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[port mirror]]></category>
		<category><![CDATA[span]]></category>
		<category><![CDATA[switches]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=217</guid>
		<description><![CDATA[		
		
		
		&#8220;We just bought a new IPS/IDS, just put it between us and our transit provider!&#8221;. Sounds slick, huh? This request seems easy, but do you really know if it will function like expected and not jam all network traffic?
Try it out on a mirrored (SPAN) port first! With a SPAN you can get a copy [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2009/05/port-mirroring-on-cisco-monitoring-the-network/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Port+Mirroring+on+Cisco+%26%238211%3B+Monitoring+the+network";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>&#8220;We just bought a new IPS/IDS, just put it between us and our transit provider!&#8221;. Sounds slick, huh? This request seems easy, but do you really know if it will function like expected and not jam all network traffic?</em></p>
<p>Try it out on a mirrored (SPAN) port first! With a SPAN you can get a copy of all traffic from/to a port output on a second port, without interacting with traffic. This can be very helpful if you want to test out some new equipment for Intrusion detection and/or prevention. <a href="http://www.snort.org/">Snort</a> is an open source alternative for monitoring network traffic for obscurity and irregularities.</p>
<p>To configure a SPAN on 2940, 2950, 2955, 2960, 2970, 3550, 3560 and 3750 switches</p>
<blockquote><p>
Switch#conf t<br />
Switch(config)#monitor session 1 source interface Fa0/18<br />
Switch(config)#monitor session 1 destination interface Fa0/2<br />
Switch(config)#
</p></blockquote>
<p>With the configuration above you will copy all traffic from FastEthernet 0/18 and output it to FastEthernet 0/2<br />
The Cisco Catalyst 2950 is incapable to monitor vlans, but this is possible on for example the Cisco 3750.</p>
<p>To verify a SPAN session</p>
<blockquote><p>
Switch#sh monitor session 1<br />
Session 1<br />
&#8212;&#8212;&#8212;<br />
Source Ports:<br />
    RX Only:       None<br />
        TX Only:       None<br />
        Both:          Fa0/18<br />
Destination Ports: Fa0/2
</p></blockquote>
<p>I hope this maybe encourages you to test out some applications or equipment that you&#8217;ve been wanting to try but haven&#8217;t had the guts to!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2009/05/port-mirroring-on-cisco-monitoring-the-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manipulate Routed Traffic With A Route-map</title>
		<link>http://www.gho.no/2009/05/manipulate-routed-traffic-with-a-route-map/</link>
		<comments>http://www.gho.no/2009/05/manipulate-routed-traffic-with-a-route-map/#comments</comments>
		<pubDate>Wed, 06 May 2009 14:59:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[access-list]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[next-hop]]></category>
		<category><![CDATA[policy routing]]></category>
		<category><![CDATA[route-map]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[transparent proxy]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=203</guid>
		<description><![CDATA[		
		
		
		Sometimes.. when everything is failing, you&#8217;ll need to do some dirty hacks to get things the way you want. I&#8217;m going to show you how to modify the next-hop (where the packet is routed) with a route-map
Let&#8217;s say you want to redirect web-traffic to a local cache running for example squid, but let other traffic [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2009/05/manipulate-routed-traffic-with-a-route-map/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Manipulate+Routed+Traffic+With+A+Route-map";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>Sometimes.. when everything is failing, you&#8217;ll need to do some dirty hacks to get things the way you want. I&#8217;m going to show you how to modify the next-hop (where the packet is routed) with a route-map</em></p>
<p>Let&#8217;s say you want to redirect web-traffic to a local cache running for example squid, but let other traffic pass on to its intended destination.  As usual I have created an imaginary scenario, but this time I have used my creative skills (yeah, right!) to draw a little network map in <a href="http://projects.gnome.org/dia/">dia</a> also.</p>
<p><img src="http://www.gho.no/wp-content/uploads/2009/05/squidroutemap.png" alt="squidroutemap" title="squidroutemap" width="495" height="244" class="alignnone size-full wp-image-204" /></p>
<p>The idea is to let all TCP port 80 traffic from all the clients to be sent to the web cache server on 10.0.0.2<br />
To achieve this, we need to create an access-list to match web traffic from the clients.</p>
<blockquote><p>
Router#conf t<br />
Enter configuration commands, one per line.  End with CNTL/Z.<br />
Router(config)#ip access-list extended webtraffic<br />
Router(config-ext-nacl)#deny tcp host 10.0.0.2 any eq www<br />
Router(config-ext-nacl)#permit tcp 10.0.0.0 0.0.0.255 any eq www
</p></blockquote>
<p>To verify that this access-list now exists, run this command</p>
<blockquote><p>
Router#sh ip access-list webtraffic<br />
Extended IP access list webtraffic<br />
    10 deny tcp host 10.0.0.2 any eq www<br />
    20 permit tcp 10.0.0.0 0.0.0.255 any eq www
</p></blockquote>
<p>As you can see, I have a <strong>deny</strong> on 10.0.0.2, this is because we can&#8217;t match traffic coming from the web caching server and redirect it to itself, that would create a loop.</p>
<p>The next thing we need to do is to create a route-map which uses the webtraffic access-list to match packets and do the intended modifications to it.</p>
<blockquote><p>
Router(config)#route-map webcache-redirect permit 10<br />
Router(config-route-map)#match ip address webtraffic<br />
Router(config-route-map)#set ip next-hop 10.0.0.2<br />
Router(config-route-map)#route-map webcache-redirect permit 200
</p></blockquote>
<p>You can now verify this route-map by doing this</p>
<blockquote><p>
Router#sh route-map webcache-redirect<br />
route-map webcache-redirect, permit, sequence 10<br />
  Match clauses:<br />
    ip address (access-lists): webtraffic<br />
  Set clauses:<br />
    ip next-hop 10.0.0.2<br />
  Policy routing matches: 0 packets, 0 bytes<br />
route-map webcache-redirect, permit, sequence 200<br />
  Match clauses:<br />
  Set clauses:<br />
  Policy routing matches: 0 packets, 0 bytes
</p></blockquote>
<p>The last thing that needs to be done for this to have effect is to apply policy routing on the interface on which you receive the traffic from the clients (the interface which acts as a gateway for the clients, in this case the one with the IP address 10.0.0.1).</p>
<blockquote><p>
Router(config)#int vlan 1<br />
Router(config-if)#ip policy route-map webtraffic-redirect
</p></blockquote>
<p>You can now use the <strong>sh route-map</strong> command again to see that your webtraffic now is being policy-routed.</p>
<p style='text-decoration:line-through;'>Read about how to setup a squid as a transparent proxy <a href="http://tldp.org/HOWTO/TransparentProxy.html">here.</a></p>
<p>UPDATE: <a href="http://www.ehjelle.no/">Eirik Hjelle</a> poked me and told me that the squid tutorial that I am refering to is outdated, and it sure is!<br />
The basics of the squid.conf should be (was not going to cover it here, since it&#8217;s a cisco blog, but since Eirik was a nice fellow and just gave me a paste of the required I&#8217;ll include it:</p>
<blockquote><p>
http_port 3128 transparent<br />
acl internal_network src 10.0.0.0/24<br />
http_access allow internal_network
</p></blockquote>
<p>The traffic will still be directed to port 80 so it might be needed to change the http_port to</p>
<blockquote><p>
http_port 10.0.0.2:80 transparent
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2009/05/manipulate-routed-traffic-with-a-route-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Configuring errdisable behaviour</title>
		<link>http://www.gho.no/2009/02/configuring-errdisable-behaviour/</link>
		<comments>http://www.gho.no/2009/02/configuring-errdisable-behaviour/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 18:36:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[errdisable]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[switches]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=172</guid>
		<description><![CDATA[		
		
		
		When was the first time you learned that errdisable exists? Here is a short introduction!
I learned this the hard way, I had a network setup in a lab when I had a port shutdown and never come up again&#8230; You can say I am glad I learned about it before that happened in the field, [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2009/02/configuring-errdisable-behaviour/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Configuring+errdisable+behaviour";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>When was the first time you learned that errdisable exists? Here is a short introduction!</em></p>
<p>I learned this the hard way, I had a network setup in a lab when I had a port shutdown and never come up again&#8230; You can say I am glad I learned about it before that happened in the field, but do you know what it is and how you can configure it?</p>
<p><strong>What is errdisable?<br />
</strong>Errdisable is a mechanism in Cisco equipment that will for example shutdown or suspend network ports where traffic is looping, ports with unidirectional traffic and various other causes.  This renders the port useless and no traffic is passed over it, the LED on the switch or router turns orange.</p>
<p>To determine if a port is in errdisable state you can issue the command:</p>
<blockquote><p>Switch#sh int gigabitEthernet 1/0/25 status<br />
Port      Name               Status       Vlan       Duplex  Speed Type<br />
Gi1/0/25  mynetwork       <strong>err-disabled</strong> 1            auto   auto 1000BaseSX SFP</p></blockquote>
<p>Additionally to see all errdisabled interfaces that will be enabled you can use</p>
<blockquote><p>
Switch# show errdisable recovery
</p></blockquote>
<p>This command will show all errdisable causes with enabled recovery and all interfaces that will be enabled on the next timeout.</p>
<p><strong>Configuration</strong><br />
To configure errdisable recovery, you will use exactly that command</p>
<blockquote><p>
Switch#conf t<br />
Switch(config)#errdisable recovery cause bpduguard<br />
Switch(config)#
</p></blockquote>
<p>That command will enable recovery for the bpduguard (STP loop) cause.</p>
<p><strong>errdisable recovery timer</strong></p>
<blockquote><p>
Switch(config)#errdisable recovery interval 30
</p></blockquote>
<p>This will set a 30 second interval between timeouts, for every timeout cycle &#8211; all interfaces which are shutdown because of errdisable will be re-enabled.</p>
<p>If the reason for the errdisable status persists, the interface will then be shutdown and set to status errdisable again.  If you set the timeout too low, you may use a lot of CPU because the interface will effectively be flapping.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2009/02/configuring-errdisable-behaviour/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to setup a GRE tunnel on a Cisco Router</title>
		<link>http://www.gho.no/2009/01/how-to-setup-a-gre-tunnel-on-a-cisco-router/</link>
		<comments>http://www.gho.no/2009/01/how-to-setup-a-gre-tunnel-on-a-cisco-router/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 14:57:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[gre]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[traceroute]]></category>
		<category><![CDATA[tunneling]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=152</guid>
		<description><![CDATA[		
		
		
		Hey peeps, it has been a while now&#8230;
Sorry about that, I have had a lot of things on my mind lately.
Sometimes I also have issues figuring about a new subject to write about, but I will try to take on more advanced networking as someone requested it per email.  If you want me to write [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2009/01/how-to-setup-a-gre-tunnel-on-a-cisco-router/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "How+to+setup+a+GRE+tunnel+on+a+Cisco+Router";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>Hey peeps, it has been a while now&#8230;<br />
Sorry about that, I have had a lot of things on my mind lately.<br />
Sometimes I also have issues figuring about a new subject to write about, but I will try to take on more advanced networking as someone requested it per email.  If you want me to write about something or need help with anything, don&#8217;t hesitate to contact me.</em></p>
<p>So, let&#8217;s warm up the new year with an easy tutorial on how to setup a GRE tunnel on a Cisco router.</p>
<p>Consider this scenario:<br />
Router1 = 172.16.1.1<br />
Router2 = 192.168.0.1</p>
<p>The routing between these routers are fixed so that they can reach each other, like on the internet.<br />
Router2 will have the network 10.0.10.0/24 routed to it via a GRE tunnel.<br />
The address on the tunnel interfaces will be 10.0.0.1 and 10.0.0.2 for Router1 and Router2 respectively.</p>
<p>Router1 configuration:</p>
<blockquote><p>
Router1(config)#interface Tunnel 0<br />
Router1(config-if)#tunnel source 172.16.1.1<br />
Router1(config-if)#tunnel destination 192.168.0.1<br />
Router1(config-if)#tunnel mode gre ip<br />
Router1(config-if)#ip address 10.0.0.1 255.255.255.252<br />
Router1(config-if)#no shutdown<br />
Router1(config-if)#exit<br />
Router1(config)#ip route 10.0.10.0 255.255.255.0 10.0.0.2
</p></blockquote>
<blockquote><p>
Router1(config)#interface Tunnel 0<br />
Router1(config-if)#tunnel source 192.168.0.1<br />
Router1(config-if)#tunnel destination 172.16.1.1<br />
Router1(config-if)#tunnel mode gre ip<br />
Router1(config-if)#ip address 10.0.0.2 255.255.255.252<br />
Router1(config-if)#no shutdown<br />
Router1(config-if)#exit<br />
Router1(config)#ip route 10.0.10.0 255.255.255.0 Null 0
</p></blockquote>
<p>You can now setup addresses within 10.0.10.0/24 on any interface you want and use them like as they were routed to your router directly.<br />
The traceroute from Router2 to Router1 should look something like this:</p>
<blockquote><p>
Router2#traceroute 10.0.0.1</p>
<p>Type escape sequence to abort.<br />
Tracing the route to 10.0.0.1</p>
<p>  1 10.0.0.1 8 msec 8 msec 8 msec
</p></blockquote>
<p>Voila, we got routing over GRE!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2009/01/how-to-setup-a-gre-tunnel-on-a-cisco-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Word About BGP Bogons Filtering</title>
		<link>http://www.gho.no/2008/12/a-word-about-bgp-bogons-filtering/</link>
		<comments>http://www.gho.no/2008/12/a-word-about-bgp-bogons-filtering/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 18:13:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[bogons]]></category>
		<category><![CDATA[cisco ios]]></category>
		<category><![CDATA[filtering]]></category>
		<category><![CDATA[route filtering]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=149</guid>
		<description><![CDATA[		
		
		
		BGP4 filtering is important, but how can you keep track of the prefixes and do active filtering on them?
It has been a while since my last blog post now, it&#8217;s partly because I have been (honestly) pretty lazy lately, yes, I have been trying to cool down on all my working because I started to [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2008/12/a-word-about-bgp-bogons-filtering/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "A+Word+About+BGP+Bogons+Filtering";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>BGP4 filtering is important, but how can you keep track of the prefixes and do active filtering on them?</em></p>
<p>It has been a while since my last blog post now, it&#8217;s partly because I have been (honestly) pretty lazy lately, yes, I have been trying to cool down on all my working because I started to get some problems with keeping track of my own feelings.<br />
..and also because I have been trying to spend a little more time with the girl that actually can stand living with such a busy internet lunatic, we went to see the Norwegian setup of the <a href="http://en.wikipedia.org/wiki/Grease_(musical)">musical Grease</a> and also a Norwegian talk show named Senkveld, and along with all the xmas preparations and that it has been kind of hectic, but very very nice.<br />
While I am still talking freely here, why is it that while I can see people reading around, I never see any comments from you guys?</p>
<p>Anyways, enough with the excuses and all that &#8211; on with the show, right?<br />
[*APPLAUSE*]</p>
<p>The point about this post is to inform about the problems with bogon IPv4 (and probably IPv6 too, I haven&#8217;t looked at that yet) prefixes being announced into the Internet, and the problem about Internet Service Providers accepting these prefixes and adds them to their routing table.   The worst case scenario would be like spam from 127.0.0.1</p>
<p><b>But, what are bogons.. or bogon prefixes?</b><br />
I am glad to be asked that question sometimes, it is good &#8211; it shows that someone paid attention.<br />
Bogon prefixes are for example unassigned prefixes, or RFC1918 networks and there are also other reserved ranges.</p>
<p>The assignment process for IPv4 is somewhat like this:</p>
<ol>
<li><a href="http://www.iana.org/">IANA</a> allocates a block of IPv4 addresses to a Regional Internet Registry (usually /8 to i.e. <a href="http://www.ripe.net/">RIPE</a>)</li>
<li>The RIR then makes suballocations of this block to a LIR, a LIR is a Local Internet Registry (i.e. your ISP)</li>
</ol>
<p>The ISP can then announce this IPv4 prefix in the BGP table on the Internet.<br />
All these IANA to RIR assignments are public information, you can find it at <a href="http://www.cymru.com/Documents/bogon-list.html">cymru.com</a>, they have regular updates.</p>
<p><b>The problem with bogons</b><br />
The problem exists when networks listed as RESERVED or UNALLOCATED in <a href="http://iana.org/assignments/ipv4-address-space/">this list</a> are being announced and produces internet traffic.<br />
For example, if you want to send out totally anonymous spam, what could you possibly do to ISPs without proper filtering?<br />
Yeah, you could see someone announcing 192.168.0.0/22 and start spamming from 192.168.1.0.</p>
<p>Do you keep track of every announcement ever done to you?  (In that case, how do you do it?)<br />
I run a quagga router which also sees all announcements to our network and logs these to a logfile, and I am insterested to hear about other solutions &#8211; I know there are some java based applications.</p>
<p>To be consistent; you do not want bogons announced to you, you do not want to accept bogon networks and start routing traffic to them.</p>
<p><b>How to fix?</b><br />
There&#8217;s a bogons prefix-list that Team Cymru creates that is very useful for Cisco enthusiasts like me.<br />
They have constructed a <a href="http://www.cymru.com/Documents/secure-bgp-template.html">secure BGP template</a>.</p>
<p>So let us hope maybe there&#8217;s at least one extra bogon filter in place tomorrow, and let me know about it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2008/12/a-word-about-bgp-bogons-filtering/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cisco IOS Dialin VPN Configuration With Radius Users in MySQL</title>
		<link>http://www.gho.no/2008/11/cisco-ios-dialin-vpn-configuration-with-radius-users-in-mysql/</link>
		<comments>http://www.gho.no/2008/11/cisco-ios-dialin-vpn-configuration-with-radius-users-in-mysql/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 20:37:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[dialin]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[tunneling]]></category>
		<category><![CDATA[vpdn]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=144</guid>
		<description><![CDATA[		
		
		
		Sometimes it can be preferable to have client initiated dialin tunneling, here&#8217;s a flexible solution!
First off, the tunnel endpoint configuration (for example a 7200 router)

Router#conf t
Router(config)#aaa group server radius dialin
Router(config-sg-radius)#server-private 10.0.0.5 auth-port 1812 acct-port 1813 key MYSECRET
Router(config-sg-radius)#server 10.0.0.5 auth-port 1812 acct-port 1813
Router(config-sg-radius)#exit
Router(config)#aaa authentication ppp default group dialin
Router(config)#aaa authorization network default group dialin
Router(config)#aaa accounting network default [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2008/11/cisco-ios-dialin-vpn-configuration-with-radius-users-in-mysql/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Cisco+IOS+Dialin+VPN+Configuration+With+Radius+Users+in+MySQL";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>Sometimes it can be preferable to have client initiated dialin tunneling, here&#8217;s a flexible solution!</em></p>
<p>First off, the tunnel endpoint configuration (for example a 7200 router)</p>
<blockquote><p>
Router#conf t<br />
Router(config)#aaa group server radius <strong>dialin</strong><br />
Router(config-sg-radius)#server-private 10.0.0.5 auth-port 1812 acct-port 1813 key MYSECRET<br />
Router(config-sg-radius)#server 10.0.0.5 auth-port 1812 acct-port 1813<br />
Router(config-sg-radius)#exit<br />
Router(config)#aaa authentication ppp default group <strong>dialin</strong><br />
Router(config)#aaa authorization network default group <strong>dialin</strong><br />
Router(config)#aaa accounting network default start-stop group <strong>dialin</strong><br />
Router(config)#vpdn enable<br />
Router(config)#vpdn authorize directed-request<br />
Router(config)#vpdn-group <strong>dialingroup</strong><br />
Router(config-vpdn)#accept-dialin<br />
Router(config-vpdn-acc-in)#protocol l2tp<br />
Router(config-vpdn-acc-in)#virtual-template 1<br />
Router(config-vpdn-acc-in)#exit<br />
Router(config-vpdn)#source-ip 10.0.0.1<br />
Router(config-vpdn)#local name vpnrouter<br />
Router(config-vpdn)#lcp renegotiation always<br />
Router(config-vpdn)#no l2tp tunnel authentication<br />
Router(config-vpdn)#ip mtu adjust<br />
Router(config-vpdn)#interface <strong>loopback 5</strong><br />
Router(config-if)#description Loopback for VPDN clients<br />
Router(config-if)#ip address 10.0.1.1 255.255.255.0<br />
Router(config-if)#interface virtual-template 1<br />
Router(config-if)#ip unnumbered <strong>Loopback5</strong><br />
Router(config-if)#ip tcp adjust-mss 1420<br />
Router(config-if)#ip policy route-map clear-df<br />
Router(config-if)#peer default ip address pool <strong>dialinpool</strong><br />
Router(config-if)#no keepalive<br />
Router(config-if)#ppp mru match<br />
Router(config-if)#ppp authentication pap chap<br />
Router(config-if)#exit<br />
Router(config)#ip local pool dialinpool 10.0.1.2 10.0.1.254
</p></blockquote>
<p>Now, we need the radius server on 10.0.0.5 to work<br />
I installed this on a debian system, the freeradius version used there was 1.1.7-1build4</p>
<p>Just run this command as root to install Freeradius and MySQL</p>
<blockquote><p>
<strong>apt-get install freeradius-mysql freeradius mysql-server-5.0</strong>
</p></blockquote>
<p>You may need to edit /etc/freeradius/radiusd.conf to have the modules pap and chap loaded if the part is commented out. (the # in the beginning of the lines (not comments) should be removed)</p>
<p>You may also need to remove the comment for</p>
<blockquote><p>$INCLUDE ${confdir}/sql.conf</p></blockquote>
<p>Example /etc/freeradius/sql.conf</p>
<blockquote><p>
sql {<br />
        driver = &#8220;rlm_sql_mysql&#8221;<br />
        server = &#8220;localhost&#8221;<br />
        login = &#8220;freeradius&#8221;<br />
        password = &#8220;mysqlpassword&#8221;<br />
        radius_db = &#8220;radius&#8221;<br />
        acct_table1 = &#8220;radacct&#8221;<br />
        acct_table2 = &#8220;radacct&#8221;<br />
        postauth_table = &#8220;radpostauth&#8221;<br />
        authcheck_table = &#8220;radcheck&#8221;<br />
        authreply_table = &#8220;radreply&#8221;<br />
        groupcheck_table = &#8220;radgroupcheck&#8221;<br />
        groupreply_table = &#8220;radgroupreply&#8221;<br />
        usergroup_table = &#8220;usergroup&#8221;<br />
        nas_table = &#8220;nas&#8221;<br />
        deletestalesessions = yes<br />
        sqltrace = yes<br />
        sqltracefile = ${logdir}/sqltrace.sql<br />
        num_sql_socks = 5<br />
        connect_failure_retry_delay = 60<br />
        sql_user_name = &#8220;%{Stripped-User-Name}&#8221;<br />
        # I know my blog design bugs here<br />
        authorize_group_check_query = &#8220;SELECT ${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Attribute,${groupcheck_table}.Value,${groupcheck_table}.op  FROM ${groupcheck_table},${usergroup_table} WHERE ${usergroup_table}.UserName = &#8216;%{SQL-User-Name}&#8217; AND ${usergroup_table}.GroupName = ${groupcheck_table}.GroupName ORDER BY ${groupcheck_table}.id&#8221;<br />
        authorize_group_reply_query = &#8220;SELECT ${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Attribute,${groupreply_table}.Value,${groupreply_table}.op  FROM ${groupreply_table},${usergroup_table} WHERE ${usergroup_table}.UserName = &#8216;%{SQL-User-Name}&#8217; AND ${usergroup_table}.GroupName = ${groupreply_table}.GroupName ORDER BY ${groupreply_table}.id&#8221;<br />
        accounting_onoff_query = &#8220;UPDATE ${acct_table1} SET AcctStopTime=&#8217;%S&#8217;, AcctSessionTime=unix_timestamp(&#8216;%S&#8217;) &#8211; unix_timestamp(AcctStartTime), AcctTerminateCause=&#8217;%{Acct-Terminate-Cause}&#8217;, AcctStopDelay = &#8216;%{Acct-Delay-Time}&#8217; WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= &#8216;%{NAS-IP-Address}&#8217; AND AcctStartTime <= '%S'"<br />
        accounting_update_query = "UPDATE ${acct_table1} \<br />
          SET FramedIPAddress = '%{Framed-IP-Address}', \<br />
          AcctSessionTime = '%{Acct-Session-Time}', \<br />
          AcctInputOctets = '%{Acct-Input-Octets}', \<br />
          AcctOutputOctets = '%{Acct-Output-Octets}' \<br />
          WHERE AcctSessionId = '%{Acct-Session-Id}' \<br />
          AND UserName = '%{SQL-User-Name}' \<br />
          AND NASIPAddress= '%{NAS-IP-Address}'"</p>
<p>        accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')"</p>
<p>        accounting_start_query = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')"</p>
<p>        accounting_start_query_alt  = "UPDATE ${acct_table1} SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'"</p>
<p>        accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'"</p>
<p>        accounting_stop_query_alt = "INSERT into ${acct_table2} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')"<br />
        simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM ${acct_table1} WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0"<br />
        postauth_query = "INSERT into ${postauth_table} (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())"<br />
}
</p></blockquote>
<p>Also this is done in /etc/freeradius/proxy.conf</p>
<blockquote><p>
realm mydsl.com {<br />
        type    = radius<br />
        authhost        = LOCAL<br />
        accthost        = LOCAL<br />
}
</p></blockquote>
<p>Now get the SQL database up and running, login to the MySQL CLI as root and do:</p>
<blockquote><p>
mysql> CREATE DATABASE `radius`;<br />
Query OK, 1 row affected (0.03 sec)<br />
mysql> GRANT ALL PRIVILEGES ON `radius`.* to &#8216;radius&#8217;@'localhost&#8217; IDENTIFIED BY &#8216;mysqlpassword&#8217;;<br />
Query OK, 0 rows affected (0.03 sec)<br />
mysql> USE radius;<br />
Database changed
</p></blockquote>
<p>Then these tables needs to be created</p>
<blockquote><p>
CREATE TABLE `nas` (<br />
  `id` int(10) NOT NULL auto_increment,<br />
  `nasname` varchar(128) NOT NULL,<br />
  `shortname` varchar(32) default NULL,<br />
  `type` varchar(30) default &#8216;other&#8217;,<br />
  `ports` int(5) default NULL,<br />
  `secret` varchar(60) NOT NULL default &#8217;secret&#8217;,<br />
  `community` varchar(50) default NULL,<br />
  `description` varchar(200) default &#8216;RADIUS Client&#8217;,<br />
  PRIMARY KEY  (`id`),<br />
  KEY `nasname` (`nasname`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radacct` (<br />
  `RadAcctId` bigint(21) NOT NULL auto_increment,<br />
  `AcctSessionId` varchar(32) NOT NULL default &#8221;,<br />
  `AcctUniqueId` varchar(32) NOT NULL default &#8221;,<br />
  `UserName` varchar(64) NOT NULL default &#8221;,<br />
  `Realm` varchar(64) default &#8221;,<br />
  `NASIPAddress` varchar(15) NOT NULL default &#8221;,<br />
  `NASPortId` varchar(15) default NULL,<br />
  `NASPortType` varchar(32) default NULL,<br />
  `AcctStartTime` datetime NOT NULL default &#8216;0000-00-00 00:00:00&#8242;,<br />
  `AcctStopTime` datetime NOT NULL default &#8216;0000-00-00 00:00:00&#8242;,<br />
  `AcctSessionTime` int(12) default NULL,<br />
  `AcctAuthentic` varchar(32) default NULL,<br />
  `ConnectInfo_start` varchar(50) default NULL,<br />
  `ConnectInfo_stop` varchar(50) default NULL,<br />
  `AcctInputOctets` bigint(20) default NULL,<br />
  `AcctOutputOctets` bigint(20) default NULL,<br />
  `CalledStationId` varchar(50) NOT NULL default &#8221;,<br />
  `CallingStationId` varchar(50) NOT NULL default &#8221;,<br />
  `AcctTerminateCause` varchar(32) NOT NULL default &#8221;,<br />
  `ServiceType` varchar(32) default NULL,<br />
  `FramedProtocol` varchar(32) default NULL,<br />
  `FramedIPAddress` varchar(15) NOT NULL default &#8221;,<br />
  `AcctStartDelay` int(12) default NULL,<br />
  `AcctStopDelay` int(12) default NULL,<br />
  `XAscendSessionSvrKey` varchar(10) default NULL,<br />
  PRIMARY KEY  (`RadAcctId`),<br />
  KEY `UserName` (`UserName`),<br />
  KEY `FramedIPAddress` (`FramedIPAddress`),<br />
  KEY `AcctSessionId` (`AcctSessionId`),<br />
  KEY `AcctUniqueId` (`AcctUniqueId`),<br />
  KEY `AcctStartTime` (`AcctStartTime`),<br />
  KEY `AcctStopTime` (`AcctStopTime`),<br />
  KEY `NASIPAddress` (`NASIPAddress`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radcheck` (<br />
  `id` int(11) unsigned NOT NULL auto_increment,<br />
  `UserName` varchar(64) NOT NULL default &#8221;,<br />
  `Attribute` varchar(32) NOT NULL default &#8221;,<br />
  `op` char(2) NOT NULL default &#8216;==&#8217;,<br />
  `Value` varchar(253) NOT NULL default &#8221;,<br />
  PRIMARY KEY  (`id`),<br />
  KEY `UserName` (`UserName`(32))<br />
) ENGINE=MyISAM AUTO_INCREMENT=374 DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radgroupcheck` (<br />
  `id` int(11) unsigned NOT NULL auto_increment,<br />
  `GroupName` varchar(64) NOT NULL default &#8221;,<br />
  `Attribute` varchar(32) NOT NULL default &#8221;,<br />
  `op` char(2) NOT NULL default &#8216;==&#8217;,<br />
  `Value` varchar(253) NOT NULL default &#8221;,<br />
  PRIMARY KEY  (`id`),<br />
  KEY `GroupName` (`GroupName`(32))<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radgroupreply` (<br />
  `id` int(11) unsigned NOT NULL auto_increment,<br />
  `GroupName` varchar(64) NOT NULL default &#8221;,<br />
  `Attribute` varchar(32) NOT NULL default &#8221;,<br />
  `op` char(2) NOT NULL default &#8216;=&#8217;,<br />
  `Value` varchar(253) NOT NULL default &#8221;,<br />
  PRIMARY KEY  (`id`),<br />
  KEY `GroupName` (`GroupName`(32))<br />
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radippool` (<br />
  `id` int(11) unsigned NOT NULL auto_increment,<br />
  `pool_name` varchar(30) NOT NULL,<br />
  `FramedIPAddress` varchar(15) NOT NULL default &#8221;,<br />
  `NASIPAddress` varchar(15) NOT NULL default &#8221;,<br />
  `CalledStationId` varchar(30) NOT NULL,<br />
  `CallingStationID` varchar(30) NOT NULL,<br />
  `expiry_time` datetime NOT NULL default &#8216;0000-00-00 00:00:00&#8242;,<br />
  `username` varchar(64) NOT NULL default &#8221;,<br />
  `pool_key` varchar(30) NOT NULL,<br />
  PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radpostauth` (<br />
  `id` int(11) NOT NULL auto_increment,<br />
  `user` varchar(64) NOT NULL default &#8221;,<br />
  `pass` varchar(64) NOT NULL default &#8221;,<br />
  `reply` varchar(32) NOT NULL default &#8221;,<br />
  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,<br />
  PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `radreply` (<br />
  `id` int(11) unsigned NOT NULL auto_increment,<br />
  `UserName` varchar(64) NOT NULL default &#8221;,<br />
  `Attribute` varchar(32) NOT NULL default &#8221;,<br />
  `op` char(2) NOT NULL default &#8216;=&#8217;,<br />
  `Value` varchar(253) NOT NULL default &#8221;,<br />
  PRIMARY KEY  (`id`),<br />
  KEY `UserName` (`UserName`(32))<br />
) ENGINE=MyISAM AUTO_INCREMENT=1974 DEFAULT CHARSET=latin1;</p>
<p>CREATE TABLE `usergroup` (<br />
  `UserName` varchar(64) NOT NULL default &#8221;,<br />
  `GroupName` varchar(64) NOT NULL default &#8221;,<br />
  `priority` int(11) NOT NULL default &#8216;1&#8242;,<br />
  KEY `UserName` (`UserName`(32))<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p># This is the replies that every user that belongs to the group &#8216;<strong>clients</strong>&#8216; will receive<br />
INSERT INTO `radgroupreply` VALUES (1,&#8217;clients&#8217;,'Service-Type&#8217;,':=&#8217;,'Framed-User&#8217;)<br />
INSERT INTO `radgroupreply` VALUES (2,&#8217;clients&#8217;,'Framed-Protocol&#8217;,':=&#8217;,'PPP&#8217;)<br />
INSERT INTO `radgroupreply` VALUES (3,&#8217;clients&#8217;,'Framed-Routing&#8217;,':=&#8217;,'Broadcast-Listen&#8217;),<br />
INSERT INTO `radgroupreply` VALUES (4,&#8217;clients,&#8217;Framed-MTU&#8217;,':=&#8217;,'1420&#8242;)<br />
INSERT INTO `radgroupreply` VALUES (5,&#8217;clients&#8217;,'Framed-Compression&#8217;,':=&#8217;,'Van-Jacobsen-TCP-IP&#8217;);</p>
<p># This creates a user with username &#8216;testuser&#8217; and password &#8216;testpassword&#8217;<br />
INSERT INTO `radcheck` VALUES (1,&#8217;testuser&#8217;,'User-Password&#8217;,':=&#8217;,'testpassword&#8217;);</p>
<p># This assigns 10.0.1.2 to the user &#8216;testuser&#8217;<br />
INSERT INTO `radreply` VALUES (1,&#8217;testuser&#8217;,'Framed-IP-Address&#8217;,':=&#8217;,'10.0.1.2&#8242;)</p>
<p># This adds the user &#8216;testuser&#8217; to the group &#8216;clients&#8217;, then it will receive all correct attributes from radgroupreply.<br />
INSERT INTO `usergroup` VALUES (&#8216;testuser&#8217;,'clients&#8217;,1);
</p></blockquote>
<p>Now just restart MySQL and Freeradius and the only thing left to do is to configure the VPDN client.</p>
<p>This is configured on a Cisco 850 series router with the WAN link on FastEthernet 4</p>
<blockquote><p>
Client#conf t<br />
Client(config)#ip domain name mydsl.com<br />
Client(config)#l2tp-class l2tpclass1<br />
Client(config)#pseudowire-class pwclass1<br />
Client(config-pw-class)#encapsulation l2tpv2<br />
Client(config-pw-class)#protocol l2tpv2 l2tpclass1<br />
Client(config-pw-class)#ip local interface FastEthernet4<br />
Client(config-pw-class)#interface virtual-ppp 1<br />
Client(config-if)#ip address negotiated<br />
Client(config-if)#ip tcp adjust-mss 1420<br />
Client(config-if)#ip policy route-map clear-df<br />
Client(config-if)#ppp authentication pap chap callin<br />
Client(config-if)#ppp chap hostname testuser@mydsl.com<br />
Client(config-if)#ppp chap password testpassword<br />
Client(config-if)#ppp pap sent-username testuser@mydsl.com password testpassword<br />
Client(config-if)#ppp ipcp route default<br />
Client(config-if)#pseudowire 10.0.0.1 10 pw-class pwclass1
</p></blockquote>
<p>That should be about it!  Don&#8217;t be afraid of the comment box!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2008/11/cisco-ios-dialin-vpn-configuration-with-radius-users-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring MySQL AAA Authentication and Accounting with Tacacs+ on Linux</title>
		<link>http://www.gho.no/2008/11/configuring-mysql-aaa-authentication-and-accounting-with-tacacs-on-linux/</link>
		<comments>http://www.gho.no/2008/11/configuring-mysql-aaa-authentication-and-accounting-with-tacacs-on-linux/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 21:44:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[accounting]]></category>
		<category><![CDATA[cisco ios]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tacacs+]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=142</guid>
		<description><![CDATA[		
		
		
		So, been experimenting more with tacacs+ and got everything working out nicely with MySQL &#8211; so here is my tutorial!
It seemed like I had to run out of my &#8220;Oh, I run ubuntu so I will just apt-get&#8221; luck sometime, as I actually had to take this one from source to make it work completely.
So [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2008/11/configuring-mysql-aaa-authentication-and-accounting-with-tacacs-on-linux/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Configuring+MySQL+AAA+Authentication+and+Accounting+with+Tacacs%2B+on+Linux";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>So, been experimenting more with tacacs+ and got everything working out nicely with MySQL &#8211; so here is my tutorial!</em></p>
<p>It seemed like I had to run out of my &#8220;Oh, I run ubuntu so I will just apt-get&#8221; luck sometime, as I actually had to take this one from source to make it work completely.<br />
So I will start with the Linux end of this, the compiling of tac_plus</p>
<p>If you followed my previous tutorial, you will have to remove the old tac_plus package.</p>
<blockquote><p>
root@server:~# apt-get remove tac-plus<br />
Reading package lists&#8230; Done<br />
Building dependency tree<br />
Reading state information&#8230; Done<br />
The following packages will be REMOVED:<br />
  tac-plus<br />
0 upgraded, 0 newly installed, 1 to remove and 104 not upgraded.<br />
Need to get 0B of archives.<br />
After unpacking 324kB disk space will be freed.<br />
Do you want to continue [Y/n]?  <Press enter><br />
(Reading database &#8230; 227395 files and directories currently installed.)<br />
Removing tac-plus &#8230;<br />
Stopping Tacacs+ server: tac_plus.<br />
root@server:~# dpkg &#8211;purge tac-plus
</p></blockquote>
<p>The <em>dpkg &#8211;purge</em> command will remove all configuration files, so if you want to keep them just run</p>
<blockquote><p>root@server:~# cp -r /etc/tac-plus /root/tac-plus-configuration</p></blockquote>
<p>This will store the old configuration files in a folder named /root/tac-plus-configuration</p>
<p>Now compile the tac_plus daemon, remember to have the <strong>libmysql++-dev installed</strong> before you do this.  It should also bring along <strong>libmysql++2c2a libmysqlclient15-dev</strong> by itself.</p>
<blockquote><p>
root@server:~# cd /usr/local/src<br />
root@server:/usr/local/src# wget -q http://www.gho.no/download/tac_plus-4.4.tgz<br />
root@server:/usr/local/src# tar -zxf tac_plus-4.4.tgz<br />
root@server:/usr/local/src# cd tac_plus-4.4<br />
root@server:/usr/local/src/tac_plus-4.4# wget -q http://www.gho.no/download/securid.tgz<br />
root@server:/usr/local/src/tac_plus-4.4# tar -zxf securid.tgz<br />
root@server:/usr/local/src/tac_plus-4.4# ./configure &#8211;with-mysql &#8211;with-db
</p></blockquote>
<p>It should now print a lot of &#8216;checking for&#8217; or &#8216;checking wheter&#8217; lines, just let it run.<br />
The last couple of lines you should see should be:</p>
<blockquote><p>
creating Makefile<br />
creating tac_plus.spec<br />
creating config.h<br />
config.h is unchanged
</p></blockquote>
<p>Then it&#8217;s time to run make to compile the source code into a binary file.</p>
<blockquote><p>
root@server:/usr/local/src/tac_plus-4.4# make<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c acct.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c authen.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c author.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c config.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c choose_authen.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c default_fn.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c default_v0_fn.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c do_acct.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c do_author.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c dump.c<br />
dump.c: In function ‘dump_nas_pak’:<br />
dump.c:159: warning: incompatible implicit declaration of built-in function ‘exit’<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c enable.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c encrypt.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c expire.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c hash.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c tac_plus.c<br />
tac_plus.c: In function ‘main’:<br />
tac_plus.c:364: warning: incompatible implicit declaration of built-in function ‘exit’<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c md5.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c packet.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c parse.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c programs.c<br />
programs.c: In function ‘my_popen’:<br />
programs.c:282: warning: incompatible implicit declaration of built-in function ‘exit’<br />
programs.c:287: warning: incompatible implicit declaration of built-in function ‘exit’<br />
programs.c:292: warning: incompatible implicit declaration of built-in function ‘exit’<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c pw.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c pwlib.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c report.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c sendauth.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c sendpass.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c time_limit.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c utils.c<br />
utils.c: In function ‘tac_exit’:<br />
utils.c:79: warning: incompatible implicit declaration of built-in function ‘exit’<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c accesslog.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c ext_authen.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c db.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c db_ext.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c db_null.c<br />
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/include/mysql   -g -O2 -c db_mysql.c<br />
gcc  -g -O2 -L/usr/lib/mysql -o tac_plus -L/usr/lib/mysql  acct.o authen.o author.o config.o choose_authen.o default_fn.o default_v0_fn.o do_acct.o do_author.o dump.o enable.o encrypt.o expire.o hash.o tac_plus.o md5.o packet.o parse.o programs.o pw.o pwlib.o report.o sendauth.o sendpass.o time_limit.o utils.o accesslog.o ext_authen.o db.o db_ext.o db_null.o db_mysql.o -lmysqlclient -lz -lnsl     -lpthread -lc -lcrypt  -Llib/lnx -laceclnt<br />
root@server:/usr/local/src/tac_plus-4.4# cp tac_plus /usr/sbin/
</p></blockquote>
<p>Now, I just did a quick hack with copying the tac_plus binary to /usr/sbin, if you choose to install it with <strong>make install</strong>, be aware that it will spread files all around your system that you really don&#8217;t need.</p>
<p>I got a library error, this is my fix.</p>
<blockquote><p>
root@server:/usr/local/src/tac_plus-4.4# /usr/sbin/tac_plus -v<br />
/usr/sbin/tac_plus: error while loading shared libraries: libaceclnt.so: cannot open shared object file: No such file or directory<br />
root@server:/usr/local/src/tac_plus-4.4# cp lib/lnx/libaceclnt.so /usr/lib &#038;&#038; ldconfig<br />
root@server:/usr/local/src/tac_plus-4.4# /usr/sbin/tac_plus -v<br />
tac_plus version 4.4rc2-3 (Extended Tac_plus)
</p></blockquote>
<p>Perfect, shared libraries installed and the tacacs daemon seems to be working!<br />
Now to create the configuration file and everything.</p>
<blockquote><p>
root@server:/usr/local/src/tac_plus-4.4# cd /etc<br />
root@server:/etc# mkdir tac-plus &#038;&#038; chmod 700 tac-plus<br />
root@server:/etc# cd tac-plus<br />
root@server:/etc/tac-plus# touch tacacs.conf &#038;&#038; chmod 700 tacacs.conf
</p></blockquote>
<p>Edit the <strong>/etc/tacacs.conf</strong> file with your favourite editor, I as always love vim.<br />
For simplicity, let us keep it to a small amount of lines.</p>
<p><strong>The contents of /etc/tacacs.conf</strong></p>
<blockquote><p>
key mykey<br />
default db = mysql://tacacs:tacacspassword@localhost/tacacs
</p></blockquote>
<p>The logics of the MySQL URI is mysql://username:password@databasehost/database, so the username will now be tacacs, the password will be &#8216;password&#8217; and the database &#8216;tacacs&#8217; on the MySQL server on localhost.</p>
<p><strong>MySQL Setup</strong><br />
We now need to setup the backend databases for tac_plus to communicate with.</p>
<blockquote><p>
root@server:/etc/tac-plus# mysql -u root -p<br />
Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 11335<br />
Server version: 5.0.38-Ubuntu_0ubuntu1.4-log Ubuntu 7.04 distribution</p>
<p>Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the buffer.</p>
<p>mysql> \. /usr/local/src/tac_plus-4.4/tac_plus.sql<br />
Query OK, 1 row affected (0.36 sec)</p>
<p>Database changed<br />
Query OK, 0 rows affected (0.19 sec)</p>
<p>#&#8230; You should get a lot of these lines and return to the prompt, verify the structure:<br />
mysql> show tables;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| Tables_in_tacacs |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| access           |<br />
| accounting       |<br />
| acl              |<br />
| admin            |<br />
| attribute        |<br />
| contact_info     |<br />
| host             |<br />
| node             |<br />
| user             |<br />
| vendor           |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
10 rows in set (0.08 sec)</p>
<p># You now need to grant access to tacacs<br />
mysql> GRANT ALL PRIVILEGES ON tacacs.* to tacacs@localhost IDENTIFIED BY &#8216;tacacspassword&#8217;;<br />
Query OK, 0 rows affected (0.00 sec)
</p></blockquote>
<p>You could grant SELECT on the user and host tables, while letting it modify for example only the accounting and access tables which it uses for .. well, accounting records. It records logins/logouts and commands written if you want to. Tac-plus will automagically do this for you, and the Cisco Configuration is well documented in my article about <a href="http://www.gho.no/2008/11/log-commands-on-your-cisco-routers-and-switches-with-tacacs-on-linux/">Log Commands on Your Cisco Routers and Switches With Tacacs On Linux</a>.  Oh well, let us go on.</p>
<p>Let us insert just a user and a host.</p>
<blockquote><p>
INSERT INTO user (uid, gid, password, expires) values (&#8216;username&#8217;, &#8216;100&#8242;, ENCRYPT(&#8216;testtest&#8217;), &#8216;0000-00-00&#8242;);<br />
INSERT INTO host (ip, hostgroup, hkey, network, submask, loginacl, host) VALUES (&#8216;10.0.0.5&#8242;, &#8216;Routers&#8217;, &#8216;tercesym&#8217;, &#8216;0&#8242;, &#8216;0&#8242;, &#8216;666&#8242;, &#8216;1&#8242;);<br />
INSERT INTO acl (id, type, seq, permission, value, value1, submask) VALUES (&#8216;666&#8242;, &#8216;2&#8242;, &#8216;1&#8242;, &#8216;57&#8242;, &#8216;allusers&#8217;, &#8216;0&#8242;, &#8216;0&#8242;);
</p></blockquote>
<p>That should be it, we are done with this and we can now start the daemon.</p>
<blockquote><p>
root@server:~# /usr/sbin/tac_plus -C /etc/tac-plus/tacacs.conf -d254 -l tac.log
</p></blockquote>
<p>You can now monitor tac.log which resides in your current working directory (pwd), with <strong>tail -f tac.log</strong> and you can remove the -d254 when you are sure this is working.<br />
You should now be able to login with user <strong>username</strong> and password <strong>testtest</strong>.</p>
<p>To configure your Cisco IOS running Switch or Router</p>
<blockquote><p>
Router(config)#aaa authentication login default local group tacacs+<br />
Router(config)#tacacs-server host 10.0.0.5 key mykey
</p></blockquote>
<p>As long as you keep the &#8216;local&#8217; in the authentication line, you will still be able to fall back to local user authentication.</p>
<p>If you get any weird errors or warnings, post them as a comment and I will have a look at it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2008/11/configuring-mysql-aaa-authentication-and-accounting-with-tacacs-on-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Log Commands on your Cisco Routers and Switches with Tacacs+ on Linux</title>
		<link>http://www.gho.no/2008/11/log-commands-on-your-cisco-routers-and-switches-with-tacacs-on-linux/</link>
		<comments>http://www.gho.no/2008/11/log-commands-on-your-cisco-routers-and-switches-with-tacacs-on-linux/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 20:31:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[aaa]]></category>
		<category><![CDATA[accounting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tacacs+]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=137</guid>
		<description><![CDATA[		
		
		
		I setup command logging with Tacacs+ on Linux this week. Let me show you how easy it is!
I am (as always) doing this with Ubuntu linux and so I just have to apt-get the packages I need.

espen@server:~$ sudo apt-get install tac-plus
Password:
Reading package lists&#8230; Done
Building dependency tree
Reading state information&#8230; Done
The following NEW packages will be installed:
 [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2008/11/log-commands-on-your-cisco-routers-and-switches-with-tacacs-on-linux/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Log+Commands+on+your+Cisco+Routers+and+Switches+with+Tacacs%2B+on+Linux";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><em>I setup command logging with Tacacs+ on Linux this week. Let me show you how easy it is!</em></p>
<p>I am (as always) doing this with Ubuntu linux and so I just have to apt-get the packages I need.</p>
<blockquote><p>
espen@server:~$ sudo apt-get install tac-plus<br />
Password:<br />
Reading package lists&#8230; Done<br />
Building dependency tree<br />
Reading state information&#8230; Done<br />
The following NEW packages will be installed:<br />
  tac-plus<br />
0 upgraded, 1 newly installed, 0 to remove and 104 not upgraded.<br />
Need to get 105kB of archives.<br />
After unpacking 324kB of additional disk space will be used.<br />
Get:1 http://no.archive.ubuntu.com feisty/universe tac-plus 1:4.0.4.alpha-14 [105kB]<br />
Fetched 105kB in 0s (331kB/s)<br />
Selecting previously deselected package tac-plus.<br />
(Reading database &#8230; 227388 files and directories currently installed.)<br />
Unpacking tac-plus (from &#8230;/tac-plus_1%3a4.0.4.alpha-14_i386.deb) &#8230;<br />
Adding system user `tacacs&#8217; (UID 64005) &#8230;<br />
Adding new group `tacacs&#8217; (GID 64005) &#8230;<br />
Adding new user `tacacs&#8217; (UID 64005) with group `tacacs&#8217; &#8230;<br />
Not creating home directory `/home/tacacs&#8217;.<br />
Setting up tac-plus (4.0.4.alpha-14) &#8230;<br />
Starting Tacacs+ server: tac_plus.
</p></blockquote>
<p>Wow, that was quick&#8230; The tacacs+ server is already running!<br />
But wait, we have to configure it just a bit.</p>
<p><em>For this article I will just focus on the logging part (accounting), but I will continue to write about authentication and authorization to fully comply fully with AAA.</em></p>
<p>Now, open up <strong>/etc/tac-plus/tacacs.conf</strong> in your favourite editor, mine is vim.<br />
Be sure to uncomment and set the key, set the accounting file and you should be ready to roll.</p>
<blockquote><p>
key = tercesym<br />
accounting file = /var/log/tac-plus/account
</p></blockquote>
<p>Just restart the tacacs daemon:</p>
<blockquote><p>
espen@server:/etc/tac-plus# sudo /etc/init.d/tac-plus restart<br />
Restarting Tacacs+ server: tac_plus.<br />
espen@server:/etc/tac-plus#
</p></blockquote>
<p>Now to configure this on your cisco equipment, please follow the steps in <a href="http://www.gho.no/2008/09/how-to-get-user-authentication-with-aaa-running-on-cisco/">this</a> article first.<br />
Then to make sure the Cisco IOS Switch or Router will notify your tacacs deamon of accounting events, this is the configuration you need.</p>
<blockquote><p>
Router#conf t<br />
Enter configuration commands, one per line.  End with CNTL/Z.<br />
Router(config)#aaa accounting delay-start<br />
Router(config)#aaa accounting exec default start-stop group tacacs+<br />
Router(config)#aaa accounting commands 15 default start-stop group tacacs+<br />
Router(config)#tacacs-server host 10.0.0.50 key tercesym</p>
<p>! If you want the Router to source from a specific IP address<br />
Router(config)#ip tacacs source-interface Loopback 1</p>
<p>Router(config)#end<br />
Router#
</p></blockquote>
<p>Now you can verify accounting</p>
<blockquote><p>
Router#show accounting</p>
<p>Active Accounted actions on tty1, User admin Priv 1<br />
 Task ID 17, EXEC Accounting record, 00:16:58 Elapsed<br />
 task_id=17 start_time=1226261207 timezone=CET service=shell
</p></blockquote>
<p>There is one accounting session running, and you can also check the server to see if any accounting records are recorded.</p>
<blockquote><p>
espen@server:~# sudo tail /var/log/tac-plus/account<br />
Sun Nov  9 21:26:58 2008        10.0.0.98      admin    tty1    10.0.0.5    stop    task_id=26      start_time=1226262225   timezone=CET    service=shell   priv-lvl=15     cmd=show accounting <cr>
</p></blockquote>
<p>Perfect, now there will be no doubt about who dropped that &#8216;no router bgp&#8217; command on your Cisco Router!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2008/11/log-commands-on-your-cisco-routers-and-switches-with-tacacs-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
