<?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>Benjamin Sherman &#187; VPN</title>
	<atom:link href="http://holyarmy.org/tag/vpn/feed/" rel="self" type="application/rss+xml" />
	<link>http://holyarmy.org</link>
	<description>I have to have a tagline?</description>
	<lastBuildDate>Wed, 02 Jun 2010 06:06:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>VPN on Ubuntu Linux with Juniper Network Connect</title>
		<link>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/</link>
		<comments>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 23:13:25 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[juniper]]></category>
		<category><![CDATA[network connect]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=399</guid>
		<description><![CDATA[There&#8217;s one standard document on HOWTO get Network Connect working on Ubuntu Linux. It&#8217;s mad scientist&#8217;s doc: http://mad-scientist.us/juniper.html . However, there are a few things not covered. I&#8217;ll assume that you&#8217;ve followed mad scientist&#8217;s excellent guide before going any further. Issue #1: 64-bit Ubuntu By default, when you install java on your 64-bit system, you get [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s one standard document on HOWTO get Network Connect working on Ubuntu Linux. It&#8217;s mad scientist&#8217;s doc: <a href="http://mad-scientist.us/juniper.html">http://mad-scientist.us/juniper.html</a> . However, there are a few things not covered. I&#8217;ll assume that you&#8217;ve followed mad scientist&#8217;s excellent guide before going any further.</p>
<h3>Issue #1: 64-bit Ubuntu</h3>
<p>By default, when you install java on your 64-bit system, you get a 64-bit java. No surprise there, right? Well, Juniper&#8217;s tools don&#8217;t play nice with 64-bit java. If you attempt to start the <strong>junipernc</strong> script you&#8217;ll promptly see the &#8220;VPN has failed!&#8221; error message.</p>
<div id="attachment_400" class="wp-caption alignnone" style="width: 214px"><img class="size-full wp-image-400" src="http://holyarmy.org/files/2009/06/screenshot-network-connect-vpn.png" alt="VPN has failed!" width="204" height="168" /><p class="wp-caption-text">VPN has failed!</p></div>
<p>Also if you look closely in your Terminal you&#8217;ll see the text error:</p>
<blockquote>
<pre>Failed to load the ncui library.</pre>
</blockquote>
<p>This is the clue that we are dealing with the 64-bit issue.</p>
<p>The work around for this is to install a 32-bit java on your system. Type the following into your Terminal:</p>
<blockquote>
<pre>sudo apt-get install ia32-sun-java6-bin</pre>
</blockquote>
<p>After typing your password, a 32-bit copy of java will be installed at: <em>/usr/lib/jvm/ia32-java-6-sun </em>.</p>
<p>Now, you need to convince Juniper Network Connect to use the 32-bit java. If you don&#8217;t use java for much besides your new VPN, you may just want to make the 32-bit java your default. This can be done by typing the following into your Terminal:</p>
<blockquote>
<pre>update-alternatives --set java /usr/lib/jvm/ia32-java-6-sun/jre/bin/java</pre>
</blockquote>
<p>If you DO use java and just want to tell the VPN to use the 32-bit java, you should modify the <strong>junipernc</strong> by adding the following line right after the block of lines that start with &#8220;#&#8221;:</p>
<blockquote>
<pre>export JDK_HOME=/usr/lib/jvm/ia32-java-6-sun</pre>
</blockquote>
<p>Now, when you run <strong>junipernc</strong>, it will use 32-bit java and you should no longer have the failure due to ncui.</p>
<h3>Issue #2: Determining Your Realm</h3>
<p>The scripting for Network Connect asks a few questions that may not make sense to a typical user. Even a networking savvy programmer may not be certain what values to use for the &#8220;Realm&#8221; or &#8220;PIN + SecureID Code&#8221;.</p>
<p>Finding your realm is fairly straight forward if you don&#8217;t mind diving into some HTML. Point your web browser to your company&#8217;s VPN website: https://vpn.mycompany.com or https://connect.mycompany.com .   View the source of that page and look for a line like:</p>
<blockquote>
<pre>&lt;input type="hidden" name="realm" value="REALMNAME"&gt;</pre>
</blockquote>
<p>The value of REALMNAME is what you&#8217;ll need to enter when prompted.  Your IT department may or may not know what this is if you ask them.</p>
<p>If you don&#8217;t know your &#8220;PIN + SecureID Code&#8221;, it&#8217;s simply the password you type along with your username on the VPN website to gain access. As mad scientist says, some companies use &#8220;SecurID so [they] enter a personal PIN plus the value provided by the SecurID fob,&#8221; which explains why he coded that as the prompt for the password input.</p>
<p>If you need help, there&#8217;s a long running thread over at the ubuntu forums where this continues to be discussed a lot: http://ubuntuforums.org/showthread.php?t=232607 . I gathered my info from both mad scientist&#8217;s page above and the thread itself.</p>
<p>One further note, I&#8217;ve tested this on Ubuntu 9.04 64-bit as well as 8.10 32-bit. Hope this is helpful to all you who need Juniper VPN access on 64-bit Ubuntu Linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Fight Back! (When VPN Clients Mis-Behave)</title>
		<link>http://holyarmy.org/2008/07/fight-back-when-vpn-clients-mis-behave/</link>
		<comments>http://holyarmy.org/2008/07/fight-back-when-vpn-clients-mis-behave/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 18:20:19 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[mac hack]]></category>
		<category><![CDATA[scutil]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://sherman.bz/?p=310</guid>
		<description><![CDATA[I have to use VPNs at work. Specifically, to access my production webservers (etc), I have to use a Cisco VPN client. Sadly, the VPN concentrator overrides my choice of allowing local LAN access. So, when I am on the VPN, I have my DNS options changed so I can&#8217;t use any local servers. This [...]]]></description>
			<content:encoded><![CDATA[<p>I have to use VPNs at work. Specifically, to access my production webservers (etc), I have to use a Cisco VPN client. Sadly, the VPN concentrator overrides my choice of allowing local LAN access. So, when I am on the VPN, I have my DNS options changed so I can&#8217;t use any local servers. This is a serious, serious pain. So painful in fact, that many times instead of fight with it, I simply would run a Windows session in VMware (on my Mac) and connect the VPN there. This has drawbacks too, but it&#8217;s better than not having local network access.</p>
<p>So I set out to find a solution and I found a <a href="http://blog.dv8.ro/2008/06/configuring-cisco-vpn-for-local-dns.html">post by loudhush</a> which described using the <strong>scutil</strong> to modify DNS network settings after connecting to a Cisco VPN. This was great, but I needed something a bit handier.</p>
<p>So, I cranked out the following which goes in my /Users/username/.profile:<br />
<code><br />
# .profile or .bash_profile<br />
function myvpn {<br />
vpnclient connect VPNPROFILENAME user MYVPNUSERNAME<br />
myworkdns<br />
}<br />
function myworkdns {<br />
printf "get State:/Network/Service/com.cisco.VPN/DNS\nd.add ServerAddresses * 192.168.1.252, 192.168.1.198\nd.add SearchDomains * example.com, other.example.com\nset State:/Network/Service/com.cisco.VPN/DNS" | sudo scutil<br />
}<br />
</code></p>
<p>These are bash functions which i run from the command line. (I also find the Client GUI Cisco to be a pain, and prefer command line)</p>
<p>So, obviously, you&#8217;ll need to substitute in your Cisco VPN profile name ( found in /etc/opt/cisco-vpnclient/Profiles), your VPN username, your DNS server IP addresses, and your DNS search domains to your legitimate values.</p>
<p>To use, run <strong>Terminal</strong>, then type <strong>myvpn</strong>. The VPN client will prompt you for your username and password. You&#8217;ll then have to hit CTRL+Z to suspend the VPN client so the script can run the DNS updates; this part uses <strong>sudo</strong> to run the command as root, so you will probably need to type your Mac password immediately after hitting CTRL+Z. If you didn&#8217;t want to bother with the command line VPN client, you could just use your GUI Cisco VPN client, then run <strong>myworkdns</strong> from Terminal, which will still probably prompt you for your Mac password.</p>
<p>Hope others find this useful. If I find a cleaner way, I&#8217;ll post that too.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2008/07/fight-back-when-vpn-clients-mis-behave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beating the Cisco VPN Client Error 51 On Leopard</title>
		<link>http://holyarmy.org/2008/07/beating-the-cisco-vpn-client-error-51-on-leopard/</link>
		<comments>http://holyarmy.org/2008/07/beating-the-cisco-vpn-client-error-51-on-leopard/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 16:10:01 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://sherman.bz/?p=308</guid>
		<description><![CDATA[I had this error popup today on my Mac OS X Lepopard 10.5.4 machine. This is not cool as, well, I NEED MY VPN TO WORK! Thankfully google came to my rescue. The solution is to execute the following in Terminal: sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart Thanks for the answer, VirtuallyShocking.com.]]></description>
			<content:encoded><![CDATA[<p>I had this error popup today on my Mac OS X Lepopard 10.5.4 machine.</p>
<p><a href="http://holyarmy.org/files/2008/07/vpnerr51.png"><img class="alignnone size-medium wp-image-309" title="vpnerr51" src="http://holyarmy.org/files/2008/07/vpnerr51-300x69.png" alt="Cisco VPN Client Error 51" width="300" height="69" /></a></p>
<p>This is not cool as, well, I NEED MY VPN TO WORK!</p>
<p>Thankfully google came to my rescue. The solution is to execute the following in Terminal:</p>
<p><code>sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart</code></p>
<p>Thanks for the answer, <a href="http://virtuallyshocking.com/2008/06/26/cisco-vpn-client-error-51-after-leopard-1053-upgrade/">VirtuallyShocking.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2008/07/beating-the-cisco-vpn-client-error-51-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network Directory Services</title>
		<link>http://holyarmy.org/2007/10/network-directory-services/</link>
		<comments>http://holyarmy.org/2007/10/network-directory-services/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 21:00:41 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Networks]]></category>
		<category><![CDATA[BIND]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://sherman.bz/2007/10/06/network-directory-services/</guid>
		<description><![CDATA[Network directory services are core to Internet functionality. The Domain Name System (DNS) provides a global (and/or local) directory of hosts and services. Lightweight Directory Access Protocol (LDAP) servers can provide some of the same information as DNS (or be used to back DNS), but are more frequently used to create network user databases, store [...]]]></description>
			<content:encoded><![CDATA[<p>Network directory services are core to Internet functionality. The <a href="http://en.wikipedia.org/wiki/Domain_Name_System">Domain Name System (DNS)</a> provides a global (and/or local) directory of hosts and services. <a href="http://en.wikipedia.org/wiki/LDAP">Lightweight Directory Access Protocol (LDAP)</a> servers can provide some of the same information as DNS (or be used to back DNS), but are more frequently used to create network user databases, store user group information, providing  centralized account information and password storage.</p>
<p>I recently completed an upgrade of these two core services on a network I manage. We had been running outdated (but functional) <a href="http://en.wikipedia.org/wiki/BIND">BIND</a> v8 and <a href="http://en.wikipedia.org/wiki/Openldap">OpenLDAP</a> v2.0 instances for of DNS and LDAP servers. Also, throw a Windows Server 2003 into the mix, which, as an <a href="http://en.wikipedia.org/wiki/Active_directory">Active Directory</a> domain controller has to run its own DNS and LDAP (AD is tweaked LDAP) servers.</p>
<p><span id="more-284"></span></p>
<p>First, the DNS upgrade was substantial, not just because we upgrade to a more modern BIND v9.x installation, but because we implemented a split view configuration. Previously, our local users operated on a sub-domain of &#8220;local.example.com&#8221; such that each computer was named &#8220;host.local.example.com&#8221;. The main public services utilized the proper full-domain of &#8220;example.com&#8221;. This was fine in the beginning, as when we set this up, few users had laptops, so we didn&#8217;t use individual client VPN or have road warriors with laptops out trying to access &#8220;local&#8221; services from home or a customer locations. Also, some services we started deploying (eg, our XMPP chat server, <a href="http://www.jivesoftware.com/products/openfire/" target="_blank">Openfire</a>) preferred to be bound to one host name (like, im.example.com). Internally, that host name still resolved to our public IP address which then needed some interesting firewall rules in order to support the routing or traffic. But this issue was already present with mail services; if I wanted a laptop user to use &#8220;mail.example.com&#8221; for his server while out of the office, while on VPN that user would have to change to &#8220;mail&#8221; or &#8220;mail.local.example.com&#8221; because the VPN essentially made the user part of the local network.</p>
<p>The solution I came up with, as mentioned above, was to use BIND views, and get rid of a &#8220;local&#8221; DNS sub-domain. All our servers and host names would be part of the base &#8220;example.com&#8221; domain, thus, local, VPN, or public users would only have one host name for accessing services like mail (mail.example.com) or chat (im.example.com). BIND views essentially provide a different <em>view</em> to your DNS based on the host IP address you are using to access the server. So, if users are at the office, im.example.com resolves to a private <a href="http://en.wikipedia.org/wiki/RFC_1918">RFC 1918</a> address, same as it resolves if they are connected via VPN, but if they are on the public internet, im.example.com resolves to a publicly routable address assigned to our organization.</p>
<p>Are there any tricks or gotchas when making a change like this in your organization&#8217;s DNS? The biggest trick is <strong>BE METICULOUS!</strong> Seriously, if your organization was like ours, you had a mix of both <a href="http://en.wikipedia.org/wiki/FQDN">FQDNs</a> and non FQDNs in your intranet &amp; application URLs, user documentation, etc. Undertaking a naming change like this could be very daunting given a large enough organization. You may find that you can only migrate those services which really need to have split view DNS. In my case, most of the time spent prepping for this transition was spent searching out where the &#8220;local.&#8221; part of FQDNs was used and switching to non-qualified host names or making a note so I could change it to the new FQDN after the migration. All in all, this proved to be a fairly painless migration for this smaller organization.</p>
<p>The LDAP transition initially concerned me more than the change to DNS, but in the end, proved to be less painful. However, it did require more new knowledge to transition to a totally new server instead of simply upgrading and reconfiguring. OpenLDAP had served us well, but some other admins in the group had been playing with <a href="http://en.wikipedia.org/wiki/Fedora_Directory_Server">Fedora Directory Server (FDS)</a> and had it installed in other production environments. A few key things prompted us to migrate. First, multi-master replication is a SNAP with FDS. Having that is key part of having redundant and available directory services. Yes, it can be done with OpenLDAP now (as of v2.4 or so), but it wasn&#8217;t there when we put our first FDS server into play. Also FDS has nice built-in facilities for account password expiration and password policies and account lockouts. Also, we&#8217;d used a bit of hack to push password updates to OpenLDAP from Windows Server for users who had both Windows and Unix accounts, but FDS prvoides a very complete two-way password synchronizer for Windows. Again, I&#8217;ll emphasize that replication is a SNAP with FDS. This is largely due to its very useful and easy to use Java based GUI management interface. This is a stand-alone client which runs on your desktop and connects to FDS&#8217;s admin server. Fear not, command-line junkies, everything that can be done in the GUI is available on the command-line and via <em>ldapadd</em> LDIF commands, etc. The management interface not only lets you configure the server, options, ACLs (FDS calls them ACIs), etc, but this tool is also a data management tool for all your LDAP data. This was plus for us as we&#8217;d never been thrilled with our data management options in OpenLDAP. We used multiple tools to managed accounts in OpenLDAP, but in the end, the best all around tool we had used was <a href="http://phpldapadmin.sourceforge.net/">phpLDAPdmin</a>. I&#8217;m sue the tool has matured A LOT since we last upgraded, and it was pretty nice, we may even install it again with FDS, but the built in GUI from FDS is just a nice touch.</p>
<p>The actual work of transitioning from OpenLDAP to FDS was not as hard as I&#8217;d expected. First, I installed FDS on the new server. The installation process was pretty straight forward if you&#8217;ve used OpenLDAP before and done your resarch ahead of time. A <em>slapcat</em> of the old OpenLDAP database created an <a href="http://en.wikipedia.org/wiki/LDIF">LDIF</a> dump of my old data. From there, I experimented with importing the data into FDS using <em>ldapadd</em>. There were a few schema changes required, but not many. In my case, the LDIF lines that FDS didn&#8217;t like were not required (eg, &#8220;struturalObjectClass&#8221; was dumped by OpenLDAP but required by FDS) and I simply ran my LDIF dump through a series of &#8220;grep -v&#8221; filters to remove the unwanted lines. One other concern was the format of the userPassword fields. I&#8217;d been storing passwords as MD5 hashes; FDS supports this, but the storage format of the hashes was not compatible. FDS&#8217;s website has links to user contributed scripts to solve this, but they didn&#8217;t seem to work for me. Again, having a small organization was useful, as I was able to change the default storage type to something more compatible (eg, SHA, SHA1, CRYPT, etc) and have my users update their passwords. Voila! Updated password formats. Once all this was completed, I simply pointed LDAP clients to the FDS instead of the old OpenLDAP and everything just worked!</p>
<p>Overall, my migrations were pretty smooth. Your mileage may vary, but if you need the features, or just yearn to run on updated software, the migration is well worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2007/10/network-directory-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

