<?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>Uber Geeky! &#187; Cisco VPN</title>
	<atom:link href="http://ubergeeky.com/blog/tag/cisco-vpn/feed" rel="self" type="application/rss+xml" />
	<link>http://ubergeeky.com/blog</link>
	<description>Let the hackfest begin...</description>
	<lastBuildDate>Mon, 30 Aug 2010 14:30:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>NetworkManager Can Ignore VPN DHCP</title>
		<link>http://ubergeeky.com/blog/259-networkmanager-can-ignore-vpn-dhcp</link>
		<comments>http://ubergeeky.com/blog/259-networkmanager-can-ignore-vpn-dhcp#comments</comments>
		<pubDate>Fri, 06 Aug 2010 09:03:23 +0000</pubDate>
		<dc:creator>Psylem</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Cisco VPN]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NetworkManager]]></category>

		<guid isPermaLink="false">http://ubergeeky.com/blog/?p=259</guid>
		<description><![CDATA[Connecting to a VPN that has DHCP settings configured can be rather frustrating if it breaks your regular network settings. The biggest problem I&#8217;ve had with this in Ubuntu is with resolv.conf losing my DNS settings in favour of the VPN DNS settings. For a long time I&#8217;ve tolerated the workaround of setting the immutable [...]]]></description>
			<content:encoded><![CDATA[<p>Connecting to a VPN that has DHCP settings configured can be rather frustrating if it breaks your regular network settings. The biggest problem I&#8217;ve had with this in Ubuntu is with resolv.conf losing my DNS settings in favour of the VPN DNS settings.</p>
<p>For a long time I&#8217;ve tolerated the workaround of setting the immutable attribute on resolv.conf (ie. chattr +i /etc/resolv.conf). This will prevent anything from updating the file and thus you will not lose your DNS settings when the VPN connection takes place. This is fine for a desktop machine on a local network where resolv.conf is likely to stay static, but no good for a laptop or other mobile device.</p>
<p>This week I searched around for a better solution. Something new I found was vpnc connect and post-connect scripts. This looked like a possible solution, something similar to what I did when using the vpnc client for KDE. The KDE client had a post-connect script option, and from that I would restore my old resolv.conf. I tried creating the vpnc scripts to back up resov.conf and restore it afterwards, but it seems that those scripts don&#8217;t even get run by NetworkManager because nothing happened for me.</p>
<p>Then by luck I noticed something in my search results about a setting called ignore-auto-dns. Seems that the interface doesn&#8217;t support the setting, but you can specify it for the connection using gconf-editor. The specs for the setting are here&#8230; <a href="http://projects.gnome.org/NetworkManager/developers/settings-spec-08.html" target="_blank" title="NetworkManager Setting Specs">http://projects.gnome.org/NetworkManager/developers/settings-spec-08.html</a></p>
<p>So to apply this setting, open gconf-editor and find your VPN connection under system/networking/connections (all connections are just numbered under there). There should be an ipv4 key in there. Now just create the boolean value ignore-auto-dns and set it to true. Shortly after discovering this solution, I found another technique which lists this same setting but in a network configuration file&#8230; <a href="https://help.ubuntu.com/community/NetworkManager0.7" target="_blank" title="NetworkManager Ubuntu Community Documentation">https://help.ubuntu.com/community/NetworkManager0.7</a>. I&#8217;ve not tried the method listed there because I&#8217;m not actually convinced that it&#8217;s a better option than modifying this gconf setting.</p>
]]></content:encoded>
			<wfw:commentRss>http://ubergeeky.com/blog/259-networkmanager-can-ignore-vpn-dhcp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPNC Android GUI Package</title>
		<link>http://ubergeeky.com/blog/167-vpnc-android-gui-package</link>
		<comments>http://ubergeeky.com/blog/167-vpnc-android-gui-package#comments</comments>
		<pubDate>Wed, 22 Jul 2009 13:46:03 +0000</pubDate>
		<dc:creator>Psylem</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Cisco VPN]]></category>

		<guid isPermaLink="false">http://ubergeeky.com/blog/?p=167</guid>
		<description><![CDATA[Forget my post about running VPNC from the G1 terminal. Wmealing has just released the Android package that does it all in GUI form. Grab the get-a-robot-vpnc package now. Not much to add, except &#8220;oh the awesome!&#8221;. Here&#8217;s a little screen shot of the add connection GUI&#8230; If you have trouble figuring out what to [...]]]></description>
			<content:encoded><![CDATA[<p>Forget my post about <a href="http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android">running VPNC from the G1 terminal</a>. <a href="http://code.google.com/u/wmealing/">Wmealing</a> has just released the Android package that does it all in GUI form. Grab the <a href="http://get-a-robot-vpnc.googlecode.com/files/VPN_Connections-r89.apk">get-a-robot-vpnc package</a> now.</p>
<p>Not much to add, except &#8220;oh the awesome!&#8221;. Here&#8217;s a little screen shot of the add connection GUI&#8230;</p>
<p><img class="aligncenter" title="get-a-robot-vpnc add connection" src="http://lh3.ggpht.com/_fPD0YWoytOI/SmcXF0Bo3WI/AAAAAAAAAno/9-K_v6sX2JQ/s800/vpnc_add.png" alt="" width="320" height="480" />If you have trouble figuring out what to enter into those fields, check out my old <a href="http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android">get-a-robot-vpnc post</a> for some hints.</p>
]]></content:encoded>
			<wfw:commentRss>http://ubergeeky.com/blog/167-vpnc-android-gui-package/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect to Cisco VPN from Android</title>
		<link>http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android</link>
		<comments>http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android#comments</comments>
		<pubDate>Mon, 01 Jun 2009 16:13:16 +0000</pubDate>
		<dc:creator>Psylem</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Cisco VPN]]></category>

		<guid isPermaLink="false">http://ubergeeky.com/blog/?p=110</guid>
		<description><![CDATA[Instructions to enable Android VPN connection on a rooted device.]]></description>
			<content:encoded><![CDATA[<p><strong>Tested on:</strong></p>
<ul>
<li>Rooted G1 (clean <a title="JFv1.51" href="http://jf.andblogs.net/2009/05/24/jfv151-images-are-out/">JesusFreke v1.51</a> US image)</li>
</ul>
<p><strong>Prerequisites:</strong></p>
<ul>
<li>VPN connection settings or a pcf file</li>
<li>If you need to decrypt enc_GroupPwd from pcf, Linux box with vpnc installed</li>
<li>Something to extract bz2 files</li>
<li>BusyBox (or alternative copy method that doesn&#8217;t use tar)</li>
<li><a href="http://code.google.com/p/get-a-robot-vpnc/downloads/list">Get-a-robot-vpnc</a> package</li>
<li>Root access!</li>
</ul>
<p>First of all, this is an alternative version of instructions from <a href="http://forum.xda-developers.com/showthread.php?t=511849&amp;page=3#post3814574">xda-developers post</a> by Phlogiston. I&#8217;ve included more complete details for those people who wouldn&#8217;t know the first thing about getting started with vpnc. Big win credit to <a href="http://code.google.com/u/wmealing/">wmealing</a> for bringing vpnc to Android!</p>
<p>Extract the bz2 file (not on the phone yet). Note the directory structure is <code>/data/data/org.codeandroid.vpnc/...</code>, this is designed to be extracted directly to the root of the phone.</p>
<p>Open <code>/data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf</code> and place your VPN connection settings in there. Very important that you remove or comment out the line &#8220;<code>IKE authmode hybrid</code>&#8221; or later you will have errors about missing openssl components. If you are not sure about the <code>vpnc.conf</code> settings and you have the .pcf file, map the following values&#8230;</p>
<table style="height: 129px;" border="0" width="367">
<tbody>
<tr>
<th>Typical .pcf</th>
<th>vpnc.conf</th>
</tr>
<tr>
<td>Host</td>
<td>IPSec gateway (lowercase)</td>
</tr>
<tr>
<td>GroupName</td>
<td>IPSec ID</td>
</tr>
<tr>
<td>GroupPwd*</td>
<td>IPSec secret</td>
</tr>
<tr>
<td>Username (usually omitted)</td>
<td>Xauth username</td>
</tr>
<tr>
<td>UserPassword (usually omitted)</td>
<td>Xauth password</td>
</tr>
</tbody>
</table>
<p>You should know your user name and password. Of course I&#8217;m not going to recommend that you store them in plain text in this file, but it sure does make life a whole lot simpler.</p>
<p>*If GroupPwd is blank and instead you have enc_GroupPwd you need to use the cisco-decrypt tool that usually comes with a standard vpnc installation (in my distro it&#8217;s found at <code>/usr/lib/vpnc/cisco-decrypt</code>). Simply run:</p>
<blockquote><p><code>/usr/lib/vpnc/cisco-decrypt &amp;lt;enc_GroupPwd hash&amp;gt;</code></p></blockquote>
<p>Open <code>/data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script</code> and change the first line to &#8220;<code>#!/system/bin/sh</code>&#8221; (replace bash with just sh).</p>
<p>Now you need to get it all on to your phone. Confirm you have the tar command on the phone by opening up the terminal app and typing &#8220;<code>tar</code>&#8220;. If you don&#8217;t have it, you might want to get BusyBox.</p>
<p><img class="aligncenter" title="BusyBox tar command" src="http://lh5.ggpht.com/_fPD0YWoytOI/SiP0Wt-TpTI/AAAAAAAAAm4/g_ODnF0kjIE/s800/0.png" alt="" width="480" height="320" /></p>
<p>From the directory where you extracted the bz2 file, run the following to make a tarball:</p>
<blockquote><p><code>$ tar -cvf vpnc.tar ./data/data</code></p></blockquote>
<p>Copy that to the phone&#8217;s sdcard. While you have the sdcard mounted on your PC, create a directory called <code>vpnc</code> and create two empty files in there named <code>go</code> and <code>prep</code> (you can name them anything really).</p>
<p>Open <code>go</code> and paste the following (this is one single long line of text):</p>
<blockquote><p><code>/data/data/org.codeandroid.vpnc/bin/vpnc /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf --script /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script --pid-file /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-pid --no-detach --debug 1</code></p></blockquote>
<p>Open <code>prep</code> and paste the following:</p>
<blockquote><p><code>modprobe tun<br />
lsmod<br />
mkdir /dev/net<br />
ln -s /dev/tun /dev/net/tun</code></p></blockquote>
<p>These scripts will help you type less on the handset. Now unmount the sdcard and wait for the phone to check it. Open up a terminal and run the following:</p>
<blockquote><p><code>$ su<br />
# cp /sdcard/vpnc.tar /data<br />
# cd /data<br />
# tar xvf vpnc.tar<br />
# rm vpnc.tar<br />
# cd /sdcard/vpnc<br />
# sh prep<br />
# sh go</code></p></blockquote>
<p>If all went well you should see the following happy little message!</p>
<p style="text-align: left;"><img class="aligncenter" src="http://lh3.ggpht.com/_fPD0YWoytOI/SiPdB7Vsa8I/AAAAAAAAAmc/pgD4weaSFCg/s800/VPNC%20on%20Android.png" alt="vpnc on Android" width="480" height="320" /></p>
<p style="text-align: left;">&#8230; and to later kill the VPN connection, just press Ball+C. Note: You only need to run the <code>prep</code> script the first time during the session (when the phone reboots you&#8217;ll need to run it again).</p>
<p style="text-align: left;">If you want to undo it all and start from scratch, just do a recursive delete of <code>/data/data/org.codeandroid.vpnc</code> directory and reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android/feed</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>
