<?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>www.denbraber.org</title>
	<atom:link href="http://www.denbraber.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.denbraber.org</link>
	<description>about Oracle, Linux, Apple and other technical and nontechnical stuff</description>
	<lastBuildDate>Sat, 14 Jan 2012 09:58:51 +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>Even een blogpost testen</title>
		<link>http://www.denbraber.org/?p=150</link>
		<comments>http://www.denbraber.org/?p=150#comments</comments>
		<pubDate>Sat, 14 Jan 2012 09:58:51 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=150</guid>
		<description><![CDATA[Setting up a VPN tunnel with OpenVPN Because I was looking for the option of running a Oracle VM server at home, with a couple of virtual machines running on it, I wanted these virtual machines to be accessible remotely, &#8230; <a href="http://www.denbraber.org/?p=150">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Setting up a VPN tunnel with OpenVPN</p>
<p>Because I was looking for the option of running a Oracle VM server at home, with a couple of virtual machines running on it, I wanted these virtual machines to be accessible remotely, when I’m on the road. The requirements I had where the following:<br />VPN software must be free<br />VPN software must be available for Linux (Oracle Enterprise Linux), Mac OS X and Windows<br />No tweaking of my currently used router (Apple Time Capsule)<br />VPN software must be easy to configure</p>
<p>The first three requirements where not that difficult, but I had some trouble configuring the software. At the end I ended up with the following software:<br />OpenVPN, software for both running a VPN server and client<br />Tunnelblick, software for running a VPN client on Mac OS X</p>
<p>Installing packages on the OpenVPN server</p>
<p>My startup-point was a installed Oracle Enterprise Linux 5 update 5 64 bit. I did a minimal installation, since I only wanted this server to be my OpenVPN server. If you create this new server as a virtual machine, make sure that your network card is bridged to the physical network card in your computer. Give your new server a dedicated ip-address, since you have to make an adjustment in your router. At my home I use the network segment 192.168.123.0/255.255.255.0. So I gave my OpenVPN server the ip-address 192.168.123.200.</p>
<p>Install the following packages:</p>
<p>lzo2-2.02-3.el5.rf.x86_64.rpm <br />openvpn-2.0.9-1.el5.rf.x86_64.rpm</p>
<p>If you follow the links above, it will get you to the site where you can download the RPM’s. Copy the packages to your server that you’re going to use as your OpenVPN server.</p>
<p>Install the packages with the rpm command:</p>
<p>[root@openvpn ~]# rpm -ivh lzo2-2.02-3.el5.rf.x86_64.rpm <br />warning: lzo2-2.02-3.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6<br />Preparing&#8230; ########################################### [100%]<br /> 1:lzo2 ########################################### [100%]<br />[root@openvpn ~]# rpm -ivh openvpn-2.0.9-1.el5.rf.x86_64.rpm <br />warning: openvpn-2.0.9-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6<br />Preparing&#8230; ########################################### [100%]<br /> 1:openvpn ########################################### [100%]</p>
<p>The packages are installed. Now it’s time to do the configuration of the OpenVPN server.</p>
<p>Configuration of the OpenVPN server</p>
<p>A lot of files of the openvpn package are placed in the directory /usr/share/doc/openvpn-2.0.9. <br />Thirst thing we’re going to do, is to create the certificates for our OpenVPN server. Go to the directory /usr/share/doc/openvpn-2.0.9/easy-rsa/2.0:<br />[root@openvpn ~]# cd /usr/share/doc/openvpn-2.0.9/easy-rsa/2.0/<br />Change the Makefile that’s in this directory and set the DESTDIR to /etc/openvpn. After that the file will look simular to this:<br />DESTDIR=/etc/openvpn<br />PREFIX=</p>
<p>all:<br /> echo &quot;All done.&quot;<br /> echo &quot;Run make install DESTDIR=/usr/share/somewhere&quot;</p>
<p>install:<br /> install -c &#8211;directory &quot;${DESTDIR}/${PREFIX}&quot;<br /> install -c &#8211;mode=0755 build-* &quot;${DESTDIR}/${PREFIX}&quot;<br /> install -c &#8211;mode=0755 clean-all list-crl inherit-inter pkitool revoke-full sign-req whichopensslcnf &quot;${DESTDIR}/${PREFIX}&quot;<br /> install -c &#8211;mode=0644 openssl-0.9.6.cnf openssl.cnf README vars &quot;${DESTDIR}/${PREFIX}&quot;<br />Run the make install command to install all the necessary files to the directory /etc/openvpn:<br />[root@openvpn 2.0]# make install<br />install -c &#8211;directory &quot;/etc/openvpn/&quot;<br />install -c &#8211;mode=0755 build-* &quot;/etc/openvpn/&quot;<br />install -c &#8211;mode=0755 clean-all list-crl inherit-inter pkitool revoke-full sign-req whichopensslcnf &quot;/etc/openvpn/&quot;<br />install -c &#8211;mode=0644 openssl-0.9.6.cnf openssl.cnf README vars &quot;/etc/openvpn/&quot;</p>
<p>Go to the directory /etc/openvpn:<br />[root@openvpn 2.0]# cd /etc/openvpn<br />Change the last lines of the vars file that’s in this directory:<br />export KEY_COUNTRY=&quot;NL&quot;<br />export KEY_PROVINCE=&quot;NH&quot;<br />export KEY_CITY=&quot;dummytown&quot;<br />export KEY_ORG=&quot;Dummy-Org&quot;<br />export KEY_EMAIL=&quot;foo@dummy.org&quot;<br />Fill in the Country, Province, City, Organization and an email address.</p>
<p>Make sure that the parameters are set by running the source command. You can ignore the message about the clean-all script:</p>
<p>[root@openvpn openvpn]# source vars<br />NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/keys</p>
<p>Run the clean-all procedure to clean the keys directory, if this is the first time, than this directory does not exists:<br />[root@openvpn openvpn]# ./clean-all<br />Build the certificate authority:<br />[root@openvpn openvpn]# ./build-ca <br />Generating a 1024 bit RSA private key<br />&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;++++++<br />&#8230;&#8230;..++++++<br />writing new private key to &#8216;ca.key&#8217;<br />&#8212;&#8211;<br />You are about to be asked to enter information that will be incorporated<br />into your certificate request.<br />What you are about to enter is what is called a Distinguished Name or a DN.<br />There are quite a few fields but you can leave some blank<br />For some fields there will be a default value,<br />If you enter &#8216;.&#8217;, the field will be left blank.<br />&#8212;&#8211;<br />Country Name (2 letter code) [NL]:<br />State or Province Name (full name) [NH]:<br />Locality Name (eg, city) [dummytown]:<br />Organization Name (eg, company) [Dummy-Org]:<br />Organizational Unit Name (eg, section) []:<br />Common Name (eg, your name or your server&#8217;s hostname) [Dummy-Org CA]:<br />Email Address [foo@dummy.org]:</p>
<p>Create the server certificates:<br />[root@openvpn openvpn]# ./build-key-server server<br />Generating a 1024 bit RSA private key<br />&#8230;&#8230;++++++<br />&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..++++++<br />writing new private key to &#8216;server.key&#8217;<br />&#8212;&#8211;<br />You are about to be asked to enter information that will be incorporated<br />into your certificate request.<br />What you are about to enter is what is called a Distinguished Name or a DN.<br />There are quite a few fields but you can leave some blank<br />For some fields there will be a default value,<br />If you enter &#8216;.&#8217;, the field will be left blank.<br />&#8212;&#8211;<br />Country Name (2 letter code) [NL]:<br />State or Province Name (full name) [NH]:<br />Locality Name (eg, city) [dummytown]:<br />Organization Name (eg, company) [Dummy-Org]:<br />Organizational Unit Name (eg, section) []:<br />Common Name (eg, your name or your server&#8217;s hostname) [server]:<br />Email Address [foo@dummy.org]:</p>
<p>Please enter the following &#8216;extra&#8217; attributes<br />to be sent with your certificate request<br />A challenge password []:<br />An optional company name []:<br />Using configuration from /etc/openvpn/openssl.cnf<br />Check that the request matches the signature<br />Signature ok<br />The Subject&#8217;s Distinguished Name is as follows<br />countryName :PRINTABLE:&#8217;NL&#8217;<br />stateOrProvinceName :PRINTABLE:&#8217;NH&#8217;<br />localityName :PRINTABLE:&#8217;dummytown&#8217;<br />organizationName :PRINTABLE:&#8217;Dummy-Org&#8217;<br />commonName :PRINTABLE:&#8217;server&#8217;<br />emailAddress :IA5STRING:&#8217;foo@dummy.org&#8217;<br />Certificate is to be certified until May 11 14:27:28 2020 GMT (3650 days)<br />Sign the certificate? [y/n]:y</p>
<p>1 out of 1 certificate requests certified, commit? [y/n]y<br />Write out database with 1 new entries<br />Data Base Updated</p>
<p>Create at least one client key:</p>
<p>[root@openvpn openvpn]# ./build-key client1<br />Generating a 1024 bit RSA private key<br />&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++<br />&#8230;..++++++<br />writing new private key to &#8216;client1.key&#8217;<br />&#8212;&#8211;<br />You are about to be asked to enter information that will be incorporated<br />into your certificate request.<br />What you are about to enter is what is called a Distinguished Name or a DN.<br />There are quite a few fields but you can leave some blank<br />For some fields there will be a default value,<br />If you enter &#8216;.&#8217;, the field will be left blank.<br />&#8212;&#8211;<br />Country Name (2 letter code) [NL]:<br />State or Province Name (full name) [NH]:<br />Locality Name (eg, city) [dummytown]:<br />Organization Name (eg, company) [Dummy-Org]:<br />Organizational Unit Name (eg, section) []:<br />Common Name (eg, your name or your server&#8217;s hostname) [client1]:<br />Email Address [foo@dummy.org]:</p>
<p>Please enter the following &#8216;extra&#8217; attributes<br />to be sent with your certificate request<br />A challenge password []:<br />An optional company name []:<br />Using configuration from /etc/openvpn/openssl.cnf<br />Check that the request matches the signature<br />Signature ok<br />The Subject&#8217;s Distinguished Name is as follows<br />countryName :PRINTABLE:&#8217;NL&#8217;<br />stateOrProvinceName :PRINTABLE:&#8217;NH&#8217;<br />localityName :PRINTABLE:&#8217;dummytown&#8217;<br />organizationName :PRINTABLE:&#8217;Dummy-Org&#8217;<br />commonName :PRINTABLE:&#8217;client1&#8242;<br />emailAddress :IA5STRING:&#8217;foo@dummy.org&#8217;<br />Certificate is to be certified until May 11 14:28:33 2020 GMT (3650 days)<br />Sign the certificate? [y/n]:y</p>
<p>1 out of 1 certificate requests certified, commit? [y/n]y<br />Write out database with 1 new entries<br />Data Base Updated</p>
<p>Create the Diffie-Hellman (DH) settings:</p>
<p>[root@openvpn openvpn]# ./build-dh<br />Generating DH parameters, 1024 bit long safe prime, generator 2<br />This is going to take a long time<br />&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;.+&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;..+.+&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;+&#8230;..+&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+.+&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;+&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+..+&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++*++*++*</p>
<p>Copy the following files from the /usr/share/doc/openvpn-2.0.9/sample-config-files to the /etc/openvpn directory:<br />openvpn-shutdown.sh<br />openvpn-startup.sh<br />server.conf<br />[root@openvpn openvpn]# cd /usr/share/doc/openvpn-2.0.9/sample-config-files/<br />[root@openvpn sample-config-files]# cp -pv openvpn-startup.sh openvpn-shutdown.sh server.conf <br />`openvpn-startup.sh&#8217; -&gt; `/etc/openvpn/openvpn-startup.sh&#8217;<br />`openvpn-shutdown.sh&#8217; -&gt; `/etc/openvpn/openvpn-shutdown.sh&#8217;<br />`server.conf&#8217; -&gt; `/etc/openvpn/server.conf&#8217;<br />Important: Remove from the openvpn-startup.sh and openvpn-shutdown.sh files the .sh extension. The init script in /etc/init.d/openvpn uses the filenames openvpn-startup and openvpn-shutdown.<br />Make sure that the files firewall.sh, openvpn-shutdown.sh and openvpn-startup.sh can be executed:</p>
<p>[root@openvpn sample-config-files]# cd /etc/openvpn<br />[root@openvpn openvpn]# chmod u+x firewall.sh openvpn-shutdown.sh openvpn-startup.sh<br />Modify the file server.conf so that at least it contains the following entries:<br />port 1194<br />proto udp<br />dev tun<br />ca ca.crt<br />cert server.crt<br />key server.key # This file should be kept secret<br />dh dh1024.pem<br />server 10.8.0.0 255.255.255.0<br />ifconfig-pool-persist ipp.txt<br />push &quot;route 192.168.123.0 255.255.255.0&quot;<br />keepalive 10 120<br />comp-lzo<br />persist-key<br />persist-tun<br />status openvpn-status.log<br />verb 3</p>
<p>Copy the files ca.crt, server.crt, server.key and dh1024.epm from the /etc/openvpn/keys directory to the /etc/openvpn directory:<br />[root@openvpn openvpn]# cd /etc/openvpn/keys/<br />[root@openvpn keys]# cp -pv ca.crt server.crt server.key dh1024.pem ..<br />`ca.crt&#8217; -&gt; `../ca.crt&#8217;<br />`server.crt&#8217; -&gt; `../server.crt&#8217;<br />`server.key&#8217; -&gt; `../server.key&#8217;<br />`dh1024.pem&#8217; -&gt; `../dh1024.pem&#8217;</p>
<p>Start the openvpn service with the service command:<br />[root@openvpn openvpn]# service openvpn start<br />Starting openvpn: [ OK ]</p>
<p>Make sure that the openvpn service is started at boottime:<br />[root@openvpn openvpn]# chkconfig openvpn on<br />[root@openvpn openvpn]# chkconfig openvpn &#8211;list<br />openvpn 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />You can check the file /var/log/messages for the results of the startup:<br />May 14 17:10:10 openvpn kernel: tun: Universal TUN/TAP device driver, 1.6<br />May 14 17:10:10 openvpn kernel: tun: (C) 1999-2004 Max Krasnyansky &lt;maxk@qualcomm.com&gt;<br />May 14 17:10:10 openvpn openvpn[9060]: OpenVPN 2.0.9 x86_64-redhat-linux-gnu [SSL] [LZO] [EPOLL] built on Mar 8 2007<br />May 14 17:10:10 openvpn openvpn[9060]: Diffie-Hellman initialized with 1024 bit key<br />May 14 17:10:10 openvpn openvpn[9060]: TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]<br />May 14 17:10:10 openvpn openvpn[9060]: TUN/TAP device tun0 opened<br />May 14 17:10:10 openvpn openvpn[9060]: /sbin/ip link set dev tun0 up mtu 1500<br />May 14 17:10:10 openvpn openvpn[9060]: /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2<br />May 14 17:10:10 openvpn openvpn[9060]: /sbin/ip route add 10.8.0.0/24 via 10.8.0.2<br />May 14 17:10:10 openvpn openvpn[9060]: Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]<br />May 14 17:10:10 openvpn openvpn[9068]: UDPv4 link local (bound): [undef]:1194<br />May 14 17:10:10 openvpn openvpn[9068]: UDPv4 link remote: [undef]<br />May 14 17:10:10 openvpn openvpn[9068]: MULTI: multi_init called, r=256 v=256<br />May 14 17:10:10 openvpn openvpn[9068]: IFCONFIG POOL: base=10.8.0.4 size=62<br />May 14 17:10:10 openvpn openvpn[9068]: IFCONFIG POOL LIST<br />May 14 17:10:10 openvpn openvpn[9068]: Initialization Sequence Completed</p>
<p>I had the linux firewall (iptables) running on my system, so I added another rule to this firewall, to allow incomming udp traffic on port 1194. I did this with the configuration tool system-config-security-tui.<br />Select the option Customize and in the Firewall Configuration &#8211; Customize screen add the following to the Other ports section: 1194:udp. Once that’s done you can check you’re newly added rule with the service iptables status command:<br />[root@openvpn sysconfig]# service iptables status<br />Table: filter<br />Chain INPUT (policy ACCEPT)<br />num target prot opt source destination <br />1 RH-Firewall-1-INPUT all &#8212; 0.0.0.0/0 0.0.0.0/0 </p>
<p>Chain FORWARD (policy ACCEPT)<br />num target prot opt source destination <br />1 RH-Firewall-1-INPUT all &#8212; 0.0.0.0/0 0.0.0.0/0 </p>
<p>Chain OUTPUT (policy ACCEPT)<br />num target prot opt source destination </p>
<p>Chain RH-Firewall-1-INPUT (2 references)<br />num target prot opt source destination <br />1 ACCEPT all &#8212; 0.0.0.0/0 0.0.0.0/0 <br />2 ACCEPT icmp &#8212; 0.0.0.0/0 0.0.0.0/0 icmp type 255 <br />3 ACCEPT esp &#8212; 0.0.0.0/0 0.0.0.0/0 <br />4 ACCEPT ah &#8212; 0.0.0.0/0 0.0.0.0/0 <br />5 ACCEPT udp &#8212; 0.0.0.0/0 224.0.0.251 udp dpt:5353 <br />6 ACCEPT udp &#8212; 0.0.0.0/0 0.0.0.0/0 udp dpt:631 <br />7 ACCEPT tcp &#8212; 0.0.0.0/0 0.0.0.0/0 tcp dpt:631 <br />8 ACCEPT all &#8212; 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED <br />9 ACCEPT udp &#8212; 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:1194 <br />10 ACCEPT tcp &#8212; 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 <br />11 REJECT all &#8212; 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited </p>
<p>The configuration of the OpenVPN server is finished. The following thing to do, is to install and configure the client.</p>
<p>Opening the OpenVPN port on your Apple Time Capsule</p>
<p>To make sure that you can connect to your OpenVPN server from the internet, you must redirect port 1194 on your Time Capsule to your OpenVPN server. <br />Start the Airport Utility (I always use Spotlight to do this)<br />Select your Time Capsule<br />Select the Advanced options and select Port Mapping<br />Click on the plus button to add a new port mapping<br />Fill in the following entries:<br />Service: leave untouched<br />Public UDP Port(s): 1194<br />Public TCP Port(s): leave empty<br />Private IP Address: 192.168.123.200 (use the ip-address of your OpenVPN server)<br />Private UDP Port(s): 1194<br />Private TCP Port(s): leave empty<br />Click on the Continue button to effectuate the changes<br />In the next screen give a description for the portmapping. I used openvpn for that<br />Click on the Done button<br />Click on the the Update button<br />You’re Time Capsule will be restarted to make the changes permanent</p>
<p>If you’re using another router you must check the documentation of that router, how to map ports to particular servers.</p>
<p>Installation and configuration of Tunnelblick</p>
<p>Tunnelblick is an OpenVPN Graphic User Interface (GUI) for Mac OS X. The installation is very straightforward can be done just like installing any other program on Mac OS X. <br />Download the program at http://code.google.com/p/tunnelblick/.<br />Open the downloaded dmg file and double-click on the Tunnelblick icon to start the installation. Answer yes to the question if Tunnelblick should be started.<br />After the installation a Tunnelblick icon is placed near the Spotlight icon. <br />The configuration files for Tunnelblick are placed in the directory /Users/&lt;your Mac username&gt;/Library/Application Support/Tunnelblick/Configurations. Open the file openvpn.conf in your favorite editor.<br />Make sure that the configuration file contains at least the following entries:<br />client<br />dev tun<br />proto udp<br />remote &lt;ip-address of your internet connection at home&gt; 1194<br />resolv-retry infinite<br />nobind<br />persist-key<br />persist-tun<br />ca ca.crt<br />cert client1.crt<br />key client1.key<br />comp-lzo<br />verb 3<br />The ip-address of your internet connection can be determined with the help of the website http://whatismyipaddress.com/. The ip-address is shown in blue at the right.<br />Copy the following files from your OpenVPN server to your Mac:<br />ca.crt<br />client1.crt<br />client1.key<br />These files are located at the /etc/openvpn/keys directory. The must be copied to the directory /Users/&lt;your Mac username&gt;/Library/Application Support/Tunnelblick/Configurations. I always use Cyberduck for copying files between Linux and Mac OS X.<br />Once the files are copied to the right location, you can test your VPN connection.<br />On the Tunnelblick icon, click with the right mouse button on Details.</p>
<p>Next thing to do is click on the Connect button. If you’re tunnel is working, you should see output similar to the following:<br />2010-05-16 20:59:19 *Tunnelblick: OS X 10.6.3; Tunnelblick 3.0 (build 1437); OpenVPN 2.1.1<br />2010-05-16 21:01:42 *Tunnelblick: Attempting connection with openvpn.conf; Set nameserver = 1; monitoring connection<br />2010-05-16 21:01:42 *Tunnelblick: /Applications/Tunnelblick.app/Contents/Resources/openvpnstart start openvpn.conf 1337 1 0 0 0<br />2010-05-16 21:01:42 *Tunnelblick: /Applications/Tunnelblick.app/Contents/Resources/openvpn &#8211;management-query-passwords &#8211;cd /Users/rob/Library/Application Support/Tunnelblick/Configurations &#8211;daemon &#8211;management-hold &#8211;management 127.0.0.1 1337 &#8211;config /Users/rob/Library/Application Support/Tunnelblick/Configurations/openvpn.conf &#8211;script-security 2 &#8211;up &quot;/Applications/Tunnelblick.app/Contents/Resources/client.up.osx.sh&quot; &#8211;down &quot;/Applications/Tunnelblick.app/Contents/Resources/client.down.osx.sh&quot; &#8211;up-restart<br />2010-05-16 21:01:42 SUCCESS: pid=22922<br />2010-05-16 21:01:42 SUCCESS: real-time state notification set to ON<br />2010-05-16 21:01:42 SUCCESS: real-time log notification set to ON<br />2010-05-16 21:01:42 OpenVPN 2.1.1 i386-apple-darwin10.2.0 [SSL] [LZO2] [PKCS11] built on Feb 24 2010<br />2010-05-16 21:01:42 MANAGEMENT: TCP Socket listening on 127.0.0.1:1337<br />2010-05-16 21:01:42 waiting&#8230;<br />2010-05-16 21:01:42 MANAGEMENT: Client connected from 127.0.0.1:1337<br />2010-05-16 21:01:42 MANAGEMENT: CMD &#8216;pid&#8217;<br />2010-05-16 21:01:42 MANAGEMENT: CMD &#8216;state on&#8217;<br />2010-05-16 21:01:42 MANAGEMENT: CMD &#8216;log on all&#8217;<br />2010-05-16 21:01:42 END<br />2010-05-16 21:01:42 MANAGEMENT: CMD &#8216;hold release&#8217;<br />2010-05-16 21:01:42 SUCCESS: hold release succeeded<br />2010-05-16 21:01:42 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.<br />2010-05-16 21:01:42 NOTE: the current &#8211;script-security setting may allow this configuration to call user-defined scripts<br />2010-05-16 21:01:42 LZO compression initialized<br />2010-05-16 21:01:42 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]<br />2010-05-16 21:01:42 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]<br />2010-05-16 21:01:42 Local Options hash (VER=V4): &#8217;41690919&#8242;<br />2010-05-16 21:01:42 Expected Remote Options hash (VER=V4): &#8217;530fdded&#8217;<br />2010-05-16 21:01:42 Socket Buffers: R=[42080-&gt;65536] S=[9216-&gt;65536]<br />2010-05-16 21:01:42 UDPv4 link local: [undef]<br />2010-05-16 21:01:42 UDPv4 link remote: &lt;internet ip-address&gt;:1194<br />2010-05-16 21:01:42 <br />2010-05-16 21:01:44 <br />2010-05-16 21:01:44 sid=e216f399 26ce1e22<br />2010-05-16 21:01:45 /C=NL/ST=NH/L=dummytown/O=Dummy-Org/CN=Dummy-Org_CA/emailAddress=foo@dummy.org<br />2010-05-16 21:01:45 /C=NL/ST=NH/L=dummytown/O=Dummy-Org/CN=server/emailAddress=foo@dummy.org<br />2010-05-16 21:01:46 Data Channel Encrypt: Cipher &#8216;BF-CBC&#8217; initialized with 128 bit key<br />2010-05-16 21:01:46 Data Channel Encrypt: Using 160 bit message hash &#8216;SHA1&#8242; for HMAC authentication<br />2010-05-16 21:01:46 Data Channel Decrypt: Cipher &#8216;BF-CBC&#8217; initialized with 128 bit key<br />2010-05-16 21:01:46 Data Channel Decrypt: Using 160 bit message hash &#8216;SHA1&#8242; for HMAC authentication<br />2010-05-16 21:01:46 1024 bit RSA<br />2010-05-16 21:01:46 [server] Peer Connection Initiated with &lt;internet ip-address&gt;:1194<br />2010-05-16 21:01:47 <br />2010-05-16 21:01:49 SENT CONTROL [server]: &#8216;PUSH_REQUEST&#8217; (status=1)<br />2010-05-16 21:01:49 ifconfig 10.8.0.6 10.8.0.5&#8242;<br />2010-05-16 21:01:49 OPTIONS IMPORT: timers and/or timeouts modified<br />2010-05-16 21:01:49 OPTIONS IMPORT: &#8211;ifconfig/up options modified<br />2010-05-16 21:01:49 OPTIONS IMPORT: route options modified<br />2010-05-16 21:01:49 ROUTE default_gateway=192.168.100.1<br />2010-05-16 21:01:49 TUN/TAP device /dev/tun0 opened<br />2010-05-16 21:01:49 <br />2010-05-16 21:01:49 /sbin/ifconfig tun0 delete<br />2010-05-16 21:01:49 NOTE: Tried to delete pre-existing tun/tap instance &#8212; No Problem if failure<br />2010-05-16 21:01:49 /sbin/ifconfig tun0 10.8.0.6 10.8.0.5 mtu 1500 netmask 255.255.255.255 up<br />2010-05-16 21:01:49 /Applications/Tunnelblick.app/Contents/Resources/client.up.osx.sh tun0 1500 1542 10.8.0.6 10.8.0.5 init<br />2010-05-16 21:01:49 <br />2010-05-16 21:01:49 /sbin/route add -net 192.168.123.0 10.8.0.5 255.255.255.0<br />2010-05-16 21:01:49 /sbin/route add -net 10.8.0.1 10.8.0.5 255.255.255.255<br />2010-05-16 21:01:49 Initialization Sequence Completed<br />2010-05-16 21:01:49 &lt;internet ip-address&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=150</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kerstfilmpje</title>
		<link>http://www.denbraber.org/?p=145</link>
		<comments>http://www.denbraber.org/?p=145#comments</comments>
		<pubDate>Sun, 18 Dec 2011 19:28:08 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=145</guid>
		<description><![CDATA[Personalize funny videos and birthday eCards at JibJab!]]></description>
			<content:encoded><![CDATA[<div style='background-color:#e9e9e9; -moz-border-radius: 10px;border-radius:10px;width: 567px;'><object id='A64060' quality='high' data='http://aka.zero.jibjab.com/client/zero/ClientZero_EmbedViewer.swf?external_make_id=BJSrbnMZ4P8MKIU8&#038;service=sendables.jibjab.com&#038;partnerID=holidays' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent' height='319' width='567'><param name='wmode' value='transparent'></param><param name='movie' value='http://aka.zero.jibjab.com/client/zero/ClientZero_EmbedViewer.swf?external_make_id=BJSrbnMZ4P8MKIU8&#038;service=sendables.jibjab.com&#038;partnerID=holidays'></param><param name='scaleMode' value='showAll'></param><param name='quality' value='high'></param><param name='allowNetworking' value='all'></param><param name='allowFullScreen' value='true' /><param name='FlashVars' value='cornerRadius=10&#038;external_make_id=BJSrbnMZ4P8MKIU8&#038;service=sendables.jibjab.com&#038;partnerID=holidays'></param><param name='allowScriptAccess' value='always'></param></object>
<div style='text-align:center;margin-top:6px;'>Personalize funny videos and birthday <a href='http://sendables.jibjab.com/ecards'>eCards</a> at JibJab!</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=145</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Haarlemmermeerse Bos</title>
		<link>http://www.denbraber.org/?p=134</link>
		<comments>http://www.denbraber.org/?p=134#comments</comments>
		<pubDate>Wed, 14 Dec 2011 18:11:49 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=134</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-190813.jpg"><img src="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-190813.jpg" alt="20111214-190813.jpg" class="alignnone size-full" /></a></p>
<p><a href="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-191539.jpg"><img src="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-191539.jpg" alt="20111214-191539.jpg" class="alignnone size-full" /></a></p>
<p><a href="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-191601.jpg"><img src="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-191601.jpg" alt="20111214-191601.jpg" class="alignnone size-full" /></a></p>
<p><a href="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-191613.jpg"><img src="http://www.denbraber.org/wp-content/uploads/2011/12/20111214-191613.jpg" alt="20111214-191613.jpg" class="alignnone size-full" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=134</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shredding disks with the shred command</title>
		<link>http://www.denbraber.org/?p=93</link>
		<comments>http://www.denbraber.org/?p=93#comments</comments>
		<pubDate>Wed, 13 Apr 2011 19:54:24 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=93</guid>
		<description><![CDATA[I got the question whether there is a good way to remove the data of a disk, our in this specific case from a LUN. As databases are added and removed from the clusters, storage is also added and removed &#8230; <a href="http://www.denbraber.org/?p=93">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span lang="EN-US">I got the question whether there is a good way to remove the data of a disk, our in this specific case from a LUN. As databases are added and removed from the clusters, storage is also added and removed frequently. One of the demands of the security department is that the data on the LUNs that are returned to the storage department is completely unreadable. To accomplish this I had a look at the shred command.</span></p>
<p class="MsoNormal"><span lang="EN-US"><span id="more-93"></span><br />
</span></p>
<p class="MsoNormal"><span lang="EN-US">The purpose of the shred command, as the man page tells us, is to overwrite a file to hide its contents, and optionally delete it. Since disks and LUNs are also represented as files on a Linux system, it’s also possible to use this command for shredding disks or LUNs.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">In this example we assume that device /dev/sdb is the device that has to be returned to the storage department.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">Most of the time a disk or LUN contain one or more partitions as shown in the output below:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# ls -l /dev/sdb*</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 16 Apr 11 15:32 /dev/sdb</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 17 Apr 11 15:32 /dev/sdb1</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 18 Apr 11 15:32 /dev/sdb2</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 19 Apr 11 15:32 /dev/sdb3</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 20 Apr 11 15:32 /dev/sdb4</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">Currently the disks are still mounted and contain an ext3 filesystem:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# df -h |grep sdb</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb1<span style="mso-spacerun: yes;"> </span> <span style="mso-spacerun: yes;"> </span>471M<span style="mso-spacerun: yes;"> </span> 376M<span style="mso-spacerun: yes;"> </span> 72M<span style="mso-spacerun: yes;"> </span> 85% /disk1</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb2<span style="mso-spacerun: yes;"> </span> 471M<span style="mso-spacerun: yes;"> </span> 365M<span style="mso-spacerun: yes;"> </span> 83M<span style="mso-spacerun: yes;"> </span> 82% /disk2</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb3<span style="mso-spacerun: yes;"> </span> 471M<span style="mso-spacerun: yes;"> </span> 324M<span style="mso-spacerun: yes;"> </span> 123M<span style="mso-spacerun: yes;"> </span> 73% /disk3</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb4<span style="mso-spacerun: yes;"> </span> 580M<span style="mso-spacerun: yes;"> </span> 182M<span style="mso-spacerun: yes;"> </span> 369M<span style="mso-spacerun: yes;"> </span> 34% /disk4</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# mount | grep sdb</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb1 on /disk1 type ext3 (rw)</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb2 on /disk2 type ext3 (rw)</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb3 on /disk3 type ext3 (rw)</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb4 on /disk4 type ext3 (rw)</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">In this example we assume that device /dev/sdb is the device that has to be returned to the storage department.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">First we make sure that the partitions on this particular disk do not contain any open files. This can be done with the lsof (list open files) command:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# lsof /disk1</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">COMMAND<span style="mso-spacerun: yes;"> </span> PID<span style="mso-spacerun: yes;"> </span> USER<span style="mso-spacerun: yes;"> </span> FD<span style="mso-spacerun: yes;"> </span> TYPE DEVICE<span style="mso-spacerun: yes;"> </span> SIZE<span style="mso-spacerun: yes;"> </span> NODE NAME</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">vim<span style="mso-spacerun: yes;"> </span> 2660 braberra<span style="mso-spacerun: yes;"> </span> 4u<span style="mso-spacerun: yes;"> </span> REG<span style="mso-spacerun: yes;"> </span> 8,17 12288 10308 /disk1/braberra/.test.swp</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">As show in the output above user braberra still has a file open on the particular disk. Make sure the user is logged out, or that the user is not using any file on the disk. When this is done, the disks can be unmounted, with the umount command:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">root@wolter ~]# umount /disk1</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# umount /disk2</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# umount /disk3</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# umount /disk4</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# mount | grep sdb</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">We have a last look at the partition table of the disk:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# fdisk -l /dev/sdb</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Disk /dev/sdb: 2147 MB, 2147483648 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">255 heads, 63 sectors/track, 261 cylinders</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Units = cylinders of 16065 * 512 = 8225280 bytes</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US"><span style="mso-spacerun: yes;"> </span> Device Boot<span style="mso-spacerun: yes;"> </span> Start<span style="mso-spacerun: yes;"> </span> End<span style="mso-spacerun: yes;"> </span> Blocks<span style="mso-spacerun: yes;"> </span> Id<span style="mso-spacerun: yes;"> </span> System</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb1<span style="mso-spacerun: yes;"> </span> 1<span style="mso-spacerun: yes;"> </span> 62<span style="mso-spacerun: yes;"> </span> 497983+<span style="mso-spacerun: yes;"> </span> 83<span style="mso-spacerun: yes;"> </span> Linux</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb2<span style="mso-spacerun: yes;"> </span> 63<span style="mso-spacerun: yes;"> </span> 124<span style="mso-spacerun: yes;"> </span> 498015<span style="mso-spacerun: yes;"> </span> 83<span style="mso-spacerun: yes;"> </span> Linux</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb3<span style="mso-spacerun: yes;"> </span> 125<span style="mso-spacerun: yes;"> </span> 186<span style="mso-spacerun: yes;"> </span> 498015<span style="mso-spacerun: yes;"> </span> 83<span style="mso-spacerun: yes;"> </span> Linux</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">/dev/sdb4<span style="mso-spacerun: yes;"> </span> 187<span style="mso-spacerun: yes;"> </span> 261<span style="mso-spacerun: yes;"> </span> 602437+<span style="mso-spacerun: yes;"> </span> 83<span style="mso-spacerun: yes;"> </span> Linux</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">With the strings command we can have a look at what’s on the disk:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# strings /dev/sdb |head -40</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">lost+found</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">braberra</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">ld.so.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">fstab</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">environment</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">xinetd.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">NetworkManager</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">auto.misc</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">.pwd.lock</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">screenrc</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">foomatic</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">sysctl.conf.orabackup</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">cups$@</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">xinetd.d9@</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">mke2fs.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">nsswitch.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">makedev.d</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">cron.hourly</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">adjtime</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">quotatabY@</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">ld.so.cache</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">jwhois.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Muttrc.local^@</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">vimrc</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">DIR_COLORS</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">reader.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">yum.confc@</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">readahead.d</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">bluetooth</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">mtabp@</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">pinforc</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">csh.cshrc</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">sudoers</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">protocols</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">mcelog.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">samba</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">dhcp6c.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">alsa</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">krb5.conf</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">openldap</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">Now we can use the shred command to remove all the content of the device:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# shred -v -n3 -z /dev/sdb</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 1/4 (random)&#8230;</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 1/4 (random)&#8230;1.0GiB/2.0GiB 54%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 1/4 (random)&#8230;1.1GiB/2.0GiB 55%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 1/4 (random)&#8230;2.0GiB/2.0GiB 100%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 2/4 (random)&#8230;</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 2/4 (random)&#8230;1.0GiB/2.0GiB 53%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 2/4 (random)&#8230;1.1GiB/2.0GiB 55%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 2/4 (random)&#8230;2.0GiB/2.0GiB 100%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 3/4 (random)&#8230;</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 3/4 (random)&#8230;1.0GiB/2.0GiB 52%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 3/4 (random)&#8230;1.1GiB/2.0GiB 55%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 3/4 (random)&#8230;2.0GiB/2.0GiB 100%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 4/4 (000000)&#8230;</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 4/4 (000000)&#8230;1.0GiB/2.0GiB 54%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 4/4 (000000)&#8230;1.1GiB/2.0GiB 55%</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">shred: /dev/sdb: pass 4/4 (000000)&#8230;2.0GiB/2.0GiB 100%</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">The options used in this command are:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">-v<span style="mso-tab-count: 1;"> </span> shows verbose output</span></p>
<p class="MsoNormal"><span lang="EN-US">-n3<span style="mso-tab-count: 1;"> </span> overwrites the device 3 times with random data. The default is 25.</span></p>
<p class="MsoNormal"><span lang="EN-US">-z<span style="mso-tab-count: 1;"> </span> adds a final overwrite with zeros to hide shredding</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">When we have a look with the strings command again, no output is shown:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# strings /dev/sdb |head -40</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]#</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">The partitions are also gone:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# fdisk -l /dev/sdb</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Disk /dev/sdb: 2147 MB, 2147483648 bytes</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">255 heads, 63 sectors/track, 261 cylinders</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Units = cylinders of 16065 * 512 = 8225280 bytes</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Disk /dev/sdb doesn&#8217;t contain a valid partition table</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">The files for the partitions, however, are still there:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# ls -l /dev/sdb*</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 16 Apr 11 16:15 /dev/sdb</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 17 Apr 11 15:40 /dev/sdb1</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 18 Apr 11 15:40 /dev/sdb2</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 19 Apr 11 15:40 /dev/sdb3</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">brw-r&#8212;&#8211; 1 root disk 8, 20 Apr 11 15:40 /dev/sdb4</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">To remove those as well, use the fdisk command and only perform a write action:</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">[root@wolter ~]# fdisk /dev/sdb</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Building a new DOS disklabel. Changes will remain in memory only,</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">until you decide to write them. After that, of course, the previous</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">content won&#8217;t be recoverable.</span></p>
<p class="MsoNormal" style="text-indent: 8.7pt;">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Warning: invalid flag 0&#215;0000 of partition table 4 will be corrected by w(rite)</span></p>
<p class="MsoNormal" style="text-indent: 8.7pt;">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Command (m for help): w</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">The partition table has been altered!</span></p>
<p class="MsoNormal" style="text-indent: 8.7pt;">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Calling ioctl() to re-read partition table.</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; mso-bidi-font-size: 12.0pt; font-family: &quot;Courier New&quot;;" lang="EN-US">Syncing disks.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US">The device is ready to be removed from your system. Use your own procedure to do this.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=93</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a vpn tunnel using OpenVPN</title>
		<link>http://www.denbraber.org/?p=35</link>
		<comments>http://www.denbraber.org/?p=35#comments</comments>
		<pubDate>Sun, 16 May 2010 20:07:14 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=35</guid>
		<description><![CDATA[Because I was looking for the option of running an Oracle VM server at home, with a couple of virtual machines running on it, I wanted these virtual machines to be accessible remotely, when I’m on the road. The requirements &#8230; <a href="http://www.denbraber.org/?p=35">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-weight: normal;">Because I was looking for the option of running an Oracle VM server at home, with a couple of virtual machines running on it, I wanted these virtual machines to be accessible remotely, when I’m on the road. The requirements I had where the following:</span></strong></p>
<ul>
<li>VPN software must be free</li>
<li>VPN software must be available for Linux (Oracle Enterprise Linux), Mac OS X and Windows</li>
<li>No tweaking of my currently used router (Apple Time Capsule)</li>
<li>VPN software must be easy to configure<span id="more-35"></span></li>
</ul>
<p>The first three requirements where not that difficult, but I had some trouble configuring the software. At the end I ended up with the following software:</p>
<ul>
<li><a href="http://openvpn.net/">OpenVPN</a>, software for both running a VPN server and client</li>
<li><a href="http://code.google.com/p/tunnelblick/">Tunnelblick</a>, software for running a VPN client on Mac OS X</li>
</ul>
<p><strong> </strong></p>
<p><strong>Installing packages on the OpenVPN server</strong></p>
<p>My startup-point was a installed Oracle Enterprise Linux 5 update 5 64 bit. I did a minimal installation, since I only wanted this server to be my OpenVPN server. If you  create this new server as a virtual machine, make sure that your network card is bridged to the physical network card in your computer. Give your new server a dedicated ip-address, since you have to make an adjustment in your router. At my home I use the network segment 192.168.123.0/255.255.255.0. So I gave my OpenVPN server the ip-address 192.168.123.200.</p>
<p>Install the following packages:</p>
<ul>
<li><a href="http://dag.wieers.com/rpm/packages/lzo2/">lzo2-2.02-3.el5.rf.x86_64.rpm</a></li>
<li><a href="http://dag.wieers.com/rpm/packages/openvpn/">openvpn-2.0.9-1.el5.rf.x86_64.rpm</a></li>
</ul>
<p>If you follow the links above, it will get you to the site where you can download the RPM’s. Copy the packages to your server that you’re going to use as your OpenVPN server.</p>
<p>Install the packages with the rpm command:</p>
<pre>[root@openvpn ~]# rpm -ivh lzo2-2.02-3.el5.rf.x86_64.rpm</pre>
<pre>warning: lzo2-2.02-3.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6</pre>
<pre>Preparing...                ########################################### [100%]</pre>
<pre>1:lzo2                   ########################################### [100%]</pre>
<pre>[root@openvpn ~]# rpm -ivh openvpn-2.0.9-1.el5.rf.x86_64.rpm</pre>
<pre>warning: openvpn-2.0.9-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6</pre>
<pre>Preparing...                ########################################### [100%]</pre>
<pre>1:openvpn                ########################################### [100%]</pre>
<p><br class="spacer_" /></p>
<p>The packages are installed. Now it’s time to do the configuration of the OpenVPN server.</p>
<p><strong>Configuration of the OpenVPN server</strong></p>
<p>A lot of files of the openvpn package are placed in the directory /usr/share/doc/openvpn-2.0.9.</p>
<p>Thirst thing we’re going to do, is to create the certificates for our OpenVPN server. Go to the directory /usr/share/doc/openvpn-2.0.9/easy-rsa/2.0:</p>
<pre>[root@openvpn ~]# cd /usr/share/doc/openvpn-2.0.9/easy-rsa/2.0/</pre>
<p><br class="spacer_" /></p>
<p>Change the Makefile that’s in this directory and set the DESTDIR to /etc/openvpn. After that the file will look simular to this:</p>
<pre>DESTDIR=/etc/openvpn</pre>
<pre>PREFIX=</pre>
<pre>all:</pre>
<pre>echo "All done."</pre>
<pre>echo "Run make install DESTDIR=/usr/share/somewhere"</pre>
<pre>install:</pre>
<pre>install -c --directory "${DESTDIR}/${PREFIX}"</pre>
<pre>install -c --mode=0755 build-* "${DESTDIR}/${PREFIX}"</pre>
<pre>install -c --mode=0755 clean-all list-crl inherit-inter pkitool revoke-full sign-req whichopensslcnf "${DESTDIR}/${PREFIX}"</pre>
<pre>install -c --mode=0644 openssl-0.9.6.cnf openssl.cnf README vars "${DESTDIR}/${PREFIX}"</pre>
<p><br class="spacer_" /></p>
<p>Run the make install command to install all the necessary files to the directory /etc/openvpn:</p>
<pre>[root@openvpn 2.0]# make install</pre>
<pre>install -c --directory "/etc/openvpn/"</pre>
<pre>install -c --mode=0755 build-* "/etc/openvpn/"</pre>
<pre>install -c --mode=0755 clean-all list-crl inherit-inter pkitool revoke-full sign-req whichopensslcnf "/etc/openvpn/"</pre>
<pre>install -c --mode=0644 openssl-0.9.6.cnf openssl.cnf README vars "/etc/openvpn/"</pre>
<p><br class="spacer_" /></p>
<p>Go to the directory /etc/openvpn:</p>
<pre>[root@openvpn 2.0]# cd /etc/openvpn</pre>
<p><br class="spacer_" /></p>
<p>Change the last lines of the vars file that’s in this directory:</p>
<pre>export KEY_COUNTRY="NL"</pre>
<pre>export KEY_PROVINCE="NH"</pre>
<pre>export KEY_CITY="dummytown"</pre>
<pre>export KEY_ORG="Dummy-Org"</pre>
<pre>export KEY_EMAIL="foo@dummy.org"</pre>
<p><br class="spacer_" /></p>
<p>Fill in the Country, Province, City, Organization and an email address.</p>
<p>Make sure that the parameters are set by running the source command. You can ignore the message about the clean-all script:</p>
<pre>[root@openvpn openvpn]# source vars</pre>
<pre>NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/keys</pre>
<p><br class="spacer_" /></p>
<p>Run the clean-all procedure to clean the keys directory, if this is the first time, than this directory does not exists:</p>
<pre>[root@openvpn openvpn]# ./clean-all</pre>
<p><br class="spacer_" /></p>
<p>Build the certificate authority:</p>
<pre>[root@openvpn openvpn]# ./build-ca</pre>
<pre>Generating a 1024 bit RSA private key</pre>
<pre>....................................++++++</pre>
<pre>........++++++</pre>
<pre>writing new private key to 'ca.key'</pre>
<pre>-----</pre>
<pre>You are about to be asked to enter information that will be incorporated</pre>
<pre>into your certificate request.</pre>
<pre>What you are about to enter is what is called a Distinguished Name or a DN.</pre>
<pre>There are quite a few fields but you can leave some blank</pre>
<pre>For some fields there will be a default value,</pre>
<pre>If you enter '.', the field will be left blank.</pre>
<pre>-----</pre>
<pre>Country Name (2 letter code) [NL]:</pre>
<pre>State or Province Name (full name) [NH]:</pre>
<pre>Locality Name (eg, city) [dummytown]:</pre>
<pre>Organization Name (eg, company) [Dummy-Org]:</pre>
<pre>Organizational Unit Name (eg, section) []:</pre>
<pre>Common Name (eg, your name or your server's hostname) [Dummy-Org CA]:</pre>
<pre>Email Address [foo@dummy.org]:</pre>
<p><br class="spacer_" /></p>
<p>Create the server certificates:</p>
<pre>[root@openvpn openvpn]# ./build-key-server server</pre>
<pre>Generating a 1024 bit RSA private key</pre>
<pre>......++++++</pre>
<pre>....................++++++</pre>
<pre>writing new private key to 'server.key'</pre>
<pre>-----</pre>
<pre>You are about to be asked to enter information that will be incorporated</pre>
<pre>into your certificate request.</pre>
<pre>What you are about to enter is what is called a Distinguished Name or a DN.</pre>
<pre>There are quite a few fields but you can leave some blank</pre>
<pre>For some fields there will be a default value,</pre>
<pre>If you enter '.', the field will be left blank.</pre>
<pre>-----</pre>
<pre>Country Name (2 letter code) [NL]:</pre>
<pre>State or Province Name (full name) [NH]:</pre>
<pre>Locality Name (eg, city) [dummytown]:</pre>
<pre>Organization Name (eg, company) [Dummy-Org]:</pre>
<pre>Organizational Unit Name (eg, section) []:</pre>
<pre>Common Name (eg, your name or your server's hostname) [server]:</pre>
<pre>Email Address [foo@dummy.org]:</pre>
<pre>Please enter the following 'extra' attributes</pre>
<pre>to be sent with your certificate request</pre>
<pre>A challenge password []:</pre>
<pre>An optional company name []:</pre>
<pre>Using configuration from /etc/openvpn/openssl.cnf</pre>
<pre>Check that the request matches the signature</pre>
<pre>Signature ok</pre>
<pre>The Subject's Distinguished Name is as follows</pre>
<pre>countryName           :PRINTABLE:'NL'</pre>
<pre>stateOrProvinceName   :PRINTABLE:'NH'</pre>
<pre>localityName          :PRINTABLE:'dummytown'</pre>
<pre>organizationName      :PRINTABLE:'Dummy-Org'</pre>
<pre>commonName            :PRINTABLE:'server'</pre>
<pre>emailAddress          :IA5STRING:'foo@dummy.org'</pre>
<pre>Certificate is to be certified until May 11 14:27:28 2020 GMT (3650 days)</pre>
<pre>Sign the certificate? [y/n]:y</pre>
<pre>1 out of 1 certificate requests certified, commit? [y/n]y</pre>
<pre>Write out database with 1 new entries</pre>
<pre>Data Base Updated</pre>
<p><br class="spacer_" /></p>
<p>Create at least one client key:</p>
<pre>[root@openvpn openvpn]# ./build-key client1</pre>
<pre>Generating a 1024 bit RSA private key</pre>
<pre>.........................++++++</pre>
<pre>.....++++++</pre>
<pre>writing new private key to 'client1.key'</pre>
<pre>-----</pre>
<pre>You are about to be asked to enter information that will be incorporated</pre>
<pre>into your certificate request.</pre>
<pre>What you are about to enter is what is called a Distinguished Name or a DN.</pre>
<pre>There are quite a few fields but you can leave some blank</pre>
<pre>For some fields there will be a default value,</pre>
<pre>If you enter '.', the field will be left blank.</pre>
<pre>-----</pre>
<pre>Country Name (2 letter code) [NL]:</pre>
<pre>State or Province Name (full name) [NH]:</pre>
<pre>Locality Name (eg, city) [dummytown]:</pre>
<pre>Organization Name (eg, company) [Dummy-Org]:</pre>
<pre>Organizational Unit Name (eg, section) []:</pre>
<pre>Common Name (eg, your name or your server's hostname) [client1]:</pre>
<pre>Email Address [foo@dummy.org]:</pre>
<pre>Please enter the following 'extra' attributes</pre>
<pre>to be sent with your certificate request</pre>
<pre>A challenge password []:</pre>
<pre>An optional company name []:</pre>
<pre>Using configuration from /etc/openvpn/openssl.cnf</pre>
<pre>Check that the request matches the signature</pre>
<pre>Signature ok</pre>
<pre>The Subject's Distinguished Name is as follows</pre>
<pre>countryName           :PRINTABLE:'NL'</pre>
<pre>stateOrProvinceName   :PRINTABLE:'NH'</pre>
<pre>localityName          :PRINTABLE:'dummytown'</pre>
<pre>organizationName      :PRINTABLE:'Dummy-Org'</pre>
<pre>commonName            :PRINTABLE:'client1'</pre>
<pre>emailAddress          :IA5STRING:'foo@dummy.org'</pre>
<pre>Certificate is to be certified until May 11 14:28:33 2020 GMT (3650 days)</pre>
<pre>Sign the certificate? [y/n]:y</pre>
<pre>1 out of 1 certificate requests certified, commit? [y/n]y</pre>
<pre>Write out database with 1 new entries</pre>
<pre>Data Base Updated</pre>
<p><br class="spacer_" /></p>
<p>Create the Diffie-Hellman (DH) settings:</p>
<pre>[root@openvpn openvpn]# ./build-dh</pre>
<pre>Generating DH parameters, 1024 bit long safe prime, generator 2</pre>
<pre>This is going to take a long time</pre>
<pre>.....................................................................</pre>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;"><span style="line-height: 19px; white-space: normal;">
</span></span></pre>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Copy the following files from the /usr/share/doc/openvpn-2.0.9/sample-config-files to the /etc/openvpn directory:</span></pre>
<ul>
<li>openvpn-shutdown.sh</li>
<li>openvpn-startup.sh</li>
<li>server.conf</li>
</ul>
<pre>[root@openvpn openvpn]# cd /usr/share/doc/openvpn-2.0.9/sample-config-files/</pre>
<pre>[root@openvpn sample-config-files]# cp -pv openvpn-startup.sh openvpn-shutdown.sh server.conf</pre>
<pre>`openvpn-startup.sh' -&gt; `/etc/openvpn/openvpn-startup.sh'</pre>
<pre>`openvpn-shutdown.sh' -&gt; `/etc/openvpn/openvpn-shutdown.sh'</pre>
<pre>`server.conf' -&gt; `/etc/openvpn/server.conf'</pre>
<p><br class="spacer_" /></p>
<p><strong>Important: Remove from the openvpn-startup.sh and openvpn-shutdown.sh files the .sh extension. The init script in /etc/init.d/openvpn uses the filenames openvpn-startup and openvpn-shutdown.</strong></p>
<p>Make sure that the files openvpn-shutdown.sh and openvpn-startup.sh can be executed:</p>
<pre>[root@openvpn sample-config-files]# cd /etc/openvpn</pre>
<pre>[root@openvpn openvpn]# chmod u+x openvpn-shutdown openvpn-startup</pre>
<p><br class="spacer_" /></p>
<p>Modify the file server.conf so that at least it contains the following entries:</p>
<pre>port 1194</pre>
<pre>proto udp</pre>
<pre>dev tun</pre>
<pre>ca ca.crt</pre>
<pre>cert server.crt</pre>
<pre>key server.key  # This file should be kept secret</pre>
<pre>dh dh1024.pem</pre>
<pre>server 10.8.0.0 255.255.255.0</pre>
<pre>ifconfig-pool-persist ipp.txt</pre>
<pre>push "route 192.168.123.0 255.255.255.0"</pre>
<pre>keepalive 10 120</pre>
<pre>comp-lzo</pre>
<pre>persist-key</pre>
<pre>persist-tun</pre>
<pre>status openvpn-status.log</pre>
<pre>verb 3</pre>
<p><br class="spacer_" /></p>
<p>Copy the files ca.crt, server.crt, server.key and dh1024.epm  from the /etc/openvpn/keys directory to the /etc/openvpn directory:</p>
<pre>[root@openvpn openvpn]# cd /etc/openvpn/keys/</pre>
<pre>[root@openvpn keys]# cp -pv ca.crt server.crt server.key dh1024.pem ..</pre>
<pre>`ca.crt' -&gt; `../ca.crt'</pre>
<pre>`server.crt' -&gt; `../server.crt'</pre>
<pre>`server.key' -&gt; `../server.key'</pre>
<pre>`dh1024.pem' -&gt; `../dh1024.pem'</pre>
<p><br class="spacer_" /></p>
<p>Start the openvpn service with the service command:</p>
<pre>[root@openvpn openvpn]# service openvpn start</pre>
<pre>Starting openvpn:                                          [  OK  ]</pre>
<p><br class="spacer_" /></p>
<p>Make sure that the openvpn service is started at boottime:</p>
<pre>[root@openvpn openvpn]# chkconfig openvpn on</pre>
<pre>[root@openvpn openvpn]# chkconfig openvpn --list</pre>
<pre>openvpn        	0:off	1:off	2:on	3:on	4:on	5:on	6:off</pre>
<p><br class="spacer_" /></p>
<p>You can check the file /var/log/messages for the results of the startup:</p>
<pre>May 14 17:10:10 openvpn kernel: tun: Universal TUN/TAP device driver, 1.6</pre>
<pre>May 14 17:10:10 openvpn kernel: tun: (C) 1999-2004 Max Krasnyansky &lt;maxk@qualcomm.com&gt;</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: OpenVPN 2.0.9 x86_64-redhat-linux-gnu [SSL] [LZO] [EPOLL] built on Mar  8 2007</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: Diffie-Hellman initialized with 1024 bit key</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: TUN/TAP device tun0 opened</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: /sbin/ip link set dev tun0 up mtu 1500</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: /sbin/ip route add 10.8.0.0/24 via 10.8.0.2</pre>
<pre>May 14 17:10:10 openvpn openvpn[9060]: Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]</pre>
<pre>May 14 17:10:10 openvpn openvpn[9068]: UDPv4 link local (bound): [undef]:1194</pre>
<pre>May 14 17:10:10 openvpn openvpn[9068]: UDPv4 link remote: [undef]</pre>
<pre>May 14 17:10:10 openvpn openvpn[9068]: MULTI: multi_init called, r=256 v=256</pre>
<pre>May 14 17:10:10 openvpn openvpn[9068]: IFCONFIG POOL: base=10.8.0.4 size=62</pre>
<pre>May 14 17:10:10 openvpn openvpn[9068]: IFCONFIG POOL LIST</pre>
<pre>May 14 17:10:10 openvpn openvpn[9068]: Initialization Sequence Completed</pre>
<p><br class="spacer_" /></p>
<p>I had the linux firewall (iptables) running on my system, so I added another rule to this firewall, to allow incomming udp traffic on port 1194. I did this with the configuration tool system-config-security-tui.</p>
<p>Select the option Customize and  in the Firewall Configuration &#8211; Customize screen add the following to the Other ports section: 1194:udp. Once that’s done you can check you’re newly added rule with the service iptables status command:</p>
<pre>[root@openvpn sysconfig]# service iptables status</pre>
<pre>Table: filter</pre>
<pre>Chain INPUT (policy ACCEPT)</pre>
<pre>num  target     prot opt source               destination</pre>
<pre>1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0</pre>
<pre>Chain FORWARD (policy ACCEPT)</pre>
<pre>num  target     prot opt source               destination</pre>
<pre>1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0</pre>
<pre>Chain OUTPUT (policy ACCEPT)</pre>
<pre>num  target     prot opt source               destination</pre>
<pre>Chain RH-Firewall-1-INPUT (2 references)</pre>
<pre>num  target     prot opt source               destination</pre>
<pre>1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0</pre>
<pre>2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255</pre>
<pre>3    ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0</pre>
<pre>4    ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0</pre>
<pre>5    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353</pre>
<pre>6    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631</pre>
<pre>7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631</pre>
<pre>8    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED</pre>
<pre>9    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:1194</pre>
<pre>10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22</pre>
<pre>11   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited</pre>
<p><br class="spacer_" /></p>
<p>The configuration of the OpenVPN server is finished. The following thing to do, is to install and configure the client.</p>
<p><strong> </strong></p>
<p><strong>Opening the OpenVPN port on your Apple Time Capsule</strong></p>
<p>To make sure that you can connect to your OpenVPN server from the internet, you must redirect port 1194 on your Time Capsule to your OpenVPN server.</p>
<ul>
<li>Start the Airport Utility (I always use Spotlight to do this)</li>
<li>Select your Time Capsule</li>
<li>Select the Advanced options and select Port Mapping</li>
<li>Click on the plus button to add a new port mapping</li>
<li>Fill in the following entries:
<ul>
<li>
<ul>
<li>Service: leave untouched</li>
<li>Public UDP Port(s): 1194</li>
<li>Public TCP Port(s): leave empty</li>
<li>Private IP Address: 192.168.123.200 (use the ip-address of your OpenVPN server)</li>
<li>Private UDP Port(s): 1194</li>
<li>Private TCP Port(s): leave empty</li>
</ul>
</li>
</ul>
</li>
<li>Click on the Continue button to effectuate the changes</li>
<li>In the next screen give a description for the portmapping. I used openvpn for that</li>
<li>Click on the Done button</li>
<li>Click on the the Update button</li>
<li>You’re Time Capsule will be restarted to make the changes permanent</li>
</ul>
<p>If you’re using another router you must check the documentation of that router, how to map ports to particular servers.</p>
<p><strong>Installation and configuration of Tunnelblick</strong></p>
<p>Tunnelblick is an OpenVPN Graphic User Interface (GUI) for Mac OS X. The installation is very straightforward can be done just like installing any other program on Mac OS X.</p>
<p>Download the program at  <a href="http://code.google.com/p/tunnelblick/">http://code.google.com/p/tunnelblick/</a>.</p>
<p>Open the downloaded dmg file and double-click on the Tunnelblick icon to start the installation. Answer yes to the question if Tunnelblick should be started.</p>
<p>After the installation a Tunnelblick icon is placed near the Spotlight icon.</p>
<p>The configuration files for Tunnelblick are placed in the directory /Users/&lt;your Mac username&gt;/Library/Application Support/Tunnelblick/Configurations. Open the file openvpn.conf in your favorite editor.</p>
<p>Make sure that the configuration file contains at least the following entries:</p>
<pre>client</pre>
<pre>dev tun</pre>
<pre>proto udp</pre>
<pre>remote  &lt;ip-address of your internet connection at home&gt; 1194</pre>
<pre>resolv-retry infinite</pre>
<pre>nobind</pre>
<pre>persist-key</pre>
<pre>persist-tun</pre>
<pre>ca ca.crt</pre>
<pre>cert client1.crt</pre>
<pre>key client1.key</pre>
<pre>comp-lzo</pre>
<pre>verb 3</pre>
<p><br class="spacer_" /></p>
<p>The ip-address of your internet connection can be determined with the help of the website <a href="http://whatismyipaddress.com">http://whatismyipaddress.com</a>/. The ip-address is shown in blue at the right.</p>
<p>Copy the following files from your OpenVPN server to your Mac:</p>
<ul>
<li>ca.crt</li>
<li>client1.crt</li>
<li>client1.key</li>
</ul>
<p>These files are located at the /etc/openvpn/keys directory. The must be copied to the directory /Users/&lt;your Mac username&gt;/Library/Application Support/Tunnelblick/Configurations. I always use Cyberduck for copying files between Linux and Mac OS X.</p>
<p>Once the files are copied to the right location, you can test your VPN connection.</p>
<p>On the Tunnelblick icon, click with the right mouse button on Details.</p>
<p><a href="http://www.denbraber.org/wp-content/uploads/2010/05/Schermafbeelding-2010-05-16-om-21.00.11.png"><img class="alignnone size-full wp-image-36" title="Schermafbeelding 2010-05-16 om 21.00.11" src="http://www.denbraber.org/wp-content/uploads/2010/05/Schermafbeelding-2010-05-16-om-21.00.11.png" alt="" width="704" height="555" /></a></p>
<p>Next thing to do is click on the Connect button. If you’re tunnel is working, you should see output similar to the following:</p>
<pre>2010-05-16 20:59:19 *Tunnelblick: OS X 10.6.3; Tunnelblick 3.0 (build 1437); OpenVPN 2.1.1</pre>
<pre>2010-05-16 21:01:42 *Tunnelblick: Attempting connection with openvpn.conf; Set nameserver = 1; monitoring connection</pre>
<pre>2010-05-16 21:01:42 *Tunnelblick: /Applications/Tunnelblick.app/Contents/Resources/openvpnstart start openvpn.conf 1337 1 0 0 0</pre>
<pre>2010-05-16 21:01:42 *Tunnelblick: /Applications/Tunnelblick.app/Contents/Resources/openvpn --management-query-passwords</pre>
<pre>--cd /Users/rob/Library/Application Support/Tunnelblick/Configurations --daemon --management-hold --management 127.0.0.1 1337</pre>
<pre>--config /Users/rob/Library/Application Support/Tunnelblick/Configurations/openvpn.conf --script-security 2</pre>
<pre>--up "/Applications/Tunnelblick.app/Contents/Resources/client.up.osx.sh"</pre>
<pre>--down "/Applications/Tunnelblick.app/Contents/Resources/client.down.osx.sh" --up-restart</pre>
<pre>2010-05-16 21:01:42 SUCCESS: pid=22922</pre>
<pre>2010-05-16 21:01:42 SUCCESS: real-time state notification set to ON</pre>
<pre>2010-05-16 21:01:42 SUCCESS: real-time log notification set to ON</pre>
<pre>2010-05-16 21:01:42 OpenVPN 2.1.1 i386-apple-darwin10.2.0 [SSL] [LZO2] [PKCS11] built on Feb 24 2010</pre>
<pre>2010-05-16 21:01:42 MANAGEMENT: TCP Socket listening on 127.0.0.1:1337</pre>
<pre>2010-05-16 21:01:42  waiting...</pre>
<pre>2010-05-16 21:01:42 MANAGEMENT: Client connected from 127.0.0.1:1337</pre>
<pre>2010-05-16 21:01:42 MANAGEMENT: CMD 'pid'</pre>
<pre>2010-05-16 21:01:42 MANAGEMENT: CMD 'state on'</pre>
<pre>2010-05-16 21:01:42 MANAGEMENT: CMD 'log on all'</pre>
<pre>2010-05-16 21:01:42 END</pre>
<pre>2010-05-16 21:01:42 MANAGEMENT: CMD 'hold release'</pre>
<pre>2010-05-16 21:01:42 SUCCESS: hold release succeeded</pre>
<pre>2010-05-16 21:01:42 WARNING: No server certificate verification method has been enabled.</pre>
<pre>See http://openvpn.net/howto.html#mitm for more info.</pre>
<pre>2010-05-16 21:01:42 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts</pre>
<pre>2010-05-16 21:01:42 LZO compression initialized</pre>
<pre>2010-05-16 21:01:42 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]</pre>
<pre>2010-05-16 21:01:42 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]</pre>
<pre>2010-05-16 21:01:42 Local Options hash (VER=V4): '41690919'</pre>
<pre>2010-05-16 21:01:42 Expected Remote Options hash (VER=V4): '530fdded'</pre>
<pre>2010-05-16 21:01:42 Socket Buffers: R=[42080-&gt;65536] S=[9216-&gt;65536]</pre>
<pre>2010-05-16 21:01:42 UDPv4 link local: [undef]</pre>
<pre>2010-05-16 21:01:42 UDPv4 link remote: &lt;internet ip-address&gt;:1194</pre>
<pre>2010-05-16 21:01:42</pre>
<pre>2010-05-16 21:01:44</pre>
<pre>2010-05-16 21:01:44  sid=e216f399 26ce1e22</pre>
<pre>2010-05-16 21:01:45  /C=NL/ST=NH/L=dummytown/O=Dummy-Org/CN=Dummy-Org_CA/emailAddress=foo@dummy.org</pre>
<pre>2010-05-16 21:01:45  /C=NL/ST=NH/L=dummytown/O=Dummy-Org/CN=server/emailAddress=foo@dummy.org</pre>
<pre>2010-05-16 21:01:46 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key</pre>
<pre>2010-05-16 21:01:46 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication</pre>
<pre>2010-05-16 21:01:46 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key</pre>
<pre>2010-05-16 21:01:46 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication</pre>
<pre>2010-05-16 21:01:46  1024 bit RSA</pre>
<pre>2010-05-16 21:01:46 [server] Peer Connection Initiated with &lt;internet ip-address&gt;:1194</pre>
<pre>2010-05-16 21:01:47</pre>
<pre>2010-05-16 21:01:49 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)</pre>
<pre>2010-05-16 21:01:49 ifconfig 10.8.0.6 10.8.0.5'</pre>
<pre>2010-05-16 21:01:49 OPTIONS IMPORT: timers and/or timeouts modified</pre>
<pre>2010-05-16 21:01:49 OPTIONS IMPORT: --ifconfig/up options modified</pre>
<pre>2010-05-16 21:01:49 OPTIONS IMPORT: route options modified</pre>
<pre>2010-05-16 21:01:49 ROUTE default_gateway=192.168.100.1</pre>
<pre>2010-05-16 21:01:49 TUN/TAP device /dev/tun0 opened</pre>
<pre>2010-05-16 21:01:49</pre>
<pre>2010-05-16 21:01:49 /sbin/ifconfig tun0 delete</pre>
<pre>2010-05-16 21:01:49 NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure</pre>
<pre>2010-05-16 21:01:49 /sbin/ifconfig tun0 10.8.0.6 10.8.0.5 mtu 1500 netmask 255.255.255.255 up</pre>
<pre>2010-05-16 21:01:49 /Applications/Tunnelblick.app/Contents/Resources/client.up.osx.sh tun0 1500 1542 10.8.0.6 10.8.0.5 init</pre>
<pre>2010-05-16 21:01:49</pre>
<pre>2010-05-16 21:01:49 /sbin/route add -net 192.168.123.0 10.8.0.5 255.255.255.0</pre>
<pre>2010-05-16 21:01:49 /sbin/route add -net 10.8.0.1 10.8.0.5 255.255.255.255</pre>
<pre>2010-05-16 21:01:49 Initialization Sequence Completed</pre>
<pre>2010-05-16 21:01:49 &lt;internet ip-address&gt;</pre>
<p><br class="spacer_" /></p>
<p>Make sure that on your other systems, which you want to connect to remotly, a route is added. In my example I&#8217;ve added a route for the network segment 10.8.0.0 to 192.168.123.200 (my OpenVPN server).</p>
<p><span style="font-family: 'Courier New', 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="font-size: xx-small;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=35</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cas aan het paardrijden</title>
		<link>http://www.denbraber.org/?p=23</link>
		<comments>http://www.denbraber.org/?p=23#comments</comments>
		<pubDate>Fri, 14 May 2010 09:31:57 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[family]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=23</guid>
		<description><![CDATA[Cas tijdens een van zijn eerste paardrijlessen. www.youtube.com/watch?v=qrh6glzXa30]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Cas tijdens een van zijn eerste paardrijlessen.</p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=qrh6glzXa30">www.youtube.com/watch?v=qrh6glzXa30</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring DHCP and DNS on Openfiler 2.3</title>
		<link>http://www.denbraber.org/?p=4</link>
		<comments>http://www.denbraber.org/?p=4#comments</comments>
		<pubDate>Fri, 14 May 2010 06:44:03 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Grid]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.denbraber.org/?p=4</guid>
		<description><![CDATA[For my Oracle 11gR2 RAC Cluster I wanted to test the Grid Naming Service (GNS). Since I used Openfiler 2.3 for my shared storage devices (ASM), I also wanted to use this system as the DHCP and DNS server. A &#8230; <a href="http://www.denbraber.org/?p=4">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For my Oracle 11gR2 RAC Cluster I wanted to test the Grid Naming Service (GNS). Since I used Openfiler 2.3 for my shared storage devices (ASM), I also wanted to use this system as the DHCP and DNS server. A very good document about using Openfiler for ASM devices is written by Jeffrey Hunter and can be found <a href="http://www.oracle.com/technology/pub/articles/hunter-rac11gr2-iscsi.html">here</a>. This document will describe howto install and configure a DHCP server and DNS server on the Openfiler server.</p>
<p><span id="more-4"></span>In this setup I use three networks:</p>
<ol>
<li>This network (192.168.123.0) is attached to my home network and has access to the internet. To install packages on Openfiler you need a access to the internet.</li>
<li>This network (192.168.0.0) is uses for the public network. The listeners, GNS VIP, SCAN VIP, Node VIP and nodes public interface are using this network. DHCP can be used in this network segment for the Nodes VIP and SCAN VIP. Names for this VIPs are resolved by the GNS.</li>
<li>This network (10.0.0.0) is used for the Oracle private interconnect and for the shared storage (ISCSI). The IP addresses of the private interfaces of the RAC nodes can be assigned dynamically.</li>
</ol>
<p>A Grid Naming Service Configuration Example can be found in the Oracle <a href="http://download.oracle.com/docs/cd/E11882_01/install.112/e10812/prelinux.htm">documentation</a>.</p>
<h3>Installing packages on a Openfiler server</h3>
<p lang="en-US">Openfiler uses a packages system, called <a href="http://wiki.rpath.com/wiki/Conary">conary</a>, developed by <a href="http://www.rpath.com/corp/">rPath</a>. Take a look at the <a href="http://wiki.rpath.com/wiki/Conary:QuickReference">QuickReference</a> to learn more about the parameters that can be used with the conary command. It’s important that your Openfiler server has access to the internet to download the extra packages.</p>
<p lang="en-US">Installing a new package is as easy as using the following command:</p>
<pre># conary update &lt;packagename&gt;</pre>
<p lang="en-US">&nbsp;</p>
<p lang="en-US">For the DHCP server and DNS server we need the packages dhcp and bind:runtime. Install both packages:</p>
<pre>[root@openfiler ~]# conary update dhcp</pre>
<pre>Applying update job:</pre>
<pre>Install dhcp(:devel :devellib :doc :lib :runtime)=3.0.7-0.4-1</pre>
<pre>[root@openfiler ~]# conary update bind:runtime</pre>
<pre>Including extra troves to resolve dependencies:</pre>
<pre>bind:lib=9.4.3_P5-1.1-1 info-named:user=1-1-0.1</pre>
<pre>Applying update job 1 of 2:</pre>
<pre>Install info-named(:user)=1-1-0.1</pre>
<pre>Applying update job 2 of 2:</pre>
<pre>Update  bind(:lib) (9.3.4_P1-0.5-1[ipv6,~!pie,ssl] -&gt; 9.4.3_P5-1.1-1)</pre>
<pre>Update  bind-utils(:doc :runtime) (9.3.4_P1-0.5-1[ipv6,~!pie,ssl] -&gt; 9.4.3_P5-1.1-1)</pre>
<pre>Install bind:runtime=9.4.3_P5-1.1-1</pre>
<p lang="en-US">&nbsp;</p>
<p>To query which files are included in the packages you can use the command:</p>
<pre># conary q &lt;packagename&gt; -lsl</pre>
<p lang="en-US">&nbsp;</p>
<p>Take a look at the dhcp package:</p>
<pre>[root@openfiler ~]# conary q dhcp --ls</pre>
<pre>/usr/include/dhcpctl.h</pre>
<pre>/usr/include/isc-dhcp/boolean.h</pre>
<pre>/usr/include/isc-dhcp/dst.h</pre>
<pre>/usr/include/isc-dhcp/int.h</pre>
<pre>/usr/include/isc-dhcp/lang.h</pre>
<pre>/usr/include/isc-dhcp/list.h</pre>
<pre>/usr/include/isc-dhcp/result.h</pre>
<pre>/usr/include/isc-dhcp/types.h</pre>
<pre>/usr/include/omapip/alloc.h</pre>
<pre>/usr/include/omapip/buffer.h</pre>
<pre>/usr/include/omapip/omapip.h</pre>
<pre>/usr/share/man/man3/dhcpctl.3.gz</pre>
<pre>/usr/share/man/man3/omapi.3.gz</pre>
<pre>/usr/share/man/man3/omshell.3.gz</pre>
<pre>/usr/lib64/libdhcpctl.a</pre>
<pre>/usr/lib64/libdst.a</pre>
<pre>/usr/lib64/libomapi.a</pre>
<pre>/usr/share/doc/dhcp-3.0.7/LICENSE</pre>
<pre>/usr/share/doc/dhcp-3.0.7/README</pre>
<pre>/usr/share/doc/dhcp-3.0.7/RELNOTES</pre>
<pre>/usr/share/doc/dhcp-3.0.7/dhcpd.conf.sample</pre>
<pre>/usr/share/man/man1/omshell.1.gz</pre>
<pre>/usr/share/man/man5/dhcp-eval.5.gz</pre>
<pre>/usr/share/man/man5/dhcpd.conf.5.gz</pre>
<pre>/usr/share/man/man5/dhcpd.leases.5.gz</pre>
<pre>/usr/share/man/man8/dhcpd.8.gz</pre>
<pre>/usr/share/man/man8/dhcrelay.8.gz</pre>
<pre>/var/lib/dhcp/dhcpd.leases</pre>
<pre>/etc/init.d/dhcpd</pre>
<pre>/etc/init.d/dhcrelay</pre>
<pre>/etc/sysconfig/dhcpd</pre>
<pre>/etc/sysconfig/dhcrelay</pre>
<pre>/usr/bin/omshell</pre>
<pre>/usr/sbin/dhcpd</pre>
<pre>/usr/sbin/dhcrelay</pre>
<p><br class="spacer_" /></p>
<p>The installation of the packages is done. Next we need to configure both the servers.</p>
<p lang="en-US">&nbsp;</p>
<h3>Configuration of the DHCP server</h3>
<p lang="en-US">&nbsp;</p>
<p>We’re going to configure the DHCP server. Configuration of the DHCP server is done in the file /etc/dhcpd.conf. Since this file is not included in the DHCP package, you need to create it yourself.</p>
<p>Configure DHCP for both the public and the private network. At least the file should contain the following entries:</p>
<pre>ddns-update-style none;</pre>
<pre>allow booting;</pre>
<pre>allow bootp;</pre>
<pre># subnet for the public network</pre>
<pre>subnet 192.168.0.0 netmask 255.255.255.0 {</pre>
<pre>option routers                  192.168.0.1;</pre>
<pre>option subnet-mask              255.255.255.0;</pre>
<pre>option domain-name              "example.com";</pre>
<pre># domain-name-server is this Openfiler server</pre>
<pre>option domain-name-servers      192.168.0.250;</pre>
<pre>range dynamic-bootp 192.168.0.100 192.168.0.150;</pre>
<pre>default-lease-time 21600;</pre>
<pre>max-lease-time 43200;</pre>
<pre>}</pre>
<pre># subnet for the private network</pre>
<pre>subnet 10.0.0.0 netmask 255.255.255.0 {</pre>
<pre>range dynamic-bootp 10.0.0.100 10.0.0.150;</pre>
<pre>default-lease-time 21600;</pre>
<pre>max-lease-time 43200;</pre>
<pre>}</pre>
<p lang="en-US">&nbsp;</p>
<p>Check the configuration file with the command service dhcpd configtest. This only checks for syntax errors.</p>
<p lang="en-US">&nbsp;</p>
<pre>[root@openfiler ~]# service dhcpd configtest</pre>
<pre>Internet Systems Consortium DHCP Server V3.0.7</pre>
<pre>Copyright 2004-2008 Internet Systems Consortium.</pre>
<pre>All rights reserved.</pre>
<pre>For info, please visit http://www.isc.org/sw/dhcp/</pre>
<p lang="en-US">&nbsp;</p>
<p>To start the DHCP server use the following command:</p>
<p lang="en-US">&nbsp;</p>
<pre>[root@openfiler ~]# service dhcpd start</pre>
<pre>Starting dhcpd: Internet Systems Consortium DHCP Server V3.0.7</pre>
<pre>Copyright 2004-2008 Internet Systems Consortium.</pre>
<pre>All rights reserved.</pre>
<pre>For info, please visit http://www.isc.org/sw/dhcp/</pre>
<pre>Wrote 0 leases to leases file.</pre>
<pre>Listening on LPF/eth2/00:0c:29:94:29:56/10.0.0/24</pre>
<pre>Sending on   LPF/eth2/00:0c:29:94:29:56/10.0.0/24</pre>
<pre>Listening on LPF/eth1/00:0c:29:94:29:4c/192.168.0/24</pre>
<pre>Sending on   LPF/eth1/00:0c:29:94:29:4c/192.168.0/24</pre>
<pre>No subnet declaration for eth0 (192.168.123.240).</pre>
<pre>** Ignoring requests on eth0.  If this is not what</pre>
<pre>you want, please write a subnet declaration</pre>
<pre>in your dhcpd.conf file for the network segment</pre>
<pre>to which interface eth0 is attached. **</pre>
<pre>Sending on   Socket/fallback/fallback-net</pre>
<pre>[  OK  ]</pre>
<p lang="en-US">&nbsp;</p>
<p>You can ignore the warning about the subnet declaration for eth0, since we did not configure DHCP for this network segment.</p>
<p lang="en-US">To make sure the DHCP server is started at boottime use the chkconfig command:</p>
<p lang="en-US">&nbsp;</p>
<pre>[root@openfiler ~]# chkconfig dhcpd on</pre>
<pre>[root@openfiler ~]# chkconfig dhcpd --list</pre>
<pre>dhcpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off</pre>
<p lang="en-US">&nbsp;</p>
<p>The configuration of the DHCP server is done.</p>
<p lang="en-US">&nbsp;</p>
<h3>Configuration of the DNS server</h3>
<p lang="en-US">&nbsp;</p>
<p>Configuration of the DNS server is a bit more complicated than the DHCP server. The following files must be created:</p>
<ul>
<li>/etc/named.conf</li>
<li>/srv/named/data/example.com.zone</li>
<li>/srv/named/data/0.168.192.in-addr.arpa.zone</li>
</ul>
<p lang="en-US">The first one contains the main configuration file. The last two contain the information about the zones.</p>
<p>Create the file /etc/named.conf with at least the following content:</p>
<pre>options {</pre>
<pre>directory "/srv/named/data";</pre>
<pre>};</pre>
<pre># forward zone</pre>
<pre>zone "example.com" IN {</pre>
<pre>type master;</pre>
<pre>file "example.com.zone";</pre>
<pre>};</pre>
<pre># reverse zone</pre>
<pre>zone "0.168.192.in-addr.arpa" IN {</pre>
<pre>type master;</pre>
<pre>file "0.168.192.in-addr.arpa.zone";</pre>
<pre>};</pre>
<p lang="en-US">&nbsp;</p>
<p>The file /srv/named/data/example.com.zone should contain the following:</p>
<pre>$ORIGIN .</pre>
<pre>$TTL 86400      ; 1 day</pre>
<pre>example.com     IN SOA  openfiler.example.com. foo.bar.tld. (</pre>
<pre>200612069  ; serial</pre>
<pre>7200       ; refresh (2 hours)</pre>
<pre>300        ; retry (5 minutes)</pre>
<pre>604800     ; expire (1 week)</pre>
<pre>60         ; minimum (1 minute)</pre>
<pre>)</pre>
<pre>NS      openfiler.example.com.</pre>
<pre>$ORIGIN example.com.</pre>
<pre>openfiler                       A       192.168.0.250</pre>
<pre>rac01                           A       192.168.0.101</pre>
<pre>rac02                           A       192.168.0.102</pre>
<pre>; delegation records for the GNS of the rac cluster</pre>
<pre>$ORIGIN cluster.example.com.</pre>
<pre>@                               IN              NS      gns.cluster.example.com.</pre>
<pre>gns.cluster.example.com.        IN              A       192.168.0.200</pre>
<p lang="en-US">&nbsp;</p>
<p>Important in the above configuration file are the delegation entries for the subdomain cluster.example.com.</p>
<p lang="en-US">&nbsp;</p>
<p>The file /srv/named/data/0.168.192.in-addr.arpa.zone should contain:</p>
<p lang="en-US">&nbsp;</p>
<pre>$ORIGIN .</pre>
<pre>$TTL 86400      ; 1 day</pre>
<pre>0.168.192.in-addr.arpa IN SOA openfiler.example.com. foo.bar.tld. (</pre>
<pre>200612066  ; serial</pre>
<pre>7200       ; refresh (2 hours)</pre>
<pre>300        ; retry (5 minutes)</pre>
<pre>604800     ; expire (1 week)</pre>
<pre>60         ; minimum (1 minute)</pre>
<pre>)</pre>
<pre>NS      openfiler.example.com.</pre>
<pre>$ORIGIN 0.168.192.in-addr.arpa.</pre>
<pre>250                     PTR     openfiler.example.com.</pre>
<pre>101                     PTR     rac01.example.com.</pre>
<pre>102                     PTR     rac02.example.com.</pre>
<p lang="en-US">&nbsp;</p>
<p>Start the nameserver with the service command:</p>
<p lang="en-US">&nbsp;</p>
<pre>[root@openfiler ~]# service named start</pre>
<pre>Starting named:                                            [  OK  ]</pre>
<p lang="en-US">&nbsp;</p>
<p>Make sure that the nameserver is started at boottime:</p>
<p lang="en-US">&nbsp;</p>
<pre>[root@openfiler ~]# chkconfig named on</pre>
<pre>[root@openfiler ~]# chkconfig named --list</pre>
<pre>named           0:off   1:off   2:on    3:on    4:on    5:on    6:off</pre>
<p lang="en-US">&nbsp;</p>
<h3>Configuration of RAC nodes</h3>
<p lang="en-US">&nbsp;</p>
<p>To make sure that all the hostnames can be resolved the file /etc/resolv.conf must be edited. Create this file with the following entries:</p>
<pre>search example.com cluster.example.com</pre>
<pre>nameserver 192.168.0.250</pre>
<p><br class="spacer_" /></p>
<p>The first line makes sure that you don’t have to specify the fully qualified host name, if you want to resolve a name in your local network.</p>
<p>To make sure that the file /etc/resolv.conf doesn’t get overwritten by the dhcp configuration of the private interface you have to create the file /etc/dhclient-enter-hooks with the following content:</p>
<pre>make_resolv_conf() {</pre>
<pre>echo "doing nothing to resolv.conf"</pre>
<pre>}</pre>
<p lang="en-US">&nbsp;</p>
<p>More about this can be found <a href="http://www.cyberciti.biz/faq/dhclient-etcresolvconf-hooks/">here</a>.</p>
<p lang="en-US">&nbsp;</p>
<h3>Installation of the Grid Infrastructure</h3>
<p lang="en-US">&nbsp;</p>
<p>When installing the Oracle 11g Release 2 Grid Infrastructure, make sure you choose the Advanced Installation as your installation type. In the screen Grid Plug and Play Information, you need to supply the GNS subdomain name and the GNS VIP Address as specified in the DNS configuration.</p>
<p style="text-align: center;">&nbsp;</p>
<p><a href="http://www.denbraber.org/wp-content/uploads/2010/05/gns_install_screen.png"><img class="alignnone size-full wp-image-14" title="gns_install_screen" src="http://www.denbraber.org/wp-content/uploads/2010/05/gns_install_screen.png" alt="" width="566" height="439" /></a></p>
<p>Just follow the normal installation procedure.</p>
<p lang="en-US">When the installation is finished you can test your new setup with the dig command:</p>
<pre>[root@rac01 logs]# dig rac-scan.cluster.example.com</pre>
<pre>; &lt;&lt;&gt;&gt; DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 &lt;&lt;&gt;&gt; rac-scan.cluster.example.com</pre>
<pre>;; global options:  printcmd</pre>
<pre>;; Got answer:</pre>
<pre>;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 63099</pre>
<pre>;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 1, ADDITIONAL: 0</pre>
<pre>;; QUESTION SECTION:</pre>
<pre>;rac-scan.cluster.example.com.  IN      A</pre>
<pre>;; ANSWER SECTION:</pre>
<pre>rac-scan.cluster.example.com. 120 IN    A       192.168.0.147</pre>
<pre>rac-scan.cluster.example.com. 120 IN    A       192.168.0.146</pre>
<pre>rac-scan.cluster.example.com. 120 IN    A       192.168.0.148</pre>
<pre>;; AUTHORITY SECTION:</pre>
<pre>cluster.example.com.    86400   IN      NS      gns.cluster.example.com.</pre>
<pre>;; Query time: 11 msec</pre>
<pre>;; SERVER: 192.168.0.250#53(192.168.0.250)</pre>
<pre>;; WHEN: Mon Apr 26 18:11:20 2010</pre>
<pre>;; MSG SIZE  rcvd: 160</pre>
<p lang="en-US">&nbsp;</p>
<p>As shown in the output above, the scan address is resolved to 3 different ip-addresses.</p>
<p>There is a bug (9018141) about GNS not removing old SCAN ip-addresses after a DHCP lease expires. On My Oracle Support there’s also a workaround for this bug.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.denbraber.org/?feed=rss2&#038;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
