<?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>WPKG Blog</title> <atom:link href="http://blog.wpkg.org/feed/" rel="self" type="application/rss+xml" /><link>http://blog.wpkg.org</link> <description>a technical IT blog</description> <lastBuildDate>Tue, 06 Dec 2011 13:25:58 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Installing Debian Squeeze on DELL PowerEdge R710 via DRAC</title><link>http://blog.wpkg.org/2011/12/06/installing-debian-squeeze-on-dell-poweredge-r710-via-drac/</link> <comments>http://blog.wpkg.org/2011/12/06/installing-debian-squeeze-on-dell-poweredge-r710-via-drac/#comments</comments> <pubDate>Tue, 06 Dec 2011 13:01:29 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=298</guid> <description><![CDATA[Installing Debian Squeeze on DELL PowerEdge R710 via DRAC can be quite an adventure &#8211; the main problem is that the Debian installer does not include firmware for Broadcom network cards.If you&#8217;re trying to install Debian and see an image like this, you have to make sure you have a floppy with an appropriate driver.To [...]]]></description> <content:encoded><![CDATA[<p>Installing Debian Squeeze on DELL PowerEdge R710 via DRAC can be quite an adventure &#8211; the main problem is that the Debian installer does not include firmware for Broadcom network cards.<br /> <span id="more-298"></span><br /> If you&#8217;re trying to install Debian and see an image like this, you have to make sure you have a floppy with an appropriate driver.</p><p><a href="http://blog.wpkg.org/wp-content/uploads/2011/12/bnx2-mips-09-5.0.0.j3.fw_.png"><img src="http://blog.wpkg.org/wp-content/uploads/2011/12/bnx2-mips-09-5.0.0.j3.fw_.png" alt="Missing Broadcom firmware" title="bnx2-mips-09-5.0.0.j3.fw" width="799" height="595" class="alignnone size-full wp-image-302" /></a></p><p>To create the floppy image containing bnx2 firmware:</p><p><code><br /> wget http://http.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.34_all.deb<br /> dd bs=1024 count=1440 if=/dev/zero of=imagefile.img<br /> mkfs.msdos imagefile.img<br /> mkdir /mnt/floppy<br /> mount -o loop imagefile.img /mnt/floppy<br /> cp firmware-bnx2_0.34_all.deb /mnt/floppy/<br /> umount /mnt/floppy<br /> </code></p><p>And, that&#8217;s it! Add the floppy via virtual media in DRAC, boot the server, it should install fine this time.</p><p>Note that when you connect a floppy image via DRAC, it will briefly disconnect your virtual CD-ROM, and the installation will fail &#8211; so make sure you do it before the system boots (or after all data was read from the CD, i.e. when it asks for the image, it is fine &#8211; but not before).</p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2011/12/06/installing-debian-squeeze-on-dell-poweredge-r710-via-drac/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Getting rid of &#8220;IPv6 addrconf: prefix with wrong length 56&#8243;</title><link>http://blog.wpkg.org/2011/07/07/getting-rid-of-ipv6-addrconf-prefix-with-wrong-length-56/</link> <comments>http://blog.wpkg.org/2011/07/07/getting-rid-of-ipv6-addrconf-prefix-with-wrong-length-56/#comments</comments> <pubDate>Thu, 07 Jul 2011 13:59:22 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=292</guid> <description><![CDATA[Some hosting companies, notably OVH, have their networking set in a way that it constantly &#8220;pollutes&#8221; dmesg with the following messages: IPv6 addrconf: prefix with wrong length 56 IPv6 addrconf: prefix with wrong length 56 IPv6 addrconf: prefix with wrong length 56 Here is what you can do to get rid of it.Add the following to /etc/sysctl.conf and run [...]]]></description> <content:encoded><![CDATA[<p>Some hosting companies, notably OVH, have their networking set in a way that it constantly &#8220;pollutes&#8221; dmesg with the following messages:</p><p><code>IPv6 addrconf: prefix with wrong length 56<br /> IPv6 addrconf: prefix with wrong length 56<br /> IPv6 addrconf: prefix with wrong length 56</code></p><p>Here is what you can do to get rid of it.</p><p><span id="more-292"></span></p><p>Add the following to <code>/etc/sysctl.conf</code> and run <code>sysctl -p</code>:</p><p><code># gets rid of "IPv6 addrconf: prefix with wrong length 56" in dmesg<br /> net.ipv6.conf.eth0.autoconf=0<br /> net.ipv6.conf.eth1.autoconf=0<br /> net.ipv6.conf.all.autoconf=0<br /> net.ipv6.conf.default.autoconf=0</code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2011/07/07/getting-rid-of-ipv6-addrconf-prefix-with-wrong-length-56/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Acer accepting Windows tax refund</title><link>http://blog.wpkg.org/2011/06/12/acer-accepting-windows-tax-refund/</link> <comments>http://blog.wpkg.org/2011/06/12/acer-accepting-windows-tax-refund/#comments</comments> <pubDate>Sun, 12 Jun 2011 15:08:17 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Windows]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=91</guid> <description><![CDATA[Getting a laptop without Windows is really problematic. How about getting a refund for a Windows system you&#8217;re not going to use? I tried asking Acer, and it&#8217;s no easy task (it&#8217;s technically possible, but will cost you more than a refund you get).Dear Mr. Chmielewski, thank you for your support request. The Acer Aspire One 751 [...]]]></description> <content:encoded><![CDATA[<p>Getting a laptop without Windows is really problematic. How about getting a refund for a Windows system you&#8217;re not going to use? I tried asking Acer, and it&#8217;s no easy task (it&#8217;s technically possible, but will cost you more than a refund you get).</p><p><span id="more-91"></span></p><p><code>Dear Mr. Chmielewski,</p><p>thank you for your support request.</p><p>The Acer Aspire One 751 is only avaliable with a Microsoft Windows licence.</p><p>As a matter of principle the return of your licence is possible. The following criteria have to be met:</p><p>1.) The licence agreements, which appeared when you first started the system, MUSTN'T be accepted.</p><p>2.) The item has to be sent in to our Service Center including all accessoires and equipement. If you already created recovery discs it is utmost important that these will also be sent in with the item. No copy of the former deliverred operating system is allowed to remain in your property / hands.</p><p>3.) The ACER service is then going to remove the Windows lincence plate and will erase the whole harddisc.</p><p>4.) You then will receive a refund (by bank transfer) for the preinstalled OEM licence (about 30 Euro) .</p><p>5.) You have to pay the shipping cost to the acer service center and the shipping costs back to your address.</p><p>If you wish to return the licence we need the serial number of your notebook, your contact details including the shipping address and your bank details.</p><p>We will then provide you with a reference number with which the item can be dispatched to our Service Center.</p><p>Please follow the instructions below before dispatching the item:</p><p>- Please note the reference number clearly visible on the outer package / cardboard box.<br /> - If possible pack the item in the original packaging or use another package that is safe for transport.<br /> - Please note that ACER will not accept items that arrive being dispatched "freight collect".</p><p>ACER Computer GmbH<br /> Repair Center<br /> Kornkamp 4<br /> 22926 Ahrenburg</p><p>If you have any further questions regarding this topic please do not delete the previous correspondence.</p><p>Best regards<br /> C. Riecken</p><p>Your ACER support team</code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2011/06/12/acer-accepting-windows-tax-refund/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Testing RAM on a server without rebooting to run memtest86+</title><link>http://blog.wpkg.org/2010/11/23/testing-ram-on-a-server-without-rebooting-to-run-memtest86/</link> <comments>http://blog.wpkg.org/2010/11/23/testing-ram-on-a-server-without-rebooting-to-run-memtest86/#comments</comments> <pubDate>Tue, 23 Nov 2010 14:45:24 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Misc]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=266</guid> <description><![CDATA[Sometimes, applications on your server crash in mysterious ways, or your server hangs without any apparent reason. You suspect that the RAM may be broken, so memtest86+would be ideal tool to check RAM &#8211; however, there are some problems involved with it:running memtest86+ means server downtime, it may not be possible to run memtest86+ on a [...]]]></description> <content:encoded><![CDATA[<p>Sometimes, applications on your server crash in mysterious ways, or your server hangs without any apparent reason. You suspect that the RAM may be broken, so <a href="http://www.memtest.org" rel="nofollow">memtest86+</a>would be ideal tool to check RAM &#8211; however, there are some problems involved with it:</p><ul><li>running memtest86+ means server downtime,</li><li>it may not be possible to run memtest86+ on a remote server without KVM-IP, iLO or similar access.</li></ul><p>What to do in such situations? User-space <a href="http://pyropus.ca/software/memtester/" rel="nofollow">memtester</a> to the rescue!</p><p><span id="more-266"></span></p><p>The obvious disadvantage is that you will not be able to test all RAM in the server, but sometimes, it&#8217;s not needed to determine if RAM is good or not.</p><p>The below command will try to allocate ~15GB RAM and make one test pass &#8211; if you see errors like below, your RAM is hosed!</p><p>Note that with the exact command line shown below you should have at least 15 GB of free, unallocated memory, otherwise, you&#8217;re likely to hang your server, or at least cause a serious downtime or OOM-killer.</p><pre># memtester 15000 1
memtester version 4.0.8 (64-bit)
Copyright (C) 2007 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 15000MB (15728640000 bytes)
got  15000MB (15728640000 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : testing   0FAILURE: possible bad address line at offset 0x5d922ec8.
Skipping to next test...
  Random Value        : ok
FAILURE: 0x7f40f12dd82264da != 0x7f40f52dd82264da at offset 0x22fa2d27.
FAILURE: 0xe800dc254863429d != 0xe8005c254863429d at offset 0x22fa2de7.
FAILURE: 0x95005ca5bc351fd0 != 0x95007ca5bc351fd0 at offset 0x22fa2e47.
FAILURE: 0x16cc8129822daa5 != 0x16c4a129822daa5 at offset 0x22fa2e5f.
FAILURE: 0xce8945572424d79a != 0xce89c5572424d79a at offset 0x22fa2f1f.
FAILURE: 0x14054d669820e595 != 0x1405cd669820e595 at offset 0x22fa306f.
FAILURE: 0x8d283c130c69dc25 != 0x8d28bc130c69dc25 at offset 0x22fa309f.
FAILURE: 0x19285abae23f881 != 0x19287abae23f881 at offset 0x22fa30b7.
FAILURE: 0x55302b281ab13a51 != 0x55302f281ab13a51 at offset 0x22fa31bf.
FAILURE: 0x48b8ae1715e5084b != 0x48b8aa1715e5084b at offset 0x22fa31d7.
FAILURE: 0x28a2b64b9039074a != 0x28a2164b9039074a at offset 0x22fa5db7.
FAILURE: 0xc6080cfa18200698 != 0xc6080efa18200698 at offset 0x22fa5dcf.
FAILURE: 0x2b30fefcd69a347 != 0x2b38fefcd69a347 at offset 0x22fa5de7.
FAILURE: 0xbc27b13358294271 != 0xbc27b33358294271 at offset 0x22fa5e2f.
FAILURE: 0xc17e0d24dc21fe7e != 0xc17e0f24dc21fe7e at offset 0x22fa5e47.
FAILURE: 0x29ac181590911ae3 != 0x29ac1a1590911ae3 at offset 0x22fa5f07.
FAILURE: 0x233001ba38a53ccd != 0x233021ba38a53ccd at offset 0x22fa5f37.
FAILURE: 0x7542cd4b38a3ea9f != 0x7542c94b38a3ea9f at offset 0x22fa5f7f.
FAILURE: 0x86c89d49992151c8 != 0x86c8bd49992151c8 at offset 0x22fa5ff7.
FAILURE: 0x16208f9b584969b3 != 0x16200f9b584969b3 at offset 0x22fa609f.
FAILURE: 0x6a08171eb0a18751 != 0x6a08151eb0a18751 at offset 0x22fa60b7.
FAILURE: 0x8214f12e9a254014 != 0x8214f72e9a254014 at offset 0x22fa60cf.
FAILURE: 0x8005ab68021ad9f != 0x800dab68021ad9f at offset 0x22fa612f.
FAILURE: 0x884e76469ba12421 != 0x884e72469ba12421 at offset 0x22fa61a7.
FAILURE: 0x30509c65d890299e != 0x30509e65d890299e at offset 0x22fa62af.
  Compare XOR         : FAILURE: 0x3f81821efe3ced18 != 0x3f81861efe3ced18 at offset 0x22fa2d27.
FAILURE: 0xa8416d166e7dcadb != 0xa840ed166e7dcadb at offset 0x22fa2de7.
FAILURE: 0x5540ed96e24fa80e != 0x55410d96e24fa80e at offset 0x22fa2e47.
FAILURE: 0xc1ad5903be3d62e3 != 0xc1acdb03be3d62e3 at offset 0x22fa2e5f.
FAILURE: 0x8ec9d6484a3f5fd8 != 0x8eca56484a3f5fd8 at offset 0x22fa2f1f.
FAILURE: 0xd445de57be3b6dd3 != 0xd4465e57be3b6dd3 at offset 0x22fa306f.
FAILURE: 0x4d68cd0432846463 != 0x4d694d0432846463 at offset 0x22fa309f.
FAILURE: 0xc1d3169cd43e80bf != 0xc1d3189cd43e80bf at offset 0x22fa30b7.
FAILURE: 0x1570bc1940cbc28f != 0x1570c01940cbc28f at offset 0x22fa31bf.
FAILURE: 0x8f93f083bff9089 != 0x8f93b083bff9089 at offset 0x22fa31d7.
FAILURE: 0xe8e3473cb6538f88 != 0xe8e2a73cb6538f88 at offset 0x22fa5db7.
FAILURE: 0x86489deb3e3a8ed6 != 0x86489feb3e3a8ed6 at offset 0x22fa5dcf.
FAILURE: 0xc2f3a0e0f3842b85 != 0xc2f420e0f3842b85 at offset 0x22fa5de7.
FAILURE: 0x7c6842247e43caaf != 0x7c6844247e43caaf at offset 0x22fa5e2f.
FAILURE: 0x81be9e16023c86bc != 0x81bea016023c86bc at offset 0x22fa5e47.
FAILURE: 0xe9eca906b6aba321 != 0xe9ecab06b6aba321 at offset 0x22fa5f07.
FAILURE: 0xe37092ab5ebfc50b != 0xe370b2ab5ebfc50b at offset 0x22fa5f37.
FAILURE: 0x35835e3c5ebe72dd != 0x35835a3c5ebe72dd at offset 0x22fa5f7f.
FAILURE: 0x47092e3abf3bda06 != 0x47094e3abf3bda06 at offset 0x22fa5ff7.
FAILURE: 0xd661208c7e63f1f1 != 0xd660a08c7e63f1f1 at offset 0x22fa609f.
FAILURE: 0x2a48a80fd6bc0f8f != 0x2a48a60fd6bc0f8f at offset 0x22fa60b7.
FAILURE: 0x4255821fc03fc852 != 0x4255881fc03fc852 at offset 0x22fa60cf.
FAILURE: 0xc840eba7a63c35dd != 0xc8416ba7a63c35dd at offset 0x22fa612f.
FAILURE: 0x488f0737c1bbac5f != 0x488f0337c1bbac5f at offset 0x22fa61a7.
FAILURE: 0xf0912d56feaab1dc != 0xf0912f56feaab1dc at offset 0x22fa62af.
  Compare SUB         : FAILURE: 0x770f6d7d59b31bc0 != 0x64680d7d59b31bc0 at offset 0x22fa2d27.
FAILURE: 0x17cc5d24cac64438 != 0x6cb85d24cac64438 at offset 0x22fa2de7.
FAILURE: 0x8bda06d04720f630 != 0xf69f06d04720f630 at offset 0x22fa2e47.
FAILURE: 0x191ec89353a0b578 != 0xe4b7189353a0b578 at offset 0x22fa2e5f.
FAILURE: 0xb1bc42b59ee189c0 != 0x5cd042b59ee189c0 at offset 0x22fa2f1f.
FAILURE: 0x86575304584f0af8 != 0x316b5304584f0af8 at offset 0x22fa306f.
FAILURE: 0x4d053942f1b9f178 != 0xf8193942f1b9f178 at offset 0x22fa309f.
FAILURE: 0x206d80c97f8947d8 != 0x9719d0c97f8947d8 at offset 0x22fa30b7.
FAILURE: 0x6cf332350ca77058 != 0x5a4bd2350ca77058 at offset 0x22fa31bf.
FAILURE: 0xcae418d26b8f9b68 != 0xdd8b78d26b8f9b68 at offset 0x22fa31d7.
FAILURE: 0xdc58887f8f9e1d40 != 0xc67f887f8f9e1d40 at offset 0x22fa5db7.
FAILURE: 0x66470a0f89743570 != 0xdcf35a0f89743570 at offset 0x22fa5dcf.
FAILURE: 0x678cf2f8066c7ac8 != 0x12a0f2f8066c7ac8 at offset 0x22fa5de7.
FAILURE: 0x7e705d8189837558 != 0xf51cad8189837558 at offset 0x22fa5e2f.
FAILURE: 0x62530ceb060c3560 != 0xd8ff5ceb060c3560 at offset 0x22fa5e47.
FAILURE: 0xe1f0dc5c71b99328 != 0x589d2c5c71b99328 at offset 0x22fa5f07.
FAILURE: 0xa1a2ad6a30317bb8 != 0xc67ad6a30317bb8 at offset 0x22fa5f37.
FAILURE: 0x1d86ded3b0c73088 != 0x302e3ed3b0c73088 at offset 0x22fa5f7f.
FAILURE: 0xf1b9a3e0fcfa14f0 != 0x5c7ea3e0fcfa14f0 at offset 0x22fa5ff7.
FAILURE: 0x806d7d4232efc3a8 != 0xd5597d4232efc3a8 at offset 0x22fa609f.
FAILURE: 0x98a6f4d473117858 != 0x21faa4d473117858 at offset 0x22fa60b7.
FAILURE: 0x617c86f84528d8d0 != 0xc58176f84528d8d0 at offset 0x22fa60cf.
FAILURE: 0xbca540978cefa888 != 0x67b940978cefa888 at offset 0x22fa612f.
FAILURE: 0xe6ebd2a5a59fd8d8 != 0xf99332a5a59fd8d8 at offset 0x22fa61a7.
FAILURE: 0x1a30be8e9a1fb260 != 0x90dd0e8e9a1fb260 at offset 0x22fa62af.
  Compare MUL         : ^C^C^C^C^C
#</pre>]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/11/23/testing-ram-on-a-server-without-rebooting-to-run-memtest86/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SSH session logging / recording</title><link>http://blog.wpkg.org/2010/10/10/ssh-session-logging-recording/</link> <comments>http://blog.wpkg.org/2010/10/10/ssh-session-logging-recording/#comments</comments> <pubDate>Sun, 10 Oct 2010 21:36:13 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=254</guid> <description><![CDATA[If you want to implement a simple server-side SSH session logging, follow these simple steps.&#8220;script&#8221; command can be used to log user activity. Then, we can send the session as email to several recipients, and remove the log file. Add this to user&#8217;s .bash_profile file, or simply construct something similar:CURDATE=$&#40;date +%F-%T&#41; RAND=$RANDOM &#160; EMAILS=&#34;user@example.com otherrecipient@example.com&#34; &#160; script -f -q /tmp/session-$USER-$CURDATE-$RAND.log for EMAIL [...]]]></description> <content:encoded><![CDATA[<p>If you want to implement a simple server-side SSH session logging, follow these simple steps.<br /> <span id="more-254"></span></p><p>&#8220;script&#8221; command can be used to log user activity. Then, we can send the session as email to several recipients, and remove the log file.</p><p>Add this to user&#8217;s .bash_profile file, or simply construct something similar:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">CURDATE</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>F-<span style="color: #000000; font-weight: bold;">%</span>T<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">RAND</span>=<span style="color: #007800;">$RANDOM</span>
&nbsp;
<span style="color: #007800;">EMAILS</span>=<span style="color: #ff0000;">&quot;user@example.com otherrecipient@example.com&quot;</span>
&nbsp;
script <span style="color: #660033;">-f</span> <span style="color: #660033;">-q</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>session-<span style="color: #007800;">$USER</span>-<span style="color: #007800;">$CURDATE</span>-<span style="color: #007800;">$RAND</span>.log
<span style="color: #000000; font-weight: bold;">for</span> EMAIL <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$EMAILS</span>; <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #ff0000;">&quot;/tmp/session-<span style="color: #007800;">$USER</span>-<span style="color: #007800;">$CURDATE</span>-<span style="color: #007800;">$RAND</span>.log&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;SSH session transcript for <span style="color: #007800;">$USER</span> at <span style="color: #007800;">$CURDATE</span>&quot;</span> <span style="color: #007800;">$EMAIL</span>
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>session-<span style="color: #007800;">$USER</span>-<span style="color: #007800;">$CURDATE</span>-<span style="color: #007800;">$RAND</span>.log
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div><p>Notes:</p><ul><li> don&#8217;t assume it to be any security feature: the log file can be easily manipulated or removed by the user, a different shell can be used, etc.,</li><li>sending an email may not be a good idea if you expect lots of output (i.e. cat /dev/urandom).</li></ul> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/10/10/ssh-session-logging-recording/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Building ProFTPD with SFTP support on Debian Lenny</title><link>http://blog.wpkg.org/2010/10/10/building-proftpd-with-sftp-support-on-debian-lenny/</link> <comments>http://blog.wpkg.org/2010/10/10/building-proftpd-with-sftp-support-on-debian-lenny/#comments</comments> <pubDate>Sun, 10 Oct 2010 12:08:58 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=238</guid> <description><![CDATA[The mod_sftp module implements the SSH2, SFTP and SCP protocols, allowing SCP and SFTP clients to be used with ProFTPD. By default, Debian Lenny does not provide mod_sftp support, but you can build a proper package using a development version available in Debian repositories &#8211; here is how.First, download proftpd-dfsg_1.3.3a.orig.tar.gz and proftpd-dfsg_1.3.3a-3.diff.gz (or later) from [...]]]></description> <content:encoded><![CDATA[<p>The <a rel="nofollow" href="http://www.castaglia.org/proftpd/modules/mod_sftp.html">mod_sftp</a> module implements the SSH2, SFTP and SCP protocols, allowing SCP and SFTP clients to be used with ProFTPD. By default, Debian Lenny does not provide mod_sftp support, but you can build a proper package using a development version available in Debian repositories &#8211; here is how.<br /> <span id="more-238"></span></p><ul><li>First, download proftpd-dfsg_1.3.3a.orig.tar.gz and proftpd-dfsg_1.3.3a-3.diff.gz (or later) from <a rel="nofollow" href="http://ftp.us.debian.org/debian/pool/main/p/proftpd-dfsg/">http://ftp.us.debian.org/debian/pool/main/p/proftpd-dfsg/</a>. Uncompress it, apply the diff file:</li></ul><p><code>tar xpf proftpd-dfsg_1.3.3a.orig.tar.gz<br /> patch -p0 &lt; proftpd-dfsg_1.3.3a-3.diff</code></p><ul><li>For Debian Lenny, you will have to edit debian/control file (directory inside proftpd-dfsg-1.3.3a after you apply the diff) &#8211; at the beginning of this file, replace <code>libssl-dev (&gt;= 0.9.8l)</code> with just <code>libssl-dev</code>, with no version remarks.</li><li>If you still don&#8217;t have a build environment installed, do so now:</li></ul><p><code>apt-get install build-essential</code></p><ul><li>You will still have to install some packages to make proftpd build possible:</li></ul><p><code>apt-get install libmysqlclient15-dev libpam-dev debhelper zlib1g-dev libpq-dev libldap2-dev libssl-dev libwrap0-dev libcap-dev autotools-dev dpatch libacl1-dev libattr1-dev unixodbc-dev libsqlite3-dev</code></p><ul><li>Well, that should be it &#8211; run the below commands in <code>proftpd-dfsg-1.3.3a</code> directory, and it should result in built deb packages outside of this directory (<code>cd ..</code>):</li></ul><p><code><br /> chmod 755 debian/rules<br /> dpkg-buildpackage</code></p><ul><li>If the build was complete with no errors, install proftpd-basic package, check if it contains mod_sftp.so file:</li></ul><p><code>dpkg -i proftpd-basic_1.3.3a-3_amd64.deb<br /> dpkg -L proftpd-basic | grep mod_sftp<br /> /usr/lib/proftpd/mod_sftp.so<br /> /usr/lib/proftpd/mod_sftp_pam.so</code></p><ul><li>To make the module work, add this line to <code>/etc/proftpd/modules.conf</code>:</li></ul><p><code>LoadModule mod_sftp.c</code></p><ul><li>Add this one to <code>/etc/proftpd/proftpd.conf</code>:</li></ul><p><code>Include /etc/proftpd/sftp.conf</code></p><ul><li>And finally, create <code>/etc/proftpd/sftp.conf</code> with the contents (this assumes proftpd will be listening on port 22 to accept incoming SFTP connections; if your OpenSSH server uses this port already, adjust either config appropriately):</li></ul><p><code>&lt;IfModule mod_sftp.c&gt;<br /> &lt;VirtualHost 192.168.10.20 127.0.0.1&gt;<br /> SFTPEngine on<br /> SFTPLog /var/log/proftpd/sftp.log<br /> TransferLog /var/log/proftpd/xferlog-sftp.log<br /> # Configure the server to listen on the normal SSH2 port, port 22<br /> Port 22<br /> # Configure both the RSA and DSA host keys, using the same host key<br /> # files that OpenSSH uses.<br /> SFTPHostKey /etc/ssh/ssh_host_rsa_key<br /> SFTPHostKey /etc/ssh/ssh_host_dsa_key<br /> # Configure the file used for comparing authorized public keys of users.<br /> SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys<br /> # Enable compression<br /> SFTPCompression delayed<br /> # Allow the same number of authentication attempts as OpenSSH.<br /> #<br /> # It is recommended that you explicitly configure MaxLoginAttempts<br /> # for your SSH2/SFTP instance to be higher than the normal<br /> # MaxLoginAttempts value for FTP, as there are more ways to authenticate<br /> # using SSH2.<br /> MaxLoginAttempts 6<br /> &lt;/VirtualHost&gt;<br /> &lt;/IfModule&gt;<br /> </code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/10/10/building-proftpd-with-sftp-support-on-debian-lenny/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Resizing qcow2 images</title><link>http://blog.wpkg.org/2010/10/04/resizing-qcow2-images/</link> <comments>http://blog.wpkg.org/2010/10/04/resizing-qcow2-images/#comments</comments> <pubDate>Mon, 04 Oct 2010 08:59:24 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=222</guid> <description><![CDATA[To date (as of qemu 0.12.5), it was not possible to resize qcow2 images. The only workaround was to convert the image to some other format, resize it, and convert it back to qcow2. Which could be quite lengthy and meant plenty of IO. Moreover, it was even more tricky if the image was already [...]]]></description> <content:encoded><![CDATA[<p>To date (as of qemu 0.12.5), it was not possible to resize qcow2 images. The only workaround was to convert the image to some other format, resize it, and convert it back to qcow2. Which could be quite lengthy and meant plenty of IO. Moreover, it was even more tricky if the image was already more than 50% of your storage space and you still wanted to increase its size.</p><p>It changed with qemu 0.13.0 (still release candidate as of writing this blog post), where <code>resize</code> option was added to <code>qemu-img</code>.<br /> <span id="more-222"></span></p><p>To resize a qcow2 image, download the latest release candidate of 0.13.0, compile it, and resize the image:</p><pre>
srv1:/usr/src/qemu-0.13.0-rc1# ./qemu-img -h
qemu-img version 0.12.90, Copyright (c) 2004-2008 Fabrice Bellard
usage: qemu-img command [command options]
(...)
  resize filename [+ | -]size

srv1:/var/lib/vz/images/108# /usr/src/qemu-0.13.0-rc1/qemu-img resize vm-108-disk-1.qcow2 +5G
Image resized.
</pre>]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/10/04/resizing-qcow2-images/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Useful shell one-liners</title><link>http://blog.wpkg.org/2010/10/02/useful-shell-one-liners/</link> <comments>http://blog.wpkg.org/2010/10/02/useful-shell-one-liners/#comments</comments> <pubDate>Sat, 02 Oct 2010 13:21:30 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=209</guid> <description><![CDATA[A page with useful one-lines for reference.Finding the biggest files on the server:find / -type f &#124; xargs -I &#123;&#125; du -sh --block-size=M &#123;&#125; &#124; sort -nr &#62; /out.txt]]></description> <content:encoded><![CDATA[<p>A page with useful one-lines for reference.</p><p><span id="more-209"></span></p><p><strong>Finding the biggest files on the server:</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-I</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #660033;">-sh</span> <span style="color: #660033;">--block-size</span>=M <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>out.txt</pre></div></div>]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/10/02/useful-shell-one-liners/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>nginx auth &#8211; allowing IP or password-based access</title><link>http://blog.wpkg.org/2010/09/14/nginx-auth-allowing-ip-or-password-based-access/</link> <comments>http://blog.wpkg.org/2010/09/14/nginx-auth-allowing-ip-or-password-based-access/#comments</comments> <pubDate>Tue, 14 Sep 2010 07:37:39 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=188</guid> <description><![CDATA[nginx uses similar syntax to that of Apache to allow users to access a directory, depending if their IP or username/pass matches (i.e. you want all users to present a valid username/pass match, but want to let some automated checks coming from specified IPs through, i.e. from ldirectord or nagios). Here is an example.[...]]]></description> <content:encoded><![CDATA[<p>nginx uses similar syntax to that of Apache to allow users to access a directory, depending if their IP or username/pass matches (i.e. you want all users to present a valid username/pass match, but want to let some automated checks coming from specified IPs through, i.e. from ldirectord or nagios). Here is an example.<br /> <span id="more-188"></span><br /> <code> location / {<br /> index index.php;<br /> satisfy any;<br /> allow 10.0.0.0/8;<br /> auth_basic "example.com intra";<br /> auth_basic_user_file /etc/nginx/htpasswd/example.com.htpasswd;<br /> }<br /> </code></p><p>You can create/modify the auth_basic_user_file with htpasswd program (typically found in apache2-utils or apache-base package, depending on the distribution):</p><p><code><br /> htpasswd /etc/nginx/htpasswd/example.com.htpasswd someusername<br /> </code></p> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/09/14/nginx-auth-allowing-ip-or-password-based-access/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Source port routing</title><link>http://blog.wpkg.org/2010/09/13/source-port-routing/</link> <comments>http://blog.wpkg.org/2010/09/13/source-port-routing/#comments</comments> <pubDate>Mon, 13 Sep 2010 14:29:25 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[All articles]]></category> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://blog.wpkg.org/?p=184</guid> <description><![CDATA[Sometimes, you may want some services (i.e. web) to be routed through a different interface. Here is a quick setup with some common problems.Assumptions:10.4.0.1 &#8211; your additional gateway, through which you only want to route web traffic (TCP port 80), 10.4.0.2 &#8211; server which needs source port routing altered, tun0 &#8211; device on 10.4.0.2 which will be [...]]]></description> <content:encoded><![CDATA[<p>Sometimes, you may want some services (i.e. web) to be routed through a different interface. Here is a quick setup with some common problems.<br /> <span id="more-184"></span></p><p>Assumptions:</p><ul><li>10.4.0.1 &#8211; your additional gateway, through which you only want to route web traffic (TCP port 80),</li><li>10.4.0.2 &#8211; server which needs source port routing altered,</li><li>tun0 &#8211; device on 10.4.0.2 which will be used for source port routing.</li></ul><p>Now, we&#8217;re ready to start configuration:</p><ul><li>first, add a new routing table to /etc/iproute2/rt_tables &#8211; we&#8217;ll call it &#8220;http&#8221; and it will be table &#8220;1&#8243; &#8211; with it, your /etc/iproute2/rt_tables file should look much like below:</li></ul><p><code><br /> #<br /> # reserved values<br /> #<br /> 255    local<br /> 254    main<br /> 253    default<br /> 0    unspec<br /> #<br /> # local<br /> #<br /> #1    inr.ruhep<br /> 1    http</code></p><ul><li>assuming the peer through which you want to push http traffic is behind tun0 interface and has 10.4.0.1 address, we have to manipulate routing with the two rules below:</li></ul><p><code>ip route add default via 10.4.0.1 dev tun0 table http<br /> ip rule add from all fwmark 1 table http</code></p><p>Basically, they mean that &#8220;http&#8221; table traffic need to go through tun0, 10.4.0.1, and packets marked with &#8220;1&#8243; value should get there.</p><ul><li>we also need to mark the packets &#8211; we&#8217;ll use iptables for that:</li></ul><p><code><br /> iptables -t mangle -A OUTPUT -p tcp -o eth0 -s 10.4.0.2 --sport 80 -j MARK --set-mark 1</code></p><p>This means that in the mangle table, locally-generated packets with 10.4.0.2 source which would by default go through eth0, will be marked with &#8220;1&#8243; value.</p><p>Still doesn&#8217;t work? Check these things below:</p><ul><li>rp_filter has to be set to 0 for given interfaces &#8211; 0 is the default value set by the Linux kernel, but some distributions (i.e. Ubuntu, Mandriva) alter it and set it to 1; just adding that to /etc/sysctl.conf should do the trick to make sure this value is set to 0 after reboot:</li></ul><p><code>net.ipv4.conf.default.rp_filter=0<br /> net.ipv4.conf.all.rp_filter=0</code></p><p>If you&#8217;re not rebooting any time soon, see what these value currently are with:</p><p><code>find /proc/sys/net -name rp_filter | xargs cat</code></p><ul><li>there has to be direct, not routed traffic between the hosts &#8211; for example, if you have more than one hop, source port routing will not work:</li></ul><p><code># traceroute 10.0.0.10<br /> traceroute to 10.0.0.10 (10.0.0.10), 30 hops max, 60 byte packets<br /> 1  10.255.255.254 (10.255.255.254)  0.978 ms  1.185 ms  1.218 ms<br /> 2  10.0.0.10 (10.0.0.10)  0.159 ms  0.154 ms  0.179 ms<br /> </code><br /> It has to look like below:</p><p><code># traceroute 10.4.0.1<br /> traceroute to 10.4.0.1 (10.4.0.1), 30 hops max, 60 byte packets<br /> 1  10.4.0.1 (10.4.0.1)  0.597 ms  0.593 ms  0.590 ms</code></p><ul><li>not sure what you have to change on your new gateway (10.4.0.1 in this example)? The below should be enough:</li></ul><p><code>echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br /> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br /> </code></p><ul><li>note that web traffic should also come from 10.4.0.1</li></ul> ]]></content:encoded> <wfw:commentRss>http://blog.wpkg.org/2010/09/13/source-port-routing/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 304/512 objects using disk: basic

Served from: blog.wpkg.org @ 2012-02-04 15:28:09 -->
