<?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>TechniTip.Net &#187; Linux Server</title> <atom:link href="http://technitip.net/category/linux-server/feed" rel="self" type="application/rss+xml" /><link>http://technitip.net</link> <description>TechniTip.Net - Useful tips regarding technical stuff for things like Linux, MySQL, Apache, PHP, Linux Server, iPhone and more.</description> <lastBuildDate>Fri, 03 Feb 2012 18:31:08 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <image><link>http://technitip.net</link> <url>http://technitip.net/wp-content/plugins/maxblogpress-favicon/icons/favicon-66.ico</url><title>TechniTip.Net</title> </image> <item><title>Running Rsync and Sudo over SSH</title><link>http://technitip.net/running-rsync-and-sudo-over-ssh</link> <comments>http://technitip.net/running-rsync-and-sudo-over-ssh#comments</comments> <pubDate>Thu, 07 Apr 2011 11:03:12 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[root]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sudo]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1818</guid> <description><![CDATA[I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement PermitRootLogin no. For sure this is [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/socket-address-family-not-supported-by-protocol' rel='bookmark' title='socket: Address family not supported by protocol'>socket: Address family not supported by protocol</a></li><li><a
href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement <em>PermitRootLogin no. </em>For sure this is the recommended setting if your server to backup has a public IP address.</p><p>A nice and easy solution which works best for me is to use sudo. This will allow to run rsync via ssh and sudo. To get it running you have to add an entry into your sudoers config file:</p><p>/etc/sudoers</p><pre>backup_user ALL=(root)NOPASSWD:/usr/bin/rsync</pre><p>This will allow the user <em>backup_user</em> to run the command <em>rsync</em> as root.</p><p>Next step is to add an <em>rsync-path</em> parameter to the remote rsync call:</p><pre>rsync --rsync-path="sudo rsync" backup_user@myhosttobackup.net:/root /backup_directory</pre><p>Finally rsync will automatically do an sudo to root on the remote server and all to backup all files owned by root as well.</p><p><strong>Links:</strong></p><ul><li><a
title="Rsync and sudo over SSH" href="http://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/" target="_blank">Rsync and sudo over SSH</a></li></ul><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Frunning-rsync-and-sudo-over-ssh&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/socket-address-family-not-supported-by-protocol' rel='bookmark' title='socket: Address family not supported by protocol'>socket: Address family not supported by protocol</a></li><li><a
href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/running-rsync-and-sudo-over-ssh/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>socket: Address family not supported by protocol</title><link>http://technitip.net/socket-address-family-not-supported-by-protocol</link> <comments>http://technitip.net/socket-address-family-not-supported-by-protocol#comments</comments> <pubDate>Sun, 30 Jan 2011 09:46:31 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Linux Server]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sshd]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1637</guid> <description><![CDATA[I&#8217;m using rsync via ssh on my Linux NAS, it works nice. But I was wondering what could cause the message: socket: Address family not supported by protocol The message appears every time rsync or just ssh is called. In my case the reason is that ssh tries to connect via IPv6 first and afterwards [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>I&#8217;m using rsync via ssh on my Linux NAS, it works nice. But I was wondering what could cause the message:<br
/> <code><br
/> socket: Address family not supported by protocol</code></p><p>The message appears every time rsync or just ssh is called. In my case the reason is that ssh tries to connect via IPv6 first and afterwards with IPv4. Since I&#8217;ve not setup IPv6 on my NAS the connect fails and the message above appears. It&#8217;s not a big harm but it&#8217;s nicer to remove this message.</p><p>Removing the message is esay, just add -4 as command line parameter to ssh:</p><p><code>-4      Forces ssh to use IPv4 addresses only.<br
/> </code></p><p>For ssh or rsync the usage looks like:</p><p><code><br
/> ssh -4<br
/> rsync -e "ssh -4"<br
/> </code></p><p>And the message disappears.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fsocket-address-family-not-supported-by-protocol&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/socket-address-family-not-supported-by-protocol/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Quick Rootkit Check</title><link>http://technitip.net/quick-rootkit-check</link> <comments>http://technitip.net/quick-rootkit-check#comments</comments> <pubDate>Thu, 02 Dec 2010 21:41:08 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[check]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Rootkit]]></category> <category><![CDATA[Server]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1629</guid> <description><![CDATA[If you are running your own Linux server connected to the internet it&#8217;s a good idea to check if your server is infected from a rootkit. This can be achieved using a few command lines: cd /root wget --passive-ftp ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz tar xvzf chkrootkit.tar.gz cd chkrootkit-0.49/ make sense ./chkrootkit Check the output, if you get output [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/network-bandwidth-performance-measurement-with-iperf' rel='bookmark' title='Network Bandwidth Performance Measurement with Iperf'>Network Bandwidth Performance Measurement with Iperf</a></li><li><a
href='http://technitip.net/ftp-with-resume' rel='bookmark' title='FTP with Resume'>FTP with Resume</a></li><li><a
href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>If you are running your own Linux server connected to the internet it&#8217;s a good idea to check if your server is infected from a rootkit. This can be achieved using a few command lines:</p><pre>cd /root
wget --passive-ftp <a href="ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz">ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz</a>
tar xvzf chkrootkit.tar.gz
cd chkrootkit-0.49/
make sense
./chkrootkit</pre><p>Check the output, if you get output indicating &#8220;INFECTED&#8221; then you should re-install your server and do everything to avoid further infects.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fquick-rootkit-check&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/network-bandwidth-performance-measurement-with-iperf' rel='bookmark' title='Network Bandwidth Performance Measurement with Iperf'>Network Bandwidth Performance Measurement with Iperf</a></li><li><a
href='http://technitip.net/ftp-with-resume' rel='bookmark' title='FTP with Resume'>FTP with Resume</a></li><li><a
href='http://technitip.net/simple-mysql-backup-script' rel='bookmark' title='Simple MySql Backup Script'>Simple MySql Backup Script</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/quick-rootkit-check/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How do you protect your Blog from Hackers?</title><link>http://technitip.net/how-do-you-protect-your-blog-from-hackers</link> <comments>http://technitip.net/how-do-you-protect-your-blog-from-hackers#comments</comments> <pubDate>Sun, 08 Aug 2010 16:08:34 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Latest Featured]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Linux Server]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[Blog]]></category> <category><![CDATA[hacker]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[perl]]></category> <category><![CDATA[protect]]></category> <category><![CDATA[script]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1511</guid> <description><![CDATA[Using WordPress is nice and many websites use it. The advantage of course that there are many tips, additional plugins etc. are available. But on the other hand there is a big disadvantage. Hackers attack WordPress sitse due to many many sites use it. I found an article and video from Matt Cutts an employee [...]
No related posts.]]></description> <content:encoded><![CDATA[<p>Using WordPress is nice and many websites use it. The advantage of course that there are many tips, additional plugins etc. are available. But on the other hand there is a big disadvantage. Hackers attack WordPress sitse due to many many sites use it. I found an <a
title="Three tips to protect your WordPress installation" href="http://www.mattcutts.com/blog/three-tips-to-protect-your-wordpress-installation/" target="_blank">article</a> and <a
title="How do you protect your blog from hackers? " href="http://www.youtube.com/watch?v=gwAlEf-AbCU" target="_blank">video</a> from Matt Cutts an employee from Google.</p><p>He recommends to protect your wp-admin area using the Apache .htaccess file. Here in detail access is only allowed from IP addresses from where you are logging in. It&#8217;s definitely a good way to protect you blog, but often people don&#8217;t have a fixed IP address. The DSL provider assigns a different IP address on every dial in. Unfortunately there is no easy way to obtain the network addresses of your DSL provider which can be entered in your .htaccess file.</p><p>Another important recommendation: Always keep your server software and WordPress software up to date!</p><p>Also remove the following line from your header.php which will show hackers your WordPress version:</p><p><code>&lt;meta name=”generator” content=”WordPress &lt;?php  bloginfo(’version’); ?&gt;” /&gt; &lt;!-– leave this for stats please  --&gt;</code></p><p>So let&#8217;s concentrate on the restricted access in the wp-admin area. It&#8217;s a little bit tricky to get the address list of your DSL provider. I&#8217;ll explain and show an example script below. First let&#8217;s have a look at the <a
title="How do you protect your blog from hackers? " href="http://www.youtube.com/watch?v=gwAlEf-AbCU" target="_blank">video</a> from Matt Cutts.<br
/> <object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="618" height="373" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="allowFullScreen" value="true" /><param
name="allowscriptaccess" value="always" /><param
name="src" value="http://www.youtube.com/v/gwAlEf-AbCU&amp;hl=en_GB&amp;fs=1" /><param
name="allowfullscreen" value="true" /><embed
type="application/x-shockwave-flash" width="618" height="373" src="http://www.youtube.com/v/gwAlEf-AbCU&amp;hl=en_GB&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p><p>As step one you have to find out your own IP address. Let&#8217;s assume your IP address assigned from your provider is 213.168.95.20 (this is just an example!). Next do a whois lookup:</p><pre>server:~# whois 213.168.95.20
...
inetnum:        213.168.95.0 - 213.168.98.255
<strong>netname:        NC-DIAL-IN-POOL</strong>
</pre><p>Have a look at the <strong>netname NC-DIAL-IN-POOL</strong>. Usually provider assign  a common name for all DSL dynamic address. But we want to add all IP addresses or better all network ranges into our .htaccess file. Ok now we need to get all address ranges with this netname. This can be achieved using the Linux whois tool:</p><pre>server:~# whois -h whois.ripe.net NC-DIAL-IN-POOL
...
inetnum:        194.8.209.0 - 194.8.209.255
...
inetnum:        194.8.205.0 - 194.8.205.255
...
</pre><p>Fine we get a list with all network ranges from our provider now, but still not the correct netmask format and a lot of other output which we don&#8217;t need. Basically it&#8217;s possible to manually generate the .htaccess file now. Not big fun&#8230; So I&#8217;ve created a small perl script which does the job. As small bonus it creates the needed format for .htaccess file which means you are able to directly add the output to your .htaccess file in the wp-admin folder.</p><p><strong>Important:</strong> Before usage you have to add the <strong>netname</strong> of the dial-in pool of your provider. How to find it out is described above. Below is only an example. The output will look like:</p><pre>server:~# ./gethtaccessranges.sh
allow from 194.8.209.0/24
allow from 194.8.205.0/24
allow from 195.14.226.0/24
</pre><p>Finally generate a .htaccess file in your wp-admin/ folder with the content:</p><pre>order deny,allow
deny from all</pre><p>and add the output of the script gethtaccessranges.sh below the two lines. That&#8217;s it! Now access to wp-admin is only allowed from dynamic IP address from your provider. Sure it&#8217;s not the perfect solution but I&#8217;ll prevent you from many other hack attempts from all over the world.</p><p>At the end of the script there is also an example in case providers use number in their netnames.</p><pre>#!/usr/bin/perl -w
# gethtaccessranges.sh
# Harald Kraemer 08.08.2010
# www.technnitip.net
#
# NET::CIDR and NET::Whois is need to run this script.
# On debian you can install using apt-get:
# apt-get install libnet-cidr-perl libnet-whois-perl
#
<strong># Important: Replace the netname "NC-DIAL-IN-POOL" at the end of the
# script with the dial-in netname of your provider! Use the command
# whois &lt;my-ip-address&gt; to find out the netname.</strong>
use Net::CIDR;
use Net::CIDR ':all';
use Net::Whois::Raw;
use strict;
sub getRanges
{
  my($netname) = @_;
  my $whois;
  my @whois_array;
  my @ranges;
  $whois = whois( $netname, 'whois.ripe.net' );
  @whois_array   = split( "\n", $whois );
  @ranges        = grep( /inetnum:/, @whois_array );
  foreach ( @ranges )
  {
    s/inetnum://g;
    s/ //g;
    s/ - /-/g;
    foreach my $item ( Net::CIDR::range2cidr( $_ ) )
    {
      print "allow from " . $item . "\n";
    }
  }
}
getRanges('NC-DIAL-IN-POOL');
#for( my $i=1; $i &lt;= 30; $i++)
#{
#  getRanges('DTAG-DIAL' . $i);
#}</pre><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fhow-do-you-protect-your-blog-from-hackers&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://technitip.net/how-do-you-protect-your-blog-from-hackers/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Checking DNS Configuration Online</title><link>http://technitip.net/checking-dns-configuration-online</link> <comments>http://technitip.net/checking-dns-configuration-online#comments</comments> <pubDate>Fri, 02 Apr 2010 21:50:50 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux Server]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1412</guid> <description><![CDATA[Sometimes it&#8217;s need to check your DNS configuration for correct mail-server (MX), name-server (NS) and further settings. Recently I found a nice online tool which checks the health and configuration of your domain. The online check is available on intoDNS.com. To use it just browse to this site and enter your domain name and you [...]
No related posts.]]></description> <content:encoded><![CDATA[<p> <a
href="http://technitip.net/wp-content/gallery/test/intodns.jpg" title="" class="shutterset_singlepic140" > <img
class="ngg-singlepic ngg-right" src="http://technitip.net/wp-content/gallery/cache/140__320x240_intodns.jpg" alt="intodns" title="intodns" /> </a> Sometimes it&#8217;s need to check your DNS configuration for correct mail-server (MX), name-server (NS) and further settings.</p><p>Recently I found a nice online tool which checks the health and configuration of your domain. The online check is available on <a
title="www.intodns.com" href="http://www.intodns.com/" target="_blank">intoDNS.com</a>. To use it just browse to this site and enter your domain name and you will get many useful checks and information about your server settings.</p><p>Links</p><ul><li><a
title="www.intodns.com" href="http://www.intodns.com/" target="_blank">intoDNS.com</a></li></ul><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fchecking-dns-configuration-online&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://technitip.net/checking-dns-configuration-online/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Happy Birthday Apache!</title><link>http://technitip.net/happy-birthday-apache</link> <comments>http://technitip.net/happy-birthday-apache#comments</comments> <pubDate>Tue, 23 Feb 2010 20:14:43 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Apache Software Foundation]]></category> <category><![CDATA[Birthday]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1408</guid> <description><![CDATA[The Apache Web Server has a reason to party, it&#8217;s 15th anniversary! Powering more than 112 million website. Congratulations! Read more on Apache Software Foundation Blog. Related posts: Howto Restart Apache Graceful Apache Tuning Part 2 Apache Tuning Part 1<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>The Apache Web Server has a reason to party, it&#8217;s 15th anniversary! Powering more than 112 million website. Congratulations!</p><p>Read more on <a
title="The Apache Software Foundation Announces the 15th Anniversary of the Apache HTTP Web Server " href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces2" target="_blank">Apache Software Foundation Blog</a>.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fhappy-birthday-apache&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/happy-birthday-apache/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Status of a Software RAID under Linux</title><link>http://technitip.net/status-of-a-software-raid-under-linux</link> <comments>http://technitip.net/status-of-a-software-raid-under-linux#comments</comments> <pubDate>Sun, 14 Feb 2010 20:13:55 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Linux Server]]></category> <category><![CDATA[mdadm]]></category> <category><![CDATA[RAID]]></category> <category><![CDATA[software]]></category> <category><![CDATA[Status]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1399</guid> <description><![CDATA[You might want to check the rebuild status of your Linux software RAID e.g. after a disc failure or a hard server crash. As you know this might take several hours, depending on the disc size. In my case mdadm is used to configure the software RAID and mdadm &#8211;detail /dev/md1 can be used to [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/traffic-monitoring' rel='bookmark' title='Linux Network Traffic Monitoring'>Linux Network Traffic Monitoring</a></li><li><a
href='http://technitip.net/how-to-change-time-zone-in-linux' rel='bookmark' title='How To Change Time Zone in Linux'>How To Change Time Zone in Linux</a></li><li><a
href='http://technitip.net/debian-lenny-50-released' rel='bookmark' title='Debian &#8220;Lenny&#8221; 5.0 Released'>Debian &#8220;Lenny&#8221; 5.0 Released</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>You might want to check the rebuild status of your Linux software RAID e.g. after a disc failure or a hard server crash. As you know this might take several hours, depending on the disc size.</p><p>In my case mdadm is used to configure the software RAID and<strong> mdadm &#8211;detail /dev/md1</strong> can be used to show the rebuild status:</p><pre>[root@hxxxxxxx ~]# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90
Creation Time : Thu Nov  9 18:57:15 2006
Raid Level : raid1
Array Size : 159726144 (152.33 GiB 163.56 GB)
Used Dev Size : 159726144 (152.33 GiB 163.56 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Feb 14 19:45:21 2010
<strong>State : active, resyncing</strong>
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
<strong>Rebuild Status : 31% complete</strong>
UUID : be29700c:083d0c62:67a9c130:e044323b
Events : 0.3626065
Number   Major   Minor   RaidDevice State
0       8        3        0      active sync   /dev/sda3
1       8       19        1      active sync   /dev/sdb3</pre><p>In my case 31% of the rebuilt process are finished. We still have to wait a little bit..</p><p><strong>Links</strong></p><ul><li><a
title="The Software-RAID HOWTO: Detecting, querying and testing" href="http://tldp.org/HOWTO/Software-RAID-HOWTO-6.html#ss6.5" target="_blank">The Software-RAID HOWTO: Detecting, querying and testing</a></li><li><a
title="The Software-RAID HOWTO" href="http://tldp.org/HOWTO/Software-RAID-HOWTO.html" target="_blank">The Software-RAID HOTWO</a></li></ul><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fstatus-of-a-software-raid-under-linux&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/traffic-monitoring' rel='bookmark' title='Linux Network Traffic Monitoring'>Linux Network Traffic Monitoring</a></li><li><a
href='http://technitip.net/how-to-change-time-zone-in-linux' rel='bookmark' title='How To Change Time Zone in Linux'>How To Change Time Zone in Linux</a></li><li><a
href='http://technitip.net/debian-lenny-50-released' rel='bookmark' title='Debian &#8220;Lenny&#8221; 5.0 Released'>Debian &#8220;Lenny&#8221; 5.0 Released</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/status-of-a-software-raid-under-linux/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Low Cost 19&#8243; Rack Solution</title><link>http://technitip.net/low-cost-19-rack-solution</link> <comments>http://technitip.net/low-cost-19-rack-solution#comments</comments> <pubDate>Sun, 31 Jan 2010 13:11:31 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux Server]]></category> <category><![CDATA[19"]]></category> <category><![CDATA[low cost]]></category> <category><![CDATA[rack]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1378</guid> <description><![CDATA[You have been looking for a low cost 19&#8243; rack solution for your living room? Then you should check the LackRack homepage. It comes with many tips and tricks for your low cost 19&#8243; living room rack No related posts.
No related posts.]]></description> <content:encoded><![CDATA[<p>You have been looking for a low cost 19&#8243; rack solution for your living room? Then you should check the <a
title="LackRack" href="http://wiki.eth-0.nl/index.php/LackRack" target="_blank">LackRack</a> homepage. It comes with many tips and tricks for your low cost 19&#8243; living room rack <img
src='http://technitip.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> <a
href="http://technitip.net/wp-content/gallery/test/lackrackbig.jpg" title="" class="shutterset_singlepic139" > <img
class="ngg-singlepic ngg-center" src="http://technitip.net/wp-content/gallery/cache/139__600x_lackrackbig.jpg" alt="lackrackbig" title="lackrackbig" /> </a><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Flow-cost-19-rack-solution&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://technitip.net/low-cost-19-rack-solution/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Continous SSH Attacks</title><link>http://technitip.net/continous-ssh-attacks</link> <comments>http://technitip.net/continous-ssh-attacks#comments</comments> <pubDate>Sun, 12 Apr 2009 21:02:17 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[attack]]></category> <category><![CDATA[attacks]]></category> <category><![CDATA[brute]]></category> <category><![CDATA[continious]]></category> <category><![CDATA[force]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://technitip.net/?p=887</guid> <description><![CDATA[As written in a previous article Defending Againt SSH Attacks I think it&#8217;s really worth trying to install a tool like denyhosts. Since about 5 days denyhosts blocks IP addresses from all over the world every few minutes. In total now more than 550 different blocked IP addresses. The reason seems that the IP address of [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/defending-againt-ssh-attacks' rel='bookmark' title='Defending Againt SSH Attacks'>Defending Againt SSH Attacks</a></li><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>As written in a previous article <a
href="http://technitip.net/defending-againt-ssh-attacks" title="Defending Againt SSH Attacks">Defending Againt SSH Attacks</a> I think it&#8217;s really worth trying to install a tool like <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a>. Since about 5 days denyhosts blocks IP addresses from all over the world every few minutes. In total now more than 550 different blocked IP addresses.</p><p>The reason seems that the IP address of my server has been added to a bot network which tries to hack servers using SSH brute force attacks. As far as I know such bot networks are built up  with Viruses and Trojans. I think there is no reason why your server may have also been added to such a list, somehow IP addresses seem to added.</p><p>But the question is how to defend against such brute force attacks from bot networks?</p><p><strong>Known Methods</strong></p><ul><li>Install a tool like <a
title="denyhosts" href="http://denyhosts.sourceforge.net/" target="_blank">denyhosts</a></li><li>Always keep the SSH daemon up to date!</li><li>Move the SSH port from 22 to some other port</li><li>Disable password authentication and use key authentication</li><li>Slow down the amount of connections from the same IP using iptables and module &#8220;recent&#8221;</li><li>Open the SSH port after a trigger on a different port using iptables</li></ul><p>I think there is one additional easy method to defend against such attacks. Why I think so? Read on..</p><p><strong>Another Simple Method<br
/> </strong></p><p>When checking the auth.log we see that the user names of the attacks are taken from a dictionary:</p><p><code>Failed	keyboard-interactive/pam	for	invalid	user	aderes from 195.xxx.xxx.xx port 39566 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	aderyn from 203.xxx.xxx.xx port 44099 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adi from 78.xxx.xxx.xx port 42748 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adia from 89. port 51028 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adiel from 217. port 33861 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	adila from 77. port 52867 ssh2<br
/> </code>It seems that the bots are not adding digits to the user names. So I think one easy method to defend against such attacks is:</p><ul><li><strong>add at least one digit to user names</strong> on your server if you have the possibility</li></ul><p>And definitely <strong>never ever</strong> add a user &#8220;admin&#8221;. In my logs the user &#8220;admin&#8221; is always used for brute force attacks:</p><p><code>Failed	keyboard-interactive/pam	for	invalid	user	admin from 203.xxx.xxx.xx port 39711 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 203.xxx.xxx.xx port 55493 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 220.xxx.xxx.xx port 34502 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 80.xxx.xxx.xx port 51846 ssh2<br
/> Failed	keyboard-interactive/pam	for	invalid	user	admin from 80.xxx.xxx.xx port 53934 ssh2</code></p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fcontinous-ssh-attacks&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/defending-againt-ssh-attacks' rel='bookmark' title='Defending Againt SSH Attacks'>Defending Againt SSH Attacks</a></li><li><a
href='http://technitip.net/running-rsync-and-sudo-over-ssh' rel='bookmark' title='Running Rsync and Sudo over SSH'>Running Rsync and Sudo over SSH</a></li><li><a
href='http://technitip.net/putty-ssh-login-without-password-prompt' rel='bookmark' title='PuTTY SSH Login Without Password Prompt'>PuTTY SSH Login Without Password Prompt</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/continous-ssh-attacks/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Network Throughput Measurement</title><link>http://technitip.net/network-throughput-measurement</link> <comments>http://technitip.net/network-throughput-measurement#comments</comments> <pubDate>Sat, 10 Jan 2009 13:22:21 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[benchmark]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[measurement]]></category> <category><![CDATA[netio]]></category> <category><![CDATA[network]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[throughput]]></category> <category><![CDATA[windows]]></category> <guid
isPermaLink="false">http://technitip.net/?p=297</guid> <description><![CDATA[A real nice and easy to use tool for measuring the network throughput on Linux/Unix as well as Windows is NETIO. You only need to download the binaries from the NETIO homepage, store on your server or clients and execute them. The example below shows a sample measurement between to servers connected with a 100 [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/network-bandwidth-performance-measurement-with-iperf' rel='bookmark' title='Network Bandwidth Performance Measurement with Iperf'>Network Bandwidth Performance Measurement with Iperf</a></li><li><a
href='http://technitip.net/traffic-monitoring' rel='bookmark' title='Linux Network Traffic Monitoring'>Linux Network Traffic Monitoring</a></li><li><a
href='http://technitip.net/network-utility-for-iphone' rel='bookmark' title='&#8220;Network Utility&#8221; for iPhone'>&#8220;Network Utility&#8221; for iPhone</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>A real nice and easy to use tool for measuring the network throughput on Linux/Unix as well as Windows is <a
title="NETIO Network Benchmark Tool" href="http://www.ars.de/ars/ars.nsf/docs/netio" target="_blank">NETIO</a>. You only need to download the binaries from the <a
title="NETIO Network Benchmark Tool" href="http://www.ars.de/ars/ars.nsf/docs/netio" target="_blank">NETIO</a> homepage, store on your server or clients and execute them.</p><p>The example below shows a sample measurement between to servers connected with a 100 MBit ethernet card and located at two different providers.</p><p>On one machine NETIO is started as server:</p><pre>machine1:~/netio/bin# ./linux-i386 -s
NETIO - Network Throughput Benchmark, Version 1.26
(C) 1997-2005 Kai Uwe Rommel
TCP server listening.
UDP server listening.
TCP connection established ...
Receiving from client, packet size  1k ...
Sending to client, packet size  1k ...
Receiving from client, packet size  2k ...
Sending to client, packet size  2k ...
Receiving from client, packet size  4k ...
Sending to client, packet size  4k ...
Receiving from client, packet size  8k ...
Sending to client, packet size  8k ...
Receiving from client, packet size 16k ...
Sending to client, packet size 16k ...
Receiving from client, packet size 32k ...
Sending to client, packet size 32k ...
Done.
TCP server listening.</pre><p>On the other machine NETIO is called e.g. with -t option for TCP and the name or IP of the other machine:</p><pre>machine2:~/netio/bin# ./linux-i386 -t machine1.mydomain.de
NETIO - Network Throughput Benchmark, Version 1.26
(C) 1997-2005 Kai Uwe Rommel
TCP connection established.
Packet size  1k bytes:  7309 KByte/s Tx,  7645 KByte/s Rx.
Packet size  2k bytes:  7276 KByte/s Tx,  7724 KByte/s Rx.
Packet size  4k bytes:  7291 KByte/s Tx,  7737 KByte/s Rx.
Packet size  8k bytes:  7276 KByte/s Tx,  7723 KByte/s Rx.
Packet size 16k bytes:  7286 KByte/s Tx,  7719 KByte/s Rx.
Packet size 32k bytes:  7291 KByte/s Tx,  7725 KByte/s Rx.
Done.</pre><p>We take a rough average of the result can multiply it by 8: 7,5 * 8 = 60 MBit/s. This is a acceptable value for a connection between two servers located at different providers within Germany.</p><p>For sure a useful tool! Also check <a
href="http://technitip.net/network-bandwidth-performance-measurement-with-iperf" title="Network Bandwidth Performance Measurement with Iperf">Network Bandwidth Performance Measurement with Iperf</a></p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fnetwork-throughput-measurement&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/network-bandwidth-performance-measurement-with-iperf' rel='bookmark' title='Network Bandwidth Performance Measurement with Iperf'>Network Bandwidth Performance Measurement with Iperf</a></li><li><a
href='http://technitip.net/traffic-monitoring' rel='bookmark' title='Linux Network Traffic Monitoring'>Linux Network Traffic Monitoring</a></li><li><a
href='http://technitip.net/network-utility-for-iphone' rel='bookmark' title='&#8220;Network Utility&#8221; for iPhone'>&#8220;Network Utility&#8221; for iPhone</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/network-throughput-measurement/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
