<?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>Geekdom &#187; Windows</title>
	<atom:link href="http://geekdom.wesmo.com/category/technical/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekdom.wesmo.com</link>
	<description>Geeks of the World Unite!</description>
	<lastBuildDate>Mon, 30 Jan 2012 08:28:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VIA Rhine II and Windows 7 64bit</title>
		<link>http://geekdom.wesmo.com/2011/08/26/via-rhine-ii-and-windows-7-64bit/</link>
		<comments>http://geekdom.wesmo.com/2011/08/26/via-rhine-ii-and-windows-7-64bit/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 02:03:50 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[network driver]]></category>
		<category><![CDATA[rhine]]></category>
		<category><![CDATA[via]]></category>
		<category><![CDATA[via rhine]]></category>
		<category><![CDATA[via rhine II]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 7]]></category>
		<category><![CDATA[windows 7 64bit]]></category>

		<guid isPermaLink="false">http://geekdom.wesmo.com/?p=207</guid>
		<description><![CDATA[&#1080;&#1082;&#1086;&#1085;&#1086;&#1075;&#1088;&#1072;&#1092;&#1080;&#1103;The driver that ships with Windows 7 appears to have a TCP overload problem.  Be sure to use the updated driver (attached here for archival purposes), version 1.12a. via_rhine_windows7_v1.12a]]></description>
			<content:encoded><![CDATA[<p><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://ikoni.eu/">&#1080;&#1082;&#1086;&#1085;&#1086;&#1075;&#1088;&#1072;&#1092;&#1080;&#1103;</a></font>The driver that ships with Windows 7 appears to have a TCP overload problem.  Be sure to use the updated driver (attached here for archival purposes), version 1.12a.</p>
<p><a href="http://geekdom.wesmo.com/wp-content/uploads/2011/08/via_rhine_windows7_v1.12a.zip">via_rhine_windows7_v1.12a</a></p>
]]></content:encoded>
			<wfw:commentRss>http://geekdom.wesmo.com/2011/08/26/via-rhine-ii-and-windows-7-64bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 and Squid via NTLM authentication via Samba</title>
		<link>http://geekdom.wesmo.com/2010/07/16/windows-7-and-squid-via-ntlm-authentication-via-samba/</link>
		<comments>http://geekdom.wesmo.com/2010/07/16/windows-7-and-squid-via-ntlm-authentication-via-samba/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 01:42:04 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[ntml]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[proxy server]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[wpad]]></category>
		<category><![CDATA[wpad.dat]]></category>

		<guid isPermaLink="false">http://geekdom.wesmo.com/?p=161</guid>
		<description><![CDATA[Getting Windows 7 to talk to a squid proxy server which uses ntml authentication via samba can be a little tricky. Control Panel -&#62; System and Security -&#62; Administrative Tools -&#62; Local Security Policy -&#62; Local Policy -&#62; Security Options Find &#8220;Network security: LAN Manager authentication level &#8221; and set it to: Send LM &#38; NTLM responses Find [...]]]></description>
			<content:encoded><![CDATA[<p>Getting Windows 7 to talk to a squid proxy server which uses ntml authentication via samba can be a little tricky.</p>
<p>Control Panel -&gt; System and Security -&gt; Administrative Tools -&gt; Local Security Policy -&gt; Local Policy -&gt; Security Options</p>
<p>Find &#8220;Network security: LAN Manager authentication level &#8221; and set it to: Send LM &amp; NTLM responses<br />
Find &#8220;Minimum session security for NTLM SSP&#8221; and set it to: Disable Require 128-bit encryption</p>
]]></content:encoded>
			<wfw:commentRss>http://geekdom.wesmo.com/2010/07/16/windows-7-and-squid-via-ntlm-authentication-via-samba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Windows Search 4.0 Without It Showing Up in the Add / Remove Programs Control Panel</title>
		<link>http://geekdom.wesmo.com/2008/12/29/removing-windows-search-40-without-it-showing-up-in-the-add-remove-programs-control-panel/</link>
		<comments>http://geekdom.wesmo.com/2008/12/29/removing-windows-search-40-without-it-showing-up-in-the-add-remove-programs-control-panel/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 16:40:59 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[add / remove programs]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[windows search]]></category>

		<guid isPermaLink="false">http://geekdom.wesmo.com/?p=114</guid>
		<description><![CDATA[With Microsoft&#8217;s recent release of Windows Search 4.0 for Windows XP, a number of users who had it installed complained about their system becoming rather slow and they wanted the old search functionality returned.  In most cases, a simple uninstall via Add/Remove Programs restored the search functionality to its previous incarnation, but in one particular [...]]]></description>
			<content:encoded><![CDATA[<p>With Microsoft&#8217;s recent release of Windows Search 4.0 for Windows XP, a number of users who had it installed complained about their system becoming rather slow and they wanted the old search functionality returned.  In most cases, a simple uninstall via Add/Remove Programs restored the search functionality to its previous incarnation, but in one particular stubborn case, &#8220;Windows Search 4.0&#8243; did not show up in Add/Remove programs while Windows Search 4.0 was clearly installed (toolbar and the taskbar icon were present, as were the individual processes).  Unfortunately, C:\Windows\<span style="font-family: Verdana,Arial,Helvetica; font-size: x-small;">$NtUninstallKB940157$ was not present, either, so a manual uninstall could not be performed.</span><br />
<span style="font-size: x-small;"><span style="font-family: Verdana,Arial,Helvetica;">The solution was to forcefully remove the following registry entries, via regedit:</span></span></p>
<ul>
<li><span style="font-family: Verdana,Arial,Helvetica; font-size: x-small;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP3\KB940157 </span></li>
<li><span style="font-family: Verdana,Arial,Helvetica; font-size: x-small;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KB940157 </span></li>
</ul>
<p><span style="font-family: Verdana,Arial,Helvetica; font-size: x-small;">Once those were removed, manually installing Windows Search 4.0 from <a href="http://www.microsoft.com/downloads/details.aspx?familyid=55c18cb3-c916-4298-aba3-5b98904f7cda&amp;displaylang=en">Microsoft</a> got the add-on to install properly, complete with an entry in Add/Remove Programs.  Finally, selecting &#8220;Remove&#8221; from the Add/Remove Programs control panel for &#8220;Windows Search 4.0&#8243; did the deed and removed it from the system.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://geekdom.wesmo.com/2008/12/29/removing-windows-search-40-without-it-showing-up-in-the-add-remove-programs-control-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora (with Gnome) and VMWare Workstation 6.5 = keyboard trouble</title>
		<link>http://geekdom.wesmo.com/2008/11/19/fedora-with-gnome-and-vmware-workstation-65-keyboard-trouble/</link>
		<comments>http://geekdom.wesmo.com/2008/11/19/fedora-with-gnome-and-vmware-workstation-65-keyboard-trouble/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 15:45:48 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[arrow keys]]></category>
		<category><![CDATA[fubar keyboard]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vmware workstation]]></category>

		<guid isPermaLink="false">http://geekdom.wesmo.com/?p=104</guid>
		<description><![CDATA[This didn&#8217;t happen for me with previous versions of Fedora or previous version of VMWare Workstation, but it seems to have happened to others at varying times.  This problem came about for me when I upgraded to Fedora 10 (I had already been using VMWare Workstation 6.5 with no issues). I have Windows XP running [...]]]></description>
			<content:encoded><![CDATA[<p>This didn&#8217;t happen for me with previous versions of Fedora or previous version of VMWare Workstation, but it seems to have <a title="VMWare and the fubar keyboard effect" href="http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html">happened to others at varying times</a>.  This problem came about for me when I upgraded to Fedora 10 (I had already been using VMWare Workstation 6.5 with no issues).</p>
<p>I have Windows XP running in a VM to deal with the &#8220;windows-only&#8221; aspects of my daily job, and after the Fedora 10 upgrade, a handful of keys no longer worked properly.  These problem keys were:</p>
<ul>
<li>insert</li>
<li>home</li>
<li>page up</li>
<li>delete</li>
<li>end</li>
<li>page down</li>
<li>all of the arrow keys (left, right, up, down) &#8211; It should be noted that the left arrow was acting like the &#8220;alt&#8221; key and the down arrow was acting like the &#8220;windows&#8221; key.</li>
</ul>
<p>The solution, as found on <a href="http://http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html">this page</a>, is easily summarized like this:</p>
<ol>
<li>Create (if it does not yet exist) ~/.vmware/config</li>
<li>In that file, enter the following:</li>
<blockquote><p>xkeymap.keycode.108 = 0&#215;138 # Alt_R<br />
xkeymap.keycode.106 = 0&#215;135 # KP_Divide<br />
xkeymap.keycode.104 = 0x11c # KP_Enter<br />
xkeymap.keycode.111 = 0&#215;148 # Up<br />
xkeymap.keycode.116 = 0&#215;150 # Down<br />
xkeymap.keycode.113 = 0x14b # Left<br />
xkeymap.keycode.114 = 0x14d # Right<br />
xkeymap.keycode.105 = 0x11d # Control_R<br />
xkeymap.keycode.118 = 0&#215;152 # Insert<br />
xkeymap.keycode.119 = 0&#215;153 # Delete<br />
xkeymap.keycode.110 = 0&#215;147 # Home<br />
xkeymap.keycode.115 = 0x14f # End<br />
xkeymap.keycode.112 = 0&#215;149 # Prior<br />
xkeymap.keycode.117 = 0&#215;151 # Next<br />
xkeymap.keycode.78 = 0&#215;46 # Scroll_Lock<br />
xkeymap.keycode.127 = 0&#215;100 # Pause<br />
xkeymap.keycode.133 = 0x15b # Meta_L<br />
xkeymap.keycode.134 = 0x15c # Meta_R<br />
xkeymap.keycode.135 = 0x15d # Menu</p></blockquote>
</ol>
<p>Save the file and start VMWare Workstation to get the full functionality of the keyboard back.</p>
<ol></ol>
]]></content:encoded>
			<wfw:commentRss>http://geekdom.wesmo.com/2008/11/19/fedora-with-gnome-and-vmware-workstation-65-keyboard-trouble/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Openvpn + Windows = One Awesome VPN Setup (Quick and Easy!)</title>
		<link>http://geekdom.wesmo.com/2008/07/02/openvpn-windows-one-awesome-vpn-setup-quick-and-easy/</link>
		<comments>http://geekdom.wesmo.com/2008/07/02/openvpn-windows-one-awesome-vpn-setup-quick-and-easy/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 18:06:12 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://geekdom.wesmo.com/?p=87</guid>
		<description><![CDATA[While at a previous employer, I came across an interesting article in the now-defunct SysAdmin magazine which covered, soup-to-nuts, setting up a rather basic OpenVPN server and NSIS-based Windows client package. It wasn&#8217;t long before I got hip deep in to customizing the Windows installer NSI script, and tweaking the server configuration. Eventually, I configured [...]]]></description>
			<content:encoded><![CDATA[<p>While at a previous employer, I came across an interesting <a title="Openvpn" href="http://www.samag.com/documents/s=9766/sam0506a/0506a.htm">article</a> in the now-defunct <a title="SysAdmin Magazine" href="http://www.samag.com/">SysAdmin</a> magazine which covered, soup-to-nuts, setting up a rather basic OpenVPN server and NSIS-based Windows client package.  It wasn&#8217;t long before I got hip deep in to customizing the Windows installer NSI script, and tweaking the server configuration.  Eventually, I configured up a Solaris 8 system in our data center to act as a secondary openvpn server (using the &#8220;tun&#8221; package), and all of the adminstrators/dba&#8217;s were very happy with the results.</p>
<p>Nearly two years and two employers have passed by, and I find myself going through a similar setup.  Unfortunately, i discovered that the backup of the files I took when I left my employer did not contain some of the key files, so I had to start back at square one.  The article was a great starting point, but I was worried that, since the magazine was now defunct, the article might not be around for much longer (although, as a subscriber, I received a CDROM containing all of the issues).</p>
<p>The article was also rather basic, and not very security conscious.  Additionally, some key steps (such as managing client certificates) were completely left off.  I&#8217;ve attached the original article for posterity.</p>
<h3><strong>The Server</strong></h3>
<p>To start off, the server needs to be set up and configured.  Some key items to keep in mind:</p>
<ul>
<li>The standard OpenVPN port is 1194.  However, there is nothing stopping you from running it at a different port.</li>
<li>Decide between a &#8220;bastion host&#8221; setup versus a &#8220;completely integrated setup&#8221; (I&#8217;ll cover these in a moment).</li>
</ul>
<p>On an RPM based distro, install the openvpn package.  In addition to the core openvpn components, it will also install a series of SSL/cert management tools in a directory at /usr/share/doc/openvpn-&lt;version&gt;/easy-rsa.  Copy that entire directory to /etc/openvpn/easy-rsa.  Now, cd to /etc/openvpn/easy-rsa, and take a look at the README file to familiarize yourself with the steps.  The general breakdown is:</p>
<ul>
<li>cd /etc/openvpn/easy-rsa</li>
<li>edit the &#8220;vars&#8221; file to your liking.  The only things I changed were the KEY_SIZE to make it 2048, and the KEY_ values to reflect the company&#8217;s information.  Save the file.</li>
<li>export KEY_CONFIG=/etc/openvpn/easy-rsa/openssl.cnf</li>
<li>export KEY_DIR=/etc/openvpn/easy-rsa/keys</li>
<li>. vars</li>
<li>./clean-all</li>
<li>./build-ca</li>
<li>./build-dh</li>
<li>Build a key for the server: ./build-key myserver</li>
</ul>
<p>Now that the certificate and keys have all been made for the server, there are a few additional steps to set up the directory structure and generate a server port key:</p>
<ul>
<li>cd /etc/openvpn</li>
<li>ln -s /etc/openvpn/easy-rsa/keys keys</li>
<li>openvpn &#8211;genkey &#8211;secret port1194.key</li>
<li>useradd openvpn (if the account hasn&#8217;t been created already)</li>
<li>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</li>
</ul>
<p>At this point, all of the security components are set up and actual configuration of openvpn is necessary.  I&#8217;ve attached a modified version of the sample server configuration file, but the highlights of the file include forcing out DHCP entries, setting routes, communicating via UDP only (<strong>UDP is much more efficient than TCP in this situation, so use it if you can</strong>), and logging.</p>
<p>Openvpn can handle multiple port configurations as it will read the /etc/openvpn directory and look for all files ending in &#8220;.conf&#8221;.  In most cases, you will only be working with one, but it is nice to know it supports multiple.</p>
<p>Once the configuration file is in place (<a href="http://geekdom.wesmo.com/wp-content/uploads/2008/07/port1190.conf">openvpn Port Configuration File</a>) in /etc/openvpn, start up openvpn via /etc/init.d/openvpn start and check the log files in /var/log/openvpn for information.  The server is up, and now on to the clients.</p>
<h3><strong>The Clients</strong></h3>
<p>The poor-man&#8217;s way of doing things is to create one client certificate and hand it out to everyone.  While this works, the down side is that it makes it next to impossible to seamlessly deactivate any one person&#8217;s access.  The best practice is to create individual certificates for each user, and provide them to the individual users.  Since the server has a copy of the user&#8217;s certificate, you can easily (re)move a certificate to disable a given user.</p>
<p><span style="text-decoration: underline;">Server Side Configuration</span></p>
<p>Create a user certificate via:</p>
<ul>
<li>cd /etc/openvpn/easy-rsa</li>
<li>. vars</li>
<li>export KEY_CONFIG=/etc/openvpn/easy-rsa/openssl.cnf</li>
<li>export KEY_DIR=/etc/openvpn/easy-rsa/keys</li>
<li>./build-key clientname</li>
</ul>
<p>At the end, there will be three files created:</p>
<ul>
<li>clientname.crt</li>
<li>clientname.csr</li>
<li>clientname.key</li>
</ul>
<p>Remember these.  We&#8217;ll need two of them (the .crt and the .key) for later use when they get copied over to the client.</p>
<p><span style="text-decoration: underline;">Client Side</span></p>
<p>The article has some good coverage of the steps necessary on building the Windows client via NSIS, and, personally, I think it (NSIS) is awesome.  After installing NSIS and downloading the openvpn gui (from the link in the article), I was testing the installer in no time.  Now, I did have to tweak the nsi file a number of times, just to get the default version working since it seems that the NSIS plugins have been updated to conflict with some settings in the default NSI.  So, I modified that NSI to get the <a href="http://geekdom.wesmo.com/wp-content/uploads/2008/07/openvpn-gui.nsi">final version of the openvpn.nsi file</a> that is fully branded, installs our ca.crt (which was copied over from /etc/openvpn/keys/ca.crt), sets up all of the start menu items, and installs our <a href="http://geekdom.wesmo.com/wp-content/uploads/2008/07/vpn.ovpn">client configuration file</a>.</p>
<p>With the installer package built and tested, it can now be supplied to the user, along with the clientname.key and clientname.crt files and instructions as to where to place those two files.</p>
<p><strong>Bastion host versus Complete Integration</strong></p>
<p>Getting the user(s) access to the network via VPN is a good chunk of the battle, but you really have to decide how you want to support this new VPN network.  Right now, the only access they really have is to the server running the openvpn process.  The other machines on your network do not know how to communicate back to this new network you created (remember, you&#8217;ve just turned this server in to a router).</p>
<p>A bastion host is a host that sits within your network that your VPN user(s) can log in to, and, from there, jump around to the rest of the network.  It is essentially a terminal server for those Windows folks out there.</p>
<p>However, if you would rather provide direct access from the machines coming in via the VPN, you would have to either:</p>
<ul>
<li>On each host on your network, add a route to your new vpn network with your openvpn server as the gateway, or</li>
<li>On each router in your network, add a route to your new vpn network with your openvpn server as the gateway.</li>
</ul>
<p><span id="more-87"></span></p>
<h1><strong>Branded VPN Deployment and Seamless Remote Management</strong></h1>
<p><em>Adam Olson</em></p>
<p>Bridging the gap between production network systems and remote users has always<br />
posed challenges. Initial infrastructure design, access privileges, and client<br />
software needs all must be addressed to ensure that network capacity and maintenance<br />
issues remain manageable as the user base grows. Perhaps the most important<br />
consideration is ease of use for the end user. Software, in general, is becoming<br />
more and more intuitive and end users expect a certain level of usability and<br />
aesthetic quality.</p>
<p>In this article, I will discuss a VPN system that overcomes these technical<br />
challenges while also providing an easy-to-use, attractive interface to the<br />
user. The solution is based on multiple open source tools. These open source<br />
projects are OpenVPN, OpenVPN GUI, Nullsoft Scriptable Install System (NSIS),<br />
and TightVNC (see Resources). TightVNC is added to provide seamless remote management<br />
that is not provided by the VPN solution itself.</p>
<p>The result will be a company-branded Windows 2000/XP installer that not only<br />
includes all client-side VPN configuration and key information, but also provides<br />
an integrated VNC server for remote management and assistance upon starting<br />
the VPN instance.</p>
<p><strong>Open Source Tools</strong></p>
<p>OpenVPN is a robust and flexible VPN solution that enables most Unix/Linux,<br />
Windows 2000/XP, and Mac OSX platforms to securely build encrypted tunnels to<br />
one another. These tunnels can be configured in a variety of ways, but in this<br />
article, I will focus solely on a point-to-point network design that will be<br />
one small or large hub and spoke deployment.</p>
<p>OpenVPN GUI is a very handy front end to managing VPN instances for Windows<br />
2000/XP. This is usually the most prominent end-user operating system within<br />
the organization, so an easy-to-use System Tray icon is a must. OpenVPN GUI<br />
allows for easy VPN access for most users.</p>
<p>The Nullsoft Scriptable Install System (NSIS) is a great open source project<br />
that enables you to create company-branded client installer packages. End-user<br />
perception is greatly enhanced when the install process has an in-house look<br />
and feel.</p>
<p>You may be familiar with Virtual Network Computing (VNC), and TightVNC is<br />
another open source package based on Real VNC. I began using TightVNC over its<br />
counterparts about five years ago, so I&#8217;ve stuck with it in this deployment.<br />
It is very reliable and carries a small footprint. The same result could probably<br />
be attained with a different VNC package if you want to experiment after reading<br />
this article.</p>
<p><strong>Data Center Requirements</strong></p>
<p>This article is primarily focused on simplifying the end-user side of things,<br />
but it would be incomplete if the data center needs were left unaddressed. In<br />
your data center, you will need a dedicated and hardened server running a popular<br />
Unix/Linux operating system. Please note the words &#8220;dedicated&#8221; and &#8220;hardened&#8221;,<br />
because this is one machine that you do not want to be compromised. Any remote<br />
nodes that require VPN access are inherently passing sensitive data, so take<br />
extra caution in this area. Strip down the network services to nothing but SSH<br />
and OpenVPN, if possible, and maintain strict firewall rules. For additional<br />
information, check out the many online documents on this subject.</p>
<p>The following examples will be based on a system running Red Hat Fedora Core<br />
2.</p>
<p>To compile OpenVPN, run the standard:</p>
<pre># gzip -d openvpn-2.0_rc6.tar.gz
# tar xf openvpn-2.0_rc6.tar
# cd openvpn-2.0_rc6
# ./configure
# make
# make install</pre>
<p>If you have any problems compiling, make sure you have LZO compression libraries<br />
installed. Please refer to the OpenVPN documentation for details on this.</p>
<p><strong>OpenVPN Server Configuration</strong></p>
<p>To begin, create a directory to house your VPN configuration files and keys:</p>
<pre># cd /etc
# mkdir openvpn
# chmod 700 openvpn
# cd openvpn</pre>
<p>Here is a straightforward configuration file for your first server instance that<br />
should be named port5023.conf:</p>
<pre>### Start Config File Port 5023 ###

# local tun device
dev tun23

# interface addresses
ifconfig 10.23.0.1 10.23.0.2

# key location
secret /etc/openvpn/port5023.key

# port to listen on
port 5023

# user to run as
user nobody
group nobody

# options
comp-lzo
ping 15
verb 1

### End Config File Port 5023 ###</pre>
<p>This file has very few options that require changing for each server instance,<br />
mainly the tunnel interface on which to bind, the UDP port on which to listen,<br />
the location of the key file, and the point-to-point addressing for the VPN connection.</p>
<p>Please note that the example configuration above instructs OpenVPN to switch<br />
user and group IDs to the account &#8220;nobody&#8221;. This is ideal if your VPN server<br />
is running only OpenVPN daemons as nobody. If the VPN server is running other<br />
services under the user and group IDs of nobody, it is best to run OpenVPN as<br />
a different user and group ID.</p>
<p>To create the static key for this VPN instance, run this command from within<br />
/etc/openvpn:</p>
<pre># /usr/local/sbin/openvpn --genkey --secret port5023.key</pre>
<p>At this point, don&#8217;t forget to add the necessary rule permitting UDP traffic destined<br />
to port 5023 within IPTables or your respective firewall software. Also note that<br />
a simple Perl script run via cron should be set up to monitor failed attempts<br />
at making a connection to this port for security auditing purposes.</p>
<p>You should now be able to start your VPN instance by executing:</p>
<pre># /usr/local/sbin/openvpn --daemon --disable-occ --config \
/etc/openvpn/port5023.conf</pre>
<p>The options passed to OpenVPN are as follows:</p>
<pre>--daemon -- Run as a daemon.</pre>
<p><strong>&#8211;disable-occ</strong> &#8212; This option allows, among other things, two different<br />
versions of OpenVPN to communicate. This is very handy when you are supporting<br />
true telecommuters who don&#8217;t receive software updates on a routine basis.</p>
<p><strong>&#8211;conf</strong> &#8212; Specify the location of the configuration file.</p>
<p>You should now have a basic VPN server instance listening on port 5023. If<br />
you experience any problems, please review the OpenVPN documentation. It is<br />
straightforward to configure, so any issues should be easily resolved.</p>
<p><strong>Building the VPN Installer</strong></p>
<p>VPN clients in this configuration need to know where the VPN server is located,<br />
which port to connect to, which statically assigned key to use, and more. This<br />
is all accomplished by providing a complete configuration file and key within<br />
the company-branded VPN installer. End users will not need nearly as much assistance<br />
in remotely accessing the more sensitive resources within the company with an<br />
easy-to-use installer executable.</p>
<p>Because we are creating our own Windows 2000/XP installer, the opportunity<br />
exists to introduce otherwise totally separate program binaries into the installation<br />
process. Instead of simply installing a VPN client with a prearranged key and<br />
configuration file, we will also be including TightVNC binaries for both the<br />
client and server instance of the VNC protocol.</p>
<p>Download and install the NSIS package on a Windows XP development system at:</p>
<pre>http://www.openvpn.se/files/nsis/nsis20b3.exe</pre>
<p>Since the release of my production rollout, a newer version of NSIS has been released.<br />
Make sure you are using the version linked to above for demonstration purposes,<br />
but each principle covered here is applicable to the later versions. However,<br />
I have noticed that the latest version of NSIS does require a little bit of tweaking<br />
with the following install source zip file, so you will find it easier to use<br />
the above version of NSIS anyway.</p>
<p>Next, download the installation source to the same Windows XP development<br />
system at:</p>
<pre>http://www.openvpn.se/files/install_packages_source/ \
openvpn_install_source-2.0-rc6-gui-1.0-beta26.zip</pre>
<p>This file was put together by Mathias Sundman and includes all of the necessary<br />
files for OpenVPN, OpenVPN GUI, and NSIS configuration to build the standard OpenVPN<br />
Windows installer package. Unzip this file to your desktop and name the folder<br />
&#8220;VPN Sources&#8221; for now.</p>
<p>To get an idea of what will result from the overall process, open the VPN<br />
Sources folder, right-click openvpn-gui.nsi, and left-click &#8220;Compile NSI&#8221;. A<br />
few seconds later you should see an OpenVPN installer executable in the &#8220;VPN<br />
Sources&#8221; folder. If you were to execute this installer, the standard version<br />
of OpenVPN would be installed. If you ran into any problems creating this executable,<br />
please refer to the documentation located at:</p>
<pre>http://openvpn.se/files/howto/ \
openvpn-howto_roll_your_own_installation_package.html</pre>
<p>or:</p>
<pre>http://nsis.sourceforge.net</pre>
<p><strong>Building the Company-Branded VPN Installer</strong></p>
<p>We now have a basic VPN server instance and a standard Windows installer for<br />
OpenVPN, but we want to make it custom built for easy deployment. We also want<br />
to add TightVNC binaries for instant remote administration and assistance.</p>
<p>Download the complete set of TightVNC 1.3dev6 executables without the installer<br />
at:</p>
<pre>http://www.tightvnc.com/download.html</pre>
<p>For now, unzip and save the included files to your desktop. We will be concerned<br />
with the files VNCHooks.dll, vncviewer.exe, WinVNC.exe, and LICENCE.txt. Copy<br />
these files to the openvpn folder within the &#8220;VPN Sources&#8221; folder.</p>
<p>Save the following client-side example configuration file to openvpn/config/VPN.ovpn<br />
within your &#8220;VPN Sources&#8221; folder as well:</p>
<pre>### BEGIN CLIENT SIDE CONFIGURATION FILE ###

# vpn server to contact
remote 192.168.10.10

# port to establish connection on
port 5023

# local tunnel device
dev tun

# interface addresses
tun-mtu 1500
ifconfig 10.23.0.2 10.23.0.1
route 10.0.0.0 255.0.0.0 10.23.0.1

# key location
secret "c:\\program files\\company branded vpn\\config\\key.txt"

# enable LZO compression
comp-lzo

# moderate verbosity
verb 0
mute 10

;fragment 1300
;mssfix

; ping-restart 60
; ping-timer-rem
; persist-tun
; persist-key
; resolv-retry 86400

# keep-alive ping
ping 10

# enable LZO compression
comp-lzo

# moderate verbosity
verb 4
mute 10

### END CLIENT SIDE CONFIGURATION FILE ###</pre>
<p>You will see a number of options in the above example configuration, and I encourage<br />
you to test different settings. For now, a reasonable number of options are enabled,<br />
and the rest are commented out with a leading semicolon. The most important options<br />
will be the IP address of your VPN server, the port number on which to connect,<br />
the location of the key file, and the addressing assignments of the VPN interface.<br />
Also, note the route command listed above. You have control over establishing<br />
entries in the end user&#8217;s routing table upon successful completion of the VPN<br />
tunnel creation. This comes in handy in a number of situations.</p>
<p>Before moving on, you will also need to copy the contents of /etc/openvpn/port5023.key<br />
on your VPN server to openvpn/config/key.txt within the &#8220;VPN Sources&#8221; folder.<br />
This step ensures the new VPN installer will have the correct key when establishing<br />
the encrypted tunnel.</p>
<p>To wrap up the company-branded VPN installer portion, open the &#8220;VPN Sources&#8221;<br />
folder and edit openvpn-gui.nsi. Replace the first section of code with this:</p>
<pre>!include "MUI.nsh"
!include "setpath.nsi"

!define MASTER "x:\openvpn\exp\openvpn"

!define HOME "openvpn"
!define BIN "${HOME}\bin"

!define MUI_PRODUCT "Company Branded VPN"
!define OPENVPN_VERSION "2.0"
!define GUI_VERSION "2.0"
!define MYCERT_VERSION "0.3.2b"
!define MUI_VERSION "-"
;!define MUI_VERSION "${OPENVPN_VERSION}-gui-${GUI_VERSION}"

!define TAP "tap0801"
!define TAPDRV "${TAP}.sys"</pre>
<p>Now find the line that starts with &#8220;OutFile&#8221; and replace it with:</p>
<pre>OutFile "Company Branded VPN.exe"</pre>
<p>Next, locate the line:</p>
<pre>File "${HOME}\openvpn.exe"</pre>
<p>And add directly below it (overwriting the identically named sections):</p>
<pre>  SetOutPath "c:\program files\TightVNC"

nsExec::ExecToLog '"c:\program files\TightVNC\winvnc.exe" -kill'

File "${HOME}\vncviewer.exe"
File "${HOME}\WinVNC.exe"
File "${HOME}\LICENCE.txt"
File "${HOME}\VNCHooks.dll"

nsExec::ExecToLog '"c:\program files\TightVNC\winvnc.exe" -reinstall'
nsExec::ExecToLog 'net start winvnc'

SectionEnd

Section "OpenVPN GUI" SecGUI

SetOverwrite on
SetOutPath "$INSTDIR\bin"
File "${HOME}\openvpn-gui.exe"

SetOutPath "$INSTDIR\config"
File "${HOME}\config\VPN.ovpn"
File "${HOME}\config\key.txt"

CreateDirectory "$INSTDIR\log"

SectionEnd</pre>
<p>Next, locate the following lines:</p>
<pre>Delete "$INSTDIR\config\README.txt"
Delete "$INSTDIR\config\sample.${SERV_CONFIG_EXT}.txt"</pre>
<p>and replace them with:</p>
<pre>Delete "$INSTDIR\config\key.txt"
Delete "$INSTDIR\config\README.txt"
Delete "$INSTDIR\config\VPN.ovpn"</pre>
<p>This step ensures removal of the key and configuration file in the event the user<br />
uninstalls the company-branded VPN package.</p>
<p>Finally, in the &#8220;VPN Sources\openvpn&#8221; folder, rename openvpn-2.0_rc6.zip to<br />
openvpn-2.0.zip and openvpn-gui-1.0-beta26.zip to openvpn-gui-2.0.zip. I do<br />
this to keep the version of the primary application OpenVPN simple; feel free<br />
to address this issue as desired.</p>
<p>Return to the &#8220;VPN Sources&#8221; folder, right-click openvpn-gui.nsi and left-click<br />
compile NSI. If you made all the changes correctly, you will now see a &#8220;Company<br />
Branded VPN.exe&#8221; in the &#8220;VPN Sources&#8221; folder. It will include a complete example<br />
configuration, the appropriate key, and a company-branded look and feel to the<br />
installer. It will also install TightVNC, register it as a Windows Service,<br />
and start you on your way to easier remote user administration with secure remote<br />
access.</p>
<p><strong>Where You Can Go from Here</strong></p>
<p>The general ideas outlined in this article enable systems and network administrators<br />
to deploy a company-branded VPN solution for the Windows 2000/XP platform, which<br />
can be extended to other client platforms with additional work. This solution<br />
allows administrators to control what the end user&#8217;s workstation knows about<br />
(routing table additions), what the end user is permitted to access (VPN server&#8217;s<br />
firewall configuration), and utilizes open source tools, thereby allowing a<br />
company to deploy cost-effective and branded solutions to its users.</p>
<p><strong>Resources</strong></p>
<p>NSIS Web site &#8212; <strong>http://nsis.sourceforge.net</strong></p>
<p>OpenVPN Web site &#8212; <strong>http://www.openvpn.net</strong></p>
<p>OpenVPN GUI Web site &#8212; <strong>http://openvpn.se</strong></p>
<p>Real VNC Web site &#8212; <strong>http://www.realvnc.com</strong></p>
<p>TightVNC Web site &#8212; <strong>http://www.tightvnc.com</strong></p>
<p><em>Adam Olson lives in Northern California. He&#8217;s been active in network design,<br />
systems administration, and systems programming for more than nine years with<br />
various companies like MCI WorldCom and small Bay Area startups. He has now<br />
co-founded a relatively new company serving the needs of small and medium-sized<br />
businesses that is called Office Appliance (<strong>http://officeappliance.com</strong>).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://geekdom.wesmo.com/2008/07/02/openvpn-windows-one-awesome-vpn-setup-quick-and-easy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

