<?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.annoying.dk &#187; debian</title>
	<atom:link href="http://www.annoying.dk/category/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.annoying.dk</link>
	<description>yet another useless blog</description>
	<lastBuildDate>Wed, 14 Apr 2010 09:00:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>*** buffer overflow detected ***</title>
		<link>http://www.annoying.dk/2008/11/18/buffer-overflow-detected/</link>
		<comments>http://www.annoying.dk/2008/11/18/buffer-overflow-detected/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 10:09:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/?p=45</guid>
		<description><![CDATA[After a system crash, i decided to install the new version of Ubuntu server 8.10, everything went fine with the installation and so on. however, after setting up various programs, i kept getting *** buffer overflow detected *** errors, on different programs, however, only the ones i had compiled myself. it seems like its an [...]]]></description>
			<content:encoded><![CDATA[<p>After a system crash, i decided to install the new version of Ubuntu server 8.10, everything went fine with the installation and so on.</p>
<p><span id="more-45"></span></p>
<p>however, after setting up various programs, i kept getting <strong>*** buffer overflow detected ***</strong> errors,</p>
<p>on different programs, however, only the ones i had compiled myself.</p>
<p>it seems like its an issue with the gcc 4.3 with FORTIFY. and disabling it worked for me.</p>
<p>(remember to <strong>make clean</strong> first)</p>
<blockquote><p>export CFLAGS=-D_FORTIFY_SOURCE=0; ./configure</p></blockquote>
<p>and then do make;make install again.</p>
<p>horay! <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2008/11/18/buffer-overflow-detected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nfs mount: wrong fs type, bad option, bad superblock</title>
		<link>http://www.annoying.dk/2008/09/23/nfs-mount-wrong-fs-type-bad-option-bad-superblock/</link>
		<comments>http://www.annoying.dk/2008/09/23/nfs-mount-wrong-fs-type-bad-option-bad-superblock/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 09:07:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apt]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/?p=37</guid>
		<description><![CDATA[If theres one thing i hate, its error messages that says absolutly nothing usefull, like this one. i had ensured that my exports list was correctly set up, actually, i had it tested from my tvix (was able to browse the share) but from another nix server, i got this message. there&#8217;s probably alot of [...]]]></description>
			<content:encoded><![CDATA[<p>If theres one thing i hate, its error messages that says absolutly nothing usefull, like this one.</p>
<p>i had ensured that my exports list was correctly set up, actually, i had it tested from my tvix (was able to browse the share) but from another nix server, i got this message.</p>
<p><span id="more-37"></span></p>
<p>there&#8217;s probably alot of different solutions for this, since its anything else than accurate error description.</p>
<p>in my case, the other server i tried to access my server from, didnt have the nfs-common package installed.</p>
<p>after installing it, everything went just smooth..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2008/09/23/nfs-mount-wrong-fs-type-bad-option-bad-superblock/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MDADM screwup</title>
		<link>http://www.annoying.dk/2008/08/26/mdadm-screwup/</link>
		<comments>http://www.annoying.dk/2008/08/26/mdadm-screwup/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 12:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/?p=31</guid>
		<description><![CDATA[heres a few errors mdadm might give you, which might not be as easy to find an explanation for.(might just be me) root@xxxx:~# mdadm &#8211;add /dev/md1 /dev/sdj mdadm: add new device failed for /dev/sdj as 2: Invalid argument and from syslog Aug 18 11:35:23 xxxx kernel: [ 3419.147467] md: sdj does not have a valid [...]]]></description>
			<content:encoded><![CDATA[<p>heres a few errors mdadm might give you, which might not be as easy to find an explanation for.(might just be me)</p>
<p><span id="more-31"></span></p>
<p><strong>root@xxxx:~# mdadm &#8211;add /dev/md1 /dev/sdj<br />
mdadm: add new device failed for /dev/sdj as 2: Invalid argument</strong></p>
<p>and from syslog</p>
<p><strong>Aug 18 11:35:23 xxxx kernel: [ 3419.147467] md: sdj does not have a valid v0.90 superblock, not importing!<br />
Aug 18 11:35:23 xxxx kernel: [ 3419.147472] md: md_import_device returned -22</strong></p>
<p>to make a way to long, lame story short, i will post a few notes to self.</p>
<p>1) DO NOT EXPECT YOU CAN CREATE A 2-DISKS RAID-5 ARRAY A AND EXPAND IT LATER</p>
<p>2) DO NOT EXPECT YOU CAN CREATE A 3-DISK RAID-5 ARRAY WITH 1-MISSING DISK AND ADD IT LATER</p>
<p>ydadada, yes, im aware of it, you need at minimum 3 disks. dont ask me why i even tried, but mdadm DIDN&#8217;T complain at all, it just created it.</p>
<blockquote>
<p style="text-align: left;">root@xxx:~# mdadm &#8211;detail /dev/md1<br />
/dev/md1:<br />
Version : 00.90.03<br />
Creation Time : Sun Aug 17 18:52:55 2008<br />
<strong>Raid Level : raid5</strong><br />
Array Size : 976759936 (931.51 GiB 1000.20 GB)<br />
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)<br />
<strong> Raid Devices : 2<br />
Total Devices : 2</strong><br />
Preferred Minor : 1<br />
Persistence : Superblock is persistent</p>
<p>Update Time : Mon Aug 18 11:23:27 2008<br />
<strong>State : clean</strong><br />
<strong>Active Devices : 2</strong><br />
<strong>Working Devices : 2</strong><br />
Failed Devices : 0<br />
Spare Devices : 0</p>
<p>Layout : left-symmetric<br />
Chunk Size : 64K</p>
<p>UUID : e1962bdb:72c36721:46188f91:72750c0f (local to host xxxx)<br />
Events : 0.4</p>
<p>NumberÂ Â  MajorÂ Â  MinorÂ Â  RaidDevice State<br />
<strong> 0Â Â Â Â Â Â  8Â Â Â Â Â Â Â  1Â Â Â Â Â Â Â  0Â Â Â Â Â  active syncÂ Â  /dev/sda1<br />
1Â Â Â Â Â Â  8Â Â Â Â Â Â  17Â Â Â Â Â Â Â  1Â Â Â Â Â  active syncÂ Â  /dev/sdb1</strong></p>
<p style="text-align: left;">
</blockquote>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2008/08/26/mdadm-screwup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ERROR: client.key is a known vulnerable key. See &#8216;man openssl-vulnkey&#8217; for details.</title>
		<link>http://www.annoying.dk/2008/07/15/error-clientkey-is-a-known-vulnerable-key-see-man-openssl-vulnkey-for-details/</link>
		<comments>http://www.annoying.dk/2008/07/15/error-clientkey-is-a-known-vulnerable-key-see-man-openssl-vulnkey-for-details/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 10:47:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apt]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/?p=21</guid>
		<description><![CDATA[After the crypto bug got fixed in debian (and the system got updated via apt) it would prompt one for regeneration of certificates. what i forgot all about, was that of course OpenVPN was affected by this aswell, so after the update and a reboot, all my vpn connections died suddenly. as far as i [...]]]></description>
			<content:encoded><![CDATA[<p>After the crypto bug got fixed in <a title="Debian Openssl bug" href="http://www.theregister.co.uk/2008/05/13/debian_openssl_bug/" target="_blank">debian</a> (and the system got updated via apt) it would prompt one for regeneration of certificates.</p>
<p>what i forgot all about, was that of course OpenVPN was affected by this aswell, so after the update and a reboot, all my vpn connections died suddenly.</p>
<p><span id="more-21"></span></p>
<p>as far as i know, theres no other way to fix this, other than generating new keys, (ca, dh, all of it) since the openvpn server itself wont work anymore.</p>
<p>however, a temp solution until one gets time to generate new keys and certificates could be&#8230;.</p>
<p>sudo mv /usr/sbin/openssl-vulnkey /usr/sbin/openssl-vulnkey.bak</p>
<p>$ sudo mv /usr/sbin/openvpn-vulnkey /usr/sbin/openvpn-vulnkey.bak</p>
<p>$ sudo ln -s /bin/true /usr/sbin/openssl-vulnkey</p>
<p>OpenVPN will now start with the naughty keys and you can at least update the keys.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2008/07/15/error-clientkey-is-a-known-vulnerable-key-see-man-openssl-vulnkey-for-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Server Console &#8211; The process exited with an error, End of error message</title>
		<link>http://www.annoying.dk/2007/11/06/vmware-server-console-the-process-exited-with-an-error-end-of-error-message/</link>
		<comments>http://www.annoying.dk/2007/11/06/vmware-server-console-the-process-exited-with-an-error-end-of-error-message/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 07:50:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/2007/11/06/vmware-server-console-the-process-exited-with-an-error-end-of-error-message/</guid>
		<description><![CDATA[After installing VMware server + console successfully, the client console might bug you with an error message sounding like VMware Server Console The Process exited with an error: End of error message. And tailing the log file might output stuff similar to this foo# tail -f /var/log/vmware/vmware-serverd.log Nov 05 20:34:38: app&#124; Attempting to launch vmx [...]]]></description>
			<content:encoded><![CDATA[<p>After installing VMware server + console successfully, the client console might bug you with an error message sounding like</p>
<p>VMware Server Console</p>
<p>The Process exited with an error:</p>
<p>End of error message.</p>
<p><span id="more-16"></span></p>
<p>And tailing the log file might output stuff similar to this</p>
<blockquote><p>foo# tail -f /var/log/vmware/vmware-serverd.log</p>
<p>Nov 05 20:34:38: app| Attempting to launch vmx : /var/lib/vmware/Virtual Machines/Other Linux 2.6.x kernel/Other Linux 2.6.x kernel.vmx<br />
Nov 05 20:34:38: app| Error during launch: 11, The process exited with an error:<br />
Nov 05 20:34:38: app| End of error message<br />
Nov 05 20:34:38: app| VmsdVmStatePendingCmdFailed: cmd status is already set<br />
Nov 05 20:34:41: app| Msg_Post: Error<br />
Nov 05 20:34:41: app| [msg.vmmonPosix.badVersion] Version mismatch with vmmon module: expecting 138.0, got 137.0.<br />
Nov 05 20:34:41: app| [msg.vmmonPosix.badDriver] You have an incorrect version of the `vmmon&#8217; kernel module.<br />
Nov 05 20:34:41: app| <strong>Try reinstalling VMware Server</strong>.<br />
Nov 05 20:34:41: app| [localized] Version mismatch with vmmon module: expecting 138.0, got 137.0.<br />
Nov 05 20:34:41: app| You have an incorrect version of the `vmmon&#8217; kernel module.<br />
Nov 05 20:34:41: app| <strong>Try reinstalling VMware Server</strong>.<br />
Nov 05 20:34:41: app| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Nov 05 20:34:41: app| Msg_Post: Version mismatch with vmmon module: expecting 138.0, got 137.0.<br />
Nov 05 20:34:41: app| You have an incorrect version of the `vmmon&#8217; kernel module.<br />
Nov 05 20:34:41: app| <strong>Try reinstalling VMware Server</strong>.<br />
Nov 05 20:34:41: app|<br />
Nov 05 20:34:41: app| Msg_Post: Error<br />
Nov 05 20:34:41: app| [msg.vmmonPosix.initFailed] Failed to initialize monitor device.<br />
Nov 05 20:34:41: app| [localized] Failed to initialize monitor device.<br />
Nov 05 20:34:41: app| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Nov 05 20:34:41: app| Msg_Post: Failed to initialize monitor device.</p></blockquote>
<p>yea..its actually true, just reinstalling the vmware server solves the problem (no need to uninstall it first) and its pretty quick since you can skip the networking configuration (its been saved)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2007/11/06/vmware-server-console-the-process-exited-with-an-error-end-of-error-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unable to build the vmmon module</title>
		<link>http://www.annoying.dk/2007/10/29/unable-to-build-the-vmmon-module/</link>
		<comments>http://www.annoying.dk/2007/10/29/unable-to-build-the-vmmon-module/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 09:48:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/2007/10/29/unable-to-build-the-vmmon-module/</guid>
		<description><![CDATA[I constantly get annoying messages from this ugly person which i would mostly describe as the human version of Peter Griffin from family guy. -&#62; superjoachim.dk so in order to make it stop, i decided to try and help him with vmware server installation which he fucked up (can&#8217;t prove it, but all the evidence [...]]]></description>
			<content:encoded><![CDATA[<p>I constantly get annoying messages from this ugly person which i would mostly describe as the human version of Peter Griffin from family guy. -&gt; <a href="http://www.superjoachim.dk" title="taberjoachim">superjoachim.dk</a></p>
<p>so in order to make it stop, i decided to try and help him with vmware server installation which he fucked up (can&#8217;t prove it, but all the evidence points to him)</p>
<p>Anyway, while trying to install it, one might encounter an error message like this</p>
<p><span id="more-15"></span></p>
<blockquote><p>What is the location of the directory of C header files that match your running<br />
kernel? [/lib/modules/2.6.23.1-foo/build/include]</p>
<p>Extracting the sources of the vmmon module.</p>
<p>Building the vmmon module.</p>
<p>Using 2.6.x kernel build system.<br />
make: Entering directory `/tmp/vmware-config0/vmmon-only&#8217;<br />
make -C /lib/modules/2.6.23.1-dewey/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules<br />
make[1]: Entering directory `/usr/src/linux-2.6.23.1&#8242;<br />
CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o<br />
/tmp/vmware-config0/vmmon-only/linux/driver.c: In function Ã¢LinuxDriver_IoctlÃ¢:<br />
/tmp/vmware-config0/vmmon-only/linux/driver.c:1659: error: Ã¢struct mm_structÃ¢ has no member named Ã¢dumpableÃ¢<br />
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1<br />
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2<br />
make[1]: Leaving directory `/usr/src/linux-2.6.23.1&#8242;<br />
make: *** [vmmon.ko] Error 2<br />
make: Leaving directory `/tmp/vmware-config0/vmmon-only&#8217;<br />
Unable to build the vmmon module.</p>
<p>For more information on how to troubleshoot module-related problems, please<br />
visit our Web site at &#8220;http://www.vmware.com/download/modules/modules.html&#8221; and<br />
&#8220;http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html&#8221;.</p>
<p>Execution aborted.</p></blockquote>
<p>i&#8217;d like to point out a few things that you would most likely want to install to make the installation go smooth.</p>
<blockquote><p>apt-get install libx11-6 libx11-dev libxtst6 libxtst-dev libxt6 libxt-dev wget linux-headers-`uname -r` build-essential make gcc g++</p></blockquote>
<p>i might be missing some, or some of them might not be needed, but I&#8217;m too careless to check it out, so feel free to bug me if you see something wrong.</p>
<p>IF it whines about the same error again, the cause of this might be that your running a newer kernel than the installer requires, if so, there&#8217;s a patch out which solves the problem. beware that when your reading this, the direct link to the patch i post, might already be outdated, so be sure to check if there&#8217;s a newer version out. currently when writing this, version 114 is out.</p>
<p>So lets do it.</p>
<p><strong>foo:/usr/src# wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update114.tar.gz</strong></p>
<p><strong>foo:/usr/src# tar zxfv vmware-any-any-update114.tar.gz</strong></p>
<p><strong>foo:/usr/src# cd vmware-any-any-update114</strong></p>
<p><strong>foo:/usr/src/vmware-any-any-update114# ./runme.pl</strong></p>
<p>should spit out something smiliar to this</p>
<blockquote><p>Updating /usr/bin/vmware-config.pl &#8230; already patched<br />
Updating /usr/bin/vmware &#8230; No patch needed/available<br />
Updating /usr/bin/vmnet-bridge &#8230; No patch needed/available<br />
Updating /usr/lib/vmware/bin/vmware-vmx &#8230; No patch needed/available<br />
Updating /usr/lib/vmware/bin-debug/vmware-vmx &#8230; No patch needed/available<br />
VMware modules in &#8220;/usr/lib/vmware/modules/source&#8221; has been updated.</p></blockquote>
<p>and from there, the installation should succeed <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2007/10/29/unable-to-build-the-vmmon-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Couldn&#8217;t set tty to PPP discipline: Invalid argument</title>
		<link>http://www.annoying.dk/2007/10/29/couldnt-set-tty-to-ppp-discipline-invalid-argument/</link>
		<comments>http://www.annoying.dk/2007/10/29/couldnt-set-tty-to-ppp-discipline-invalid-argument/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 23:06:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/2007/10/29/couldnt-set-tty-to-ppp-discipline-invalid-argument/</guid>
		<description><![CDATA[So, here we are again. i finally got fiber, unfortunately its via PPPoE (dont ask). Â At least the client has improved over the years since i last used it, which must have been 7 years ago or something. anyway, my memory isn&#8217;t what it used to b&#8230;hmm, nevermind. my memory more or lessÂ always [...]]]></description>
			<content:encoded><![CDATA[<p>So, here we are again. i finally got fiber, unfortunately its via PPPoE (dont ask).</p>
<p>Â At least the client has improved over the years since i last used it, which must have been 7 years ago or something. anyway, my memory isn&#8217;t what it used to b&#8230;hmm, nevermind. my memory more or lessÂ always fails to remember anything at all, so of course i ran into problems again. here&#8217;s some output from /var/log/syslog after trying to start pppoe.</p>
<p>Â (i actually did compile a new kernel with support for PPP, but i forgot something&#8230;)</p>
<blockquote><p>Oct 26 23:39:16 foo pppd[3069]: pppd 2.4.4 started by root, uid 0<br />
Oct 26 23:39:16 foo pppd[3069]: Serial connection established.<br />
Oct 26 23:39:16 foo pppd[3069]: Couldn&#8217;t set tty to PPP discipline: Invalid argument<br />
Oct 26 23:39:16 foo pppoe[3071]: PADS: Service-Name: &#8221;<br />
Oct 26 23:39:16 foo pppoe[3071]: PPP session is 41216 (0xa100)<br />
Oct 26 23:39:16 foo pppoe[3071]: read (asyncReadFromPPP): Session 41216: Input/output error<br />
Oct 26 23:39:16 foo pppoe[3071]: Sent PADT<br />
Oct 26 23:39:46 foo pppd[3069]: Serial connection established.</p></blockquote>
<p>In short,i forgot to compile support for <em>&#8220;PPP support for async serial ports&#8221;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2007/10/29/couldnt-set-tty-to-ppp-discipline-invalid-argument/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting WOL(wake on lan) to work over the internet</title>
		<link>http://www.annoying.dk/2007/10/22/getting-wolwake-on-lan-to-work-over-the-internet/</link>
		<comments>http://www.annoying.dk/2007/10/22/getting-wolwake-on-lan-to-work-over-the-internet/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 13:07:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.annoying.dk/2007/10/22/getting-wolwake-on-lan-to-work-over-the-internet/</guid>
		<description><![CDATA[It surprises me that there&#8217;s a lot of people out there who know about WOL (wake on lan), the ability to Remotely turn on your pc/server via the network card. But doesnt know that you can do it from the Internet, and not just on your home network. This howto, shortly explains how to set [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span lang="EN-GB">It surprises me that there&#8217;s a lot of people out there who know about WOL (wake on lan), the ability to <o:p></o:p><br />
Remotely turn on your pc/server via the network card. But doesnt know that you can do it from the Internet, and not just on your home network. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p>This howto, shortly explains how to set it up on Linux, and covers possible problems you might encounter.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p>Anyway, lets get going!</span></p>
<p><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"> <span id="more-12"></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB">In order to wake up a computer from the Internet you need a Broadband connection with a Router connected to the Modem that keeps your connection alive (you need a Router even if you have Static IP).<o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB">Other articles on the net might referrer to a little cable thatâ€™s used to connect the NIC with the motherboard, for powering it on, however, on newer computers this isnâ€™t necessary anymore as it works via PCI, and only need to be enabled in the bios (might be called something like Wake on PCI). But if you donâ€™t have an on-board NIC, but and old sucky 10/10Mbit..then..well..good luck <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">If you use Debian as in this case, fire up apt-get, and install ethtool<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p><strong>apt-get install ethtool</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p>and if you donâ€™t. then grab it from <a href="http://sourceforge.net/project/showfiles.php?group_id=3242&amp;package_id=19201" title="sourceforge.net" target="_blank">sourceforge.net</a><br />
</span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now, use <strong>ifconfig</strong> to check what your interface is called (most likely eth0)<o:p></o:p><br />
And run <strong>ethtool</strong> with it like<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p><strong>Ethtool eth0</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Which will spit out something similar to<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<blockquote><p><span lang="EN-GB">Settings for eth0:<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Supported ports: [ TP ]<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Supported link modes:<span>   </span>10baseT/Half 10baseT/Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>                                </span>100baseT/Half 100baseT/Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>                                </span>1000baseT/Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Supports auto-negotiation: Yes<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Advertised link modes:<span>  </span>10baseT/Half 10baseT/Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>                                </span>100baseT/Half 100baseT/Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>                                </span>1000baseT/Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Advertised auto-negotiation: Yes<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Speed: 1000Mb/s<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Duplex: Full<o:p></o:p></span><br />
<span lang="EN-GB"><span>   </span><span>     </span>Port: Twisted Pair<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>PHYAD: 0<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Transceiver: internal<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Auto-negotiation: on<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span><strong>Supports Wake-on: umbg<o:p></o:p></strong></span><br />
<span lang="EN-GB"><span>        </span><strong>Wake-on: d<o:p></o:p></strong></span><br />
<span lang="EN-GB"><span>        </span>Current message level: 0&#215;00000007 (7)<o:p></o:p></span><br />
<span lang="EN-GB"><span>        </span>Link detected: yes<o:p></o:p></span></p></blockquote>
<p class="MsoNormal"><span lang="EN-GB"><span> </span><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Notice the â€œ<strong>Supports Wake-on</strong>â€ says <strong>umbg</strong>, but â€œ<strong>Wake-on</strong>â€ says <strong>d</strong> (disabled)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p><br />
</o:p>If we take a short look on the manpage for <strong>ethtool</strong> it says.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<blockquote>
<p class="MsoNormal"><span lang="EN-GB"><span>       </span><em>wol p|u|m|b|a|g|s|d&#8230;<o:p></o:p></em></span></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>Sets Wake-on-LAN options.<span>  </span>Not all devices support this.<span>  </span>The argument to this option is a string of characters specifying<span>  </span>which<span>  </span>options<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>to enable.<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>p<span>  </span>Wake on phy activity<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>u<span>  </span>Wake on unicast messages<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>m<span>  </span>Wake on multicast messages<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>b<span>  </span>Wake on broadcast messages<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>a<span>  </span>Wake on ARP<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>g<span>  </span>Wake on MagicPacket(tm)<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>              </span>s<span>  </span>Enable SecureOn(tm) password for MagicPacket(tm)<o:p></o:p></span></em></p>
<p class="MsoNormal"><span lang="EN-GB"><em><span>              </span>d<span>  </span>Disable (wake on nothing).<span>  </span>This option clears all previous options.</em><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">So we can see it supports umbg, but currently its set to d for disabled.</p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>all good so far. so in this case, we will be using the MagicPacket method to wake it up</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>so fire up <strong>ethtool</strong> with the command. </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>ethtool â€“s eth0 wol g</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Doing <strong>ethtool eth0</strong> again, should now show <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><span>        </span><strong>Wake-on: g<o:p></o:p></strong></span></p>
<p class="MsoNormal"><strong><span lang="EN-GB"><o:p> </o:p></span></strong></p>
<p class="MsoNormal"><span lang="EN-GB">Horay!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB">Now you should open a port on your router. Doesnt really matter which one you pick,so for all you people with a fetish for good looking numbers, you can just choose you&#8217;re desired one.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">in this example I&#8217;m using port 8000 (such a nice number isn&#8217;t it?) <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p>so open port 8000 protocol udp, in your router, and forward it to your machineâ€™s internal ip.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>Ifconfig</strong> will show..</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<blockquote>
<p class="MsoNormal"><em><span lang="EN-GB">eth0<span>      </span>Link encap:Ethernet<span>  </span>HWaddr <strong>00:41:63:DD:78:60</strong><o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>inet addr:<strong>10.0.0.56</strong><span>  </span>Bcast:10.0.0.255<span>  </span>Mask:255.255.255.0<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>inet6 addr: fe80::240:63ff:fedd:7860/64 Scope:Link<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>UP BROADCAST RUNNING MULTICAST<span>  </span>MTU:1500<span>  </span>Metric:1<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>RX packets:12193206 errors:0 dropped:0 overruns:0 frame:0<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>TX packets:12300751 errors:0 dropped:0 overruns:0 carrier:0<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>collisions:0 txqueuelen:1000<o:p></o:p></span></em></p>
<p class="MsoNormal"><em><span lang="EN-GB"><span>          </span>RX bytes:2652858583 (2.4 GiB)<span>  </span>TX bytes:1613681546 (1.5 GiB)<o:p></o:p></span></em></p>
<p class="MsoNormal"><span lang="EN-GB"><em><span>          </span>Interrupt:11 Base address:0xe400</em><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB">So we forward port 8000/udp to 10.0.0.56. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">While we&#8217;re at it. Write down <strong> 00:41:63:DD:78:60</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Since we need the mac address to wake it up from its beauty sleep.(sounds gay I know)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p><br />
</o:p>Now you might as well just kill it (shutdown â€“hP now) since we need to test.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now, if you want to power it on from another Linux machine, go get <strong>wakeonlan</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>apt-get install wakeonlan</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p>and type<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">#<strong>wakeonlan -i ip/dns -p port mac-adress</strong></p>
<p class="MsoNormal"><span lang="EN-GB">In my case<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">#<strong>wakeonlan â€“i annoying.dk â€“p 8000 00:41:63:DD:78:60</strong><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">And it should say something like</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p><em>Sending magic packet to annoying.dk:8000 with 00:41:63:DD:78:60</em><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB">Now, hopefully, it should start powering on your machine.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p><br />
Another way to do it, its from a free service at <a href="http://www.depicus.com/wake-on-lan/woli.aspx" title="depicus.com">depicus.com</a></span></p>
<p class="MsoNormal">which lets you power it on online from their site.</p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p>Here you enter the same information, and subnetmask 255.255.255.240 or 255.255.255.255<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">depending on your setup. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Or just go get their program from<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p><a href="http://www.depicus.com/wake-on-lan/wake-on-lan-gui.aspx">http://www.depicus.com/wake-on-lan/wake-on-lan-gui.aspx</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">If your looking for the windows way to set this up, I can recommend looking at<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><a href="http://www.raymond.cc/blog/archives/2007/10/21/how-to-remotely-turn-on-computer-from-lan-and-wan/" title="www.Raymond.cc blog">www.raymond.cc</a><o:p></o:p></span></p>
<p><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">which should cover it all up. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now. If all of this doesn&#8217;t work. You should try testing in on your local network first, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">If it still donâ€™t work. And you manually booted up the machine again<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Check with &#8220;<strong>ethtool eth0</strong>&#8221;  to see if it set itself back to â€œdâ€ instead of g.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">If its still set to g, it should really work. And I&#8217;m too lazy to write possible causes, so good luck. <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span><span style="font-family: Wingdings" lang="EN-GB"><span></span></span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Everything works pretty much out of the box if you shut down Linux with poweroff etc. as you usually do. But if the ac power is lost while the machine is powered down waiting for wakeup, the wake up-call won&#8217;t work anymore when the power is restored. The nicâ€™s I guess sometimes seem to reset themselves and have to be set with ethtool again.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">This can however easily be done with a small startup script, or similar ways which I wont cover up this time. (I will I probably update it later on if people bitch enough)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now. If its set itself back to d, here&#8217;s a possible solution.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Edit /etc/init.d/networking and comment out<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">&#8220;ifdown -a &#8211;exclude=lo&#8221;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">And it should do the trick. And yes, I have no clue at this point why it should work, so just hope for the best <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">all suggestions are welcome.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Enjoy!</p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p><br />
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><span> </span><o:p></o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2007/10/22/getting-wolwake-on-lan-to-work-over-the-internet/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quick simple tutorial/howto on OpenVPN with Debian</title>
		<link>http://www.annoying.dk/2007/10/14/quick-simple-tutorialhowto-on-openvpn-with-debian/</link>
		<comments>http://www.annoying.dk/2007/10/14/quick-simple-tutorialhowto-on-openvpn-with-debian/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 17:22:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.annoying.dk/?p=10</guid>
		<description><![CDATA[Heres a small text on how to set up OpenVPN on linux debian, nothing fancy at all, and most likely missing a lot of small things. but that will be updated later on when i got time. Any suggestions are of course welcome. This is however, just as much a little reminder for myself since [...]]]></description>
			<content:encoded><![CDATA[<p>Heres a small text on how to set up OpenVPN on linux debian, nothing fancy at all, and most likely missing a lot of small things. but that will be updated later on when i got time. Any suggestions are of course welcome. This is however, just as much a little reminder for myself since i got a memory as a goldfish with alzheimer&#8217;s.</p>
<p>Lets start with installing OpenVPN. for this we need -&gt;<br />
<span id="more-10"></span><br />
<strong>apt-get install openvpn<br />
apt-get install openssl</strong></p>
<p>which in the end should say something like&#8230;</p>
<blockquote><p><em>Setting up openvpn (2.0.9-8) &#8230;<br />
Starting virtual private network daemon:. </em></p></blockquote>
<p>and it will fail, since there&#8217;s no default configuration and certificates and stuff.</p>
<p>The first thing we need to do, is to create them, so find the easy-rsa folder, which is most likely located at</p>
<p><em>/usr/share/doc/openvpn/examples/easy-rsa</em></p>
<p>if this is not the case, do <strong>updatedb; locate easy-rsa</strong></p>
<p>and it should output its location.</p>
<p>Lets move this folder to a better location</p>
<p><strong>cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn/</strong></p>
<p>now change directory to <em>/etc/openvpn/easy-rsa/2.0</em></p>
<p>Now with your favorite editor, edit the file in easy-rsa called <strong>vars</strong> (nano vars) for example.</p>
<p>In the bottom of this file, it should look something like</p>
<blockquote><p><em>export KEY_COUNTRY=DK<br />
export KEY_PROVINCE=NA<br />
export KEY_CITY=foocity<br />
export KEY_ORG=&#8221;OpenVPN&#8221;<br />
export KEY_EMAIL=&#8221;foo@annoying.dk&#8221;</em></p></blockquote>
<p>except that i changed a few of the values so it fits my need. This isn&#8217;t really necessarily but will save you some time in the end, since you otherwise would have to enter it all manually multiple times later in this howto.</p>
<p>Save the file, and lets get on to the next step.</p>
<p><em>initialize the PKI</em></p>
<p><strong>. ./vars</strong></p>
<p>yes..there&#8217;s 2 dots, its supposed to be like that, so type it exactly like that. (i cant recommend using screen at this point, since it fucks up the env)</p>
<p>now do</p>
<p><strong>./clean-all</strong></p>
<p>and finally</p>
<p><strong>./build-ca</strong></p>
<p>The command (build-ca) will build the certificate authority (CA) certificate.</p>
<p>and should look something like..</p>
<blockquote><p><em>foo:/etc/openvpn/easy-rsa/2.0# <strong>./build-ca</strong><br />
Generating a 1024 bit RSA private key<br />
&#8230;++++++<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#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) [DK]:<br />
State or Province Name (full name) [NA]:<br />
Locality Name (eg, city) [foocity]:<br />
Organization Name (eg, company) [OpenVPN]:<br />
Organizational Unit Name (eg, section) []:<br />
Common Name (eg, your name or your server&#8217;s hostname) []:<strong>foo-server-ca</strong><br />
Email Address [foo@annoying.dk]:</em></p></blockquote>
<p>Note that in the above sequence, most queried parameters were defaulted to the values set in the vars file.<br />
The only parameter which must be explicitly entered is the Common Name. In the example above, I used &#8220;foo-server-ca&#8221;. as marked with <strong>bold</strong></p>
<p>Next, we will generate a certificate and private key for the server.<br />
<strong>./build-key-server server </strong></p>
<p>which again, will output something similar to this.</p>
<blockquote><p><em>foo:/etc/openvpn/easy-rsa/2.0# <strong>./build-key-server server</strong><br />
Generating a 1024 bit RSA private key<br />
&#8230;&#8230;&#8230;++++++<br />
&#8230;&#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) [DK]:<br />
State or Province Name (full name) [NA]:<br />
Locality Name (eg, city) [foocity]:<br />
Organization Name (eg, company) [OpenVPN]:<br />
Organizational Unit Name (eg, section) []:<br />
<strong>Common Name</strong> (eg, your name or your server&#8217;s hostname) []:<strong>server</strong></em></p></blockquote>
<p>As again, the only value that had to be explicitly entered was <strong>Comon Name</strong>. Enter <strong>server</strong> here.</p>
<p>Now we will generate certificates &amp; keys for 1 client. you can create as many as you like, as long as they got unique names.</p>
<p>this example, we create it without password auth. if you wish to force your clients to use a password of your desire, simply use <strong>./build-key-pass </strong>instead.</p>
<p><strong>./build-key foo1</strong></p>
<p>should give us</p>
<blockquote><p><em>foo:/etc/openvpn/easy-rsa/2.0# <strong>./build-key foo1</strong><br />
Generating a 1024 bit RSA private key<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..++++++<br />
&#8230;&#8230;&#8230;&#8230;..++++++<br />
writing new private key to &#8216;foo1.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) [DK]:<br />
State or Province Name (full name) [NA]:<br />
Locality Name (eg, city) [foocity]:<br />
Organization Name (eg, company) [OpenVPN]:<br />
Organizational Unit Name (eg, section) []:<br />
<strong>Common Name</strong> (eg, your name or your server&#8217;s hostname) []:<strong>foo1</strong><br />
Email Address [foo@annoying.dk]:</em></p>
<p><em>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/easy-rsa/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 <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;DK&#8217;<br />
stateOrProvinceName <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;NA&#8217;<br />
localityName <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;foocity&#8217;<br />
organizationName <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;OpenVPN&#8217;<br />
commonName <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;foo1&#8242;<br />
emailAddress :IA5STRING:&#8217;foo@annoying.dk&#8217;<br />
Certificate is to be certified until Oct 11 15:56:29 2017 GMT (3650 days)<br />
Sign the certificate? [y/n]:y</em></p>
<p><em>1 out of 1 certificate requests certified, commit? [y/n]y<br />
Write out database with 1 new entries<br />
Data Base Updated </em></p></blockquote>
<p>Again, the &#8220;Common Name&#8221; is the name of the client, in this case foo1.</p>
<p>When it asks for <em>A challenge password , </em>just hit enter.</p>
<p>Generate Diffie Hellman parameters.</p>
<p><strong>./build-dh</strong></p>
<p>This command can take a little time, depending on your hardware.</p>
<blockquote><p><em>foo:/etc/openvpn/easy-rsa/2.0# ./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;.<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;<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;<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;<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;..<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+&#8230;&#8230;&#8230;..++*++*++*</em></p></blockquote>
<p>We should now have a new folder inside of easy-rsa called keys (/etc/openvpn/easy-rsa/keys/)</p>
<p>it contains a bunch of files, some for the server and others for the clients.</p>
<p>Copy ca.crt ca.key dh1024.pem server.crt server.key into openvpn root folder</p>
<p><strong>cd /etc/openvpn/easy-rsa/2.0/keys</strong></p>
<p><strong>cp ca.crt ca.key dh1024.pem server.crt server.key</strong> <strong>/etc/openvpn</strong></p>
<p>now jump back to the openvpn root folder (/etc/openvpn/)</p>
<p>and use your editor, in this case nano, to edit/create the server configuration file.</p>
<p><strong>nano openvpn.conf</strong></p>
<p>and copy past</p>
<blockquote><p><em>port 1194<br />
proto tcp<br />
dev tun<br />
ca ca.crt<br />
cert server.crt<br />
key server.key<br />
dh dh1024.pem<br />
server 172.16.0.0 255.255.255.0<br />
ifconfig-pool-persist ipp.txt<br />
keepalive 10 120<br />
comp-lzo<br />
user nobody<br />
group users<br />
persist-key<br />
persist-tun<br />
status openvpn-status.log<br />
verb 3<br />
client-to-client</em></p></blockquote>
<p>Remove the last line &#8220;client-to-client&#8221; if you don&#8217;t wish your clients to be able to communicate together.</p>
<p>save the file. and lets see if we can get it up running.</p>
<p><strong>/etc/init.d/openvpn start<br />
</strong><em>Starting virtual private network daemon: openvpn(OK). </em></p>
<p>perfect. lets just double check by running ifconfig. (it might take a few seconds before it appears in ifconfig)</p>
<p><strong>ifconfig</strong></p>
<blockquote><p><em>tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br />
inet addr:172.16.0.1 P-t-P:172.16.0.2 Mask:255.255.255.255<br />
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:100<br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) </em></p></blockquote>
<p>hooray. seems like its up running <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, if you got a client machine, which you installed openvpn on, copy the files down below to its /etc/openvpn/ folder.</p>
<p><strong><em>ca.crt foo1.crt foo1.key</em></strong></p>
<p>(they should be located in the folder /etc/openvpn/easy-rsa/2.0/keys/ on the server)</p>
<p>now, on the client machine, lets create/edit the configuration file.</p>
<p><strong>nano /etc/openvpn/openvpn.conf</strong></p>
<p>and copy past this</p>
<blockquote><p><em>client<br />
dev tun<br />
proto tcp<br />
remote <strong>ip-or-hostname-of-your-openvpn-server</strong> 1194<br />
resolv-retry infinite<br />
nobind<br />
persist-key<br />
persist-tun<br />
ca ca.crt<br />
cert foo1.crt<br />
key foo1.key<br />
comp-lzo<br />
verb 3</em></p></blockquote>
<p>and save it. and as on the server, lets try and start it.</p>
<p><strong>/etc/init.d/openvpn start<br />
</strong><em>Starting virtual private network daemon: openvpn(OK).</em></p>
<p>hooray!</p>
<p>and like before,lets check again (it might take a few seconds before it appears in ifconfig)</p>
<p><strong>ifconfig</strong></p>
<blockquote><p><em>tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br />
inet addr:172.16.0.2 P-t-P:172.16.0.5 Mask:255.255.255.255<br />
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:100<br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)</em></p></blockquote>
<p>and test if we can ping it.</p>
<p><strong>ping 172.16.0.1</strong></p>
<blockquote><p><em>PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.</em><br />
<em>64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=56.1 ms </em></p></blockquote>
<p>perfect.</p>
<p>Now, for your clients to be able to reach the other machines on your network, do;</p>
<blockquote><p>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</p></blockquote>
<p>(you might want to include this in your boot script, or firewall script)</p>
<p>and on your linuxÂ box do;</p>
<blockquote><p>route add -net 172.16.0.0 netmask 255.255.255.0 gw 192.168.1.7</p></blockquote>
<p>and your windows box</p>
<blockquote><p>route -p add 172.16.0.0 mask 255.255.255.0 192.168.1.7</p></blockquote>
<p>remember to replace 192.168.1.7 with your servers real ip.</p>
<p>Your done! <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A little sitenote..</p>
<p>If you want, you easily set up a windows based client instead. So either grab the installation from <a title="Openvpn.se" href="http://openvpn.net" target="_blank">OpenVPN.net</a><br />
or if you fantasize in the night about sexy gui&#8217;s, grab the gui version from <a title="Openvpn.se gui" href="http://openvpn.se">OpenVPN.se</a></p>
<p>All you really need to do after installing it, is to place your certs and configuration file in C:\Program Files\OpenVPN\config\</p>
<p>now you can either start it from services, or if you use the gui version, right click it and choose connect <img src='http://www.annoying.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2007/10/14/quick-simple-tutorialhowto-on-openvpn-with-debian/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>The following signatures couldn&#8217;t be verified because the public key is not available: NO_PUBKEY xxx</title>
		<link>http://www.annoying.dk/2007/10/11/the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available-no_pubkey-xxx/</link>
		<comments>http://www.annoying.dk/2007/10/11/the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available-no_pubkey-xxx/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 08:38:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apt]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.annoying.dk/?p=5</guid>
		<description><![CDATA[While upgrading Debian, you might experience difficulties like # apt-get update Get:1 http://ftp.dk.debian.org lenny Release.gpg [189B] Ign http://ftp.dk.debian.org lenny/main Translation-en_DK Hit http://ftp.dk.debian.org lenny Release Hit http://ftp.dk.debian.org lenny/main Packages/DiffIndex Hit http://ftp.dk.debian.org lenny/main Sources/DiffIndex Fetched 1B in 4s (0B/s) Reading package lists&#8230; Done W: GPG error: http://ftp.dk.debian.org lenny Release: The following signatures couldn&#8217;t be verified because the [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span lang="EN-GB">While upgrading Debian, you might experience difficulties like</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"># <strong>apt-get update</strong><br />
</span></p>
<blockquote>
<p class="MsoNormal"><span lang="EN-GB">Get:1 http://ftp.dk.debian.org lenny Release.gpg [189B]<br />
Ign http://ftp.dk.debian.org lenny/main Translation-en_DK<br />
Hit http://ftp.dk.debian.org lenny Release<br />
Hit http://ftp.dk.debian.org lenny/main Packages/DiffIndex<br />
Hit http://ftp.dk.debian.org lenny/main Sources/DiffIndex<br />
Fetched 1B in 4s (0B/s)</span></p>
<p class="MsoNormal"><span lang="EN-GB">Reading</span><span lang="EN-GB"> package lists&#8230; Done</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p><span lang="EN-GB"> </span><span lang="EN-GB">W: GPG error: http://ftp.dk.debian.org lenny Release: The following signatures couldn&#8217;t be verified because the public key is not available: NO_PUBKEY D5642BC86823D007 </span><br />
<span lang="EN-GB"> W: You may want to run apt-get update to correct these problems </span><br />
<span lang="EN-GB"> </span></p></blockquote>
<p class="MsoNormal"><span lang="EN-GB"> </span><br />
<span id="more-5"></span></p>
<p class="MsoNormal"><span lang="EN-GB"> This can be caused by a dist-upgrade or various other reasons, to keep it short, I will post</span></p>
<p class="MsoNormal"><span lang="EN-GB">A few possible solutions to this.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">#<strong>apt-key update</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">This will obtain the necessary keys and import them. No need to go through gpg directly.<br />
if above doesnt do the trick, heres another solution(might fail tho, if apt wont let you update/install)</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"># <strong>apt-get install debian-archive-keyring</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">in case this doesnt do the trick neither, it might be caused by old expired keys which didnt get updated while installing debian-archive-keyring. so heres a way to take care of that..</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">#<strong>apt-key list</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">which will list currently active and expired keys.<br />
then eg. do</span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>#apt-key del 1DB114E0<br />
#apt-key del 4F368D5D<br />
#apt-key del 2D230C5F</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">or simply</span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>#apt-key del</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB">to erase all expired keys marked for deletion.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Then finally.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>#apt-get remove &#8211;purge debian-archive-keyring<br />
#apt-get install debian-archive-keyring</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Now, if youre just plain unlucky, something fucks up, or you just want to try another way to solve it.<br />
you can do it with gpg manually.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">the procedure is.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>#gpg &#8211;keyserver &lt;keyserver&gt; &#8211;recv-keys &lt;pubkeynumber&gt;<br />
#gpg &#8211;armor &#8211;export &lt;keynumber&gt; | apt-key add -</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">eg.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>#gpg &#8211;keyserver pgp.mit.edu &#8211;recv-keys D5642BC86823D007 </strong># this being the pub_key you got earlier.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">which should result in something like</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<blockquote>
<p class="MsoNormal"><span lang="EN-GB">gpg: requesting key 8722E71E from hkp server pgp.mit.edu<br />
gpg: key 8722E71E: public key &#8220;secure-testing Archive key 2005-7 &lt;katie@secure-testing.debian.net&gt;&#8221; imported </span></p>
<p class="MsoNormal"><span lang="EN-GB">gpg: no ultimately trusted keys found<br />
gpg: Total number processed: 1<br />
gpg: imported: 1</span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Then type something like.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"><strong>#gpg &#8211;armor &#8211;export 8722E71E | apt-key add -</strong></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">which would output something like.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<blockquote>
<p class="MsoNormal"><span lang="EN-GB">gpg: no ultimately trusted keys found<br />
OK</span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">At this point, the gpg key is recorded in your local database, and you shouldn&#8217;t see the gpg error for that particular repository.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Some additional key servers: </span></p>
<p class="MsoNormal"><span lang="EN-GB">keyring.debian.org<br />
pgp.mit.edu<br />
pgpkeys.pgp.net </span><br />
wwkeys.uk.pgp.net<br />
wwwkeys.pgp.net</p>
]]></content:encoded>
			<wfw:commentRss>http://www.annoying.dk/2007/10/11/the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available-no_pubkey-xxx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
