<?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>Linux * Screw &#187; faq</title>
	<atom:link href="http://www.linuxscrew.com/category/faq/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxscrew.com</link>
	<description></description>
	<lastBuildDate>Thu, 15 Jul 2010 15:44:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=5046</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sort CLI output by line length</title>
		<link>http://www.linuxscrew.com/2009/04/14/sort-cli-output-by-line-length/</link>
		<comments>http://www.linuxscrew.com/2009/04/14/sort-cli-output-by-line-length/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:18:28 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=767</guid>
		<description><![CDATA[Want to sort file contents by each line&#8217;s lenght? No problems:
artemn@artemn-laptop:~$ cat /etc/passwd &#124; awk '{print length, $0}' &#124; sort -n &#124; awk '{$1=""; print $0 }'

bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
root:x:0:0:root:/root:/bin/bash
proxy:x:13:13:proxy:/bin:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
ntp:x:110:120::/home/ntp:/bin/false
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
ftp:x:111:65534::/home/ftp:/bin/false
games:x:5:60:games:/usr/games:/bin/sh
klog:x:102:103::/home/klog:/bin/false
man:x:6:12:man:/var/cache/man:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
dhcp:x:100:101::/nonexistent:/bin/false
news:x:9:9:news:/var/spool/news:/bin/sh
saned:x:120:131::/home/saned:/bin/false
syslog:x:101:102::/home/syslog:/bin/false
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
libuuid:x:112:121::/var/lib/libuuid:/bin/sh
messagebus:x:103:109::/var/run/dbus:/bin/false
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
sshd:x:109:65534::/var/run/sshd:/usr/sbin/nologin
Debian-exim:x:117:128::/var/spool/exim4:/bin/false
artemn:x:1000:1000:artemn,,,:/home/artemn:/bin/bash
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
mysql:x:119:130:MySQL Server,,,:/var/lib/mysql:/bin/false
gdm:x:108:118:Gnome Display Manager:/var/lib/gdm:/bin/false
hplip:x:104:7:HPLIP system user,,,:/var/run/hplip:/bin/false
pulse:x:113:123:PulseAudio daemon,,,:/var/run/pulse:/bin/false
polkituser:x:114:127:PolicyKit,,,:/var/run/PolicyKit:/bin/false
avahi:x:106:114:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
asterisk:x:118:129:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
haldaemon:x:107:116:Hardware abstraction layer,,,:/home/haldaemon:/bin/false
landscape:x:115:65534:Landscape Client Daemon,,,:/var/lib/landscape:/bin/false
avahi-autoipd:x:105:113:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
chipcard:x:116:119:Chipcard-Tools Daemon Account,,,:/var/run/chipcard:/bin/false
For reverse sort, use the following [...]]]></description>
			<content:encoded><![CDATA[<p>Want to sort file contents by each line&#8217;s lenght? No problems:</p>
<pre>artemn@artemn-laptop:~$ cat /etc/passwd | awk '{print length, $0}' | sort -n | awk '{$1=""; print $0 }'</pre>
<p><span id="more-767"></span>
<pre>bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
root:x:0:0:root:/root:/bin/bash
proxy:x:13:13:proxy:/bin:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
ntp:x:110:120::/home/ntp:/bin/false
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
ftp:x:111:65534::/home/ftp:/bin/false
games:x:5:60:games:/usr/games:/bin/sh
klog:x:102:103::/home/klog:/bin/false
man:x:6:12:man:/var/cache/man:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
dhcp:x:100:101::/nonexistent:/bin/false
news:x:9:9:news:/var/spool/news:/bin/sh
saned:x:120:131::/home/saned:/bin/false
syslog:x:101:102::/home/syslog:/bin/false
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
libuuid:x:112:121::/var/lib/libuuid:/bin/sh
messagebus:x:103:109::/var/run/dbus:/bin/false
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
sshd:x:109:65534::/var/run/sshd:/usr/sbin/nologin
Debian-exim:x:117:128::/var/spool/exim4:/bin/false
artemn:x:1000:1000:artemn,,,:/home/artemn:/bin/bash
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
mysql:x:119:130:MySQL Server,,,:/var/lib/mysql:/bin/false
gdm:x:108:118:Gnome Display Manager:/var/lib/gdm:/bin/false
hplip:x:104:7:HPLIP system user,,,:/var/run/hplip:/bin/false
pulse:x:113:123:PulseAudio daemon,,,:/var/run/pulse:/bin/false
polkituser:x:114:127:PolicyKit,,,:/var/run/PolicyKit:/bin/false
avahi:x:106:114:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
asterisk:x:118:129:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
haldaemon:x:107:116:Hardware abstraction layer,,,:/home/haldaemon:/bin/false
landscape:x:115:65534:Landscape Client Daemon,,,:/var/lib/landscape:/bin/false
avahi-autoipd:x:105:113:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
chipcard:x:116:119:Chipcard-Tools Daemon Account,,,:/var/run/chipcard:/bin/false</pre>
<p>For reverse sort, use the following command:</p>
<pre>cat /etc/passwd | awk '{print length, $0}' | sort -rn | awk '{$1=""; print $0 }'</pre>
<p>Source: <a href="http://www.opennet.ru">www.opennet.ru</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2009/04/14/sort-cli-output-by-line-length/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>FAQ: How to change Duplex and/or Auto-Negotiation NIC settings in Linux?</title>
		<link>http://www.linuxscrew.com/2008/11/20/faq-how-to-change-duplex-andor-auto-negotiation-nic-settings-in-linux/</link>
		<comments>http://www.linuxscrew.com/2008/11/20/faq-how-to-change-duplex-andor-auto-negotiation-nic-settings-in-linux/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 15:39:55 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/11/20/faq-how-to-change-duplex-andor-auto-negotiation-nic-settings-in-linux/</guid>
		<description><![CDATA[Q: How to disable auto-negotiation option of my network interface card and set up half/full duplex mode manually from Linux command line (CLI)? By the way, how to see current settings?
A:  There are several Linux utilities coming with almost any distribution including Debian, Ubuntu, Fedora, RedHat, Mandriva, Centos whatever. See details below.

ethtool
This is rather [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q</strong>: How to disable auto-negotiation option of my network interface card and set up half/full duplex mode manually from Linux command line (CLI)? By the way, how to see current settings?<br />
<strong>A</strong>:  There are several Linux utilities coming with almost any distribution including Debian, Ubuntu, Fedora, RedHat, Mandriva, Centos whatever. See details below.</p>
<p style="text-align: center"><a href="http://en.wikipedia.org/wiki/Duplex_(telecommunications)"><img src="http://artiomix.googlepages.com/full-half-duplex.jpg" /></a></p>
<p><font size="+1"><a href="http://freshmeat.net/projects/ethtool/"><strong>ethtool</strong></a></font></p>
<p>This is rather powerful utility can display and change settings of ethernet network interface card.  You can easily disable/enable autonegotiation option for your NIC, also it&#8217;s possible to manually set up duplex mode, configure wake-on-lan options, set speed settings. Just look through <a href="http://linuxcommand.org/man_pages/ethtool8.html">full manual page for ethtool</a>. Here are several ethtool usage examples:</p>
<p><strong><code>ethtool eth0</code></strong> &#8211; shows current NIC settings</p>
<pre>
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: No
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 32
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes</pre>
<p><strong><code>ethtool -s eth0 duplex half autoneg off</code></strong> &#8211; disables auto-negotiation, enables Half Duplex.<br />
<strong><code>ethtool -s eth1 duplex full speed 1000 autoneg off</code></strong> &#8211; disables auto-negotiation, enables Falf Duplex and sets up Speed to 1000 Mb/s.</p>
<p><font size="+1"><a href="http://freshmeat.net/projects/mii-tool/"><strong>mii-tool</strong></a></font></p>
<p>According to <a href="http://www.netadmintools.com/html/mii-tool.man.html">manual</a> it allows to manipulate and see media-independent  interface status. Let&#8217;s see examples:</p>
<p><strong><code>bash-3.1# mii-tool eth0<br />
eth0: negotiated 100baseTx-FD, link ok</code></strong> &#8211; shows 100 Mbps speed, Full Duplex, Auto-negotiation is on.<br />
<strong><code>bash-3.1# mii-tool eth0 -F 10baseT-HD</code></strong> &#8211; enables 10 Mb/s  Half Duplex connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/11/20/faq-how-to-change-duplex-andor-auto-negotiation-nic-settings-in-linux/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>FAQ: How to scrollback in GNU SCREEN?</title>
		<link>http://www.linuxscrew.com/2008/11/14/faq-how-to-scrollback-in-gnu-screen/</link>
		<comments>http://www.linuxscrew.com/2008/11/14/faq-how-to-scrollback-in-gnu-screen/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 12:05:06 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/11/14/faq-how-to-scrollback-in-gnu-screen/</guid>
		<description><![CDATA[Q: I was compiling kernel using GNU Screen utility but something happened during the compilation and I want to see full error&#8217;s output but I can&#8217;t just scrollback using Ctrl+PageUp. How to scrollback in GNU Screen?
A: In GNU Screen press Ctrl + a + [ to enter Copy Mode, then scroll up/down using keys j [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q</strong>: I was compiling kernel using <a href="http://www.gnu.org/software/screen/">GNU Screen</a> utility but something happened during the compilation and I want to see full error&#8217;s output but I can&#8217;t just scrollback using Ctrl+PageUp. How to <strong>scrollback in GNU Screen</strong>?</p>
<p><strong>A</strong>: In GNU Screen press <strong>Ctrl + a + </strong>[ to enter Copy Mode, then scroll up/down using keys <strong>j</strong> or <strong>k</strong>. Below are some other navigation keys:</p>
<pre>h -    Move the cursor left by one character
j -    Move the cursor down by one line
k -    Move the cursor up by one line
l -    Move the cursor right by one character
0 -    Move to the beginning of the current line
$ -    Move to the end of the current line.
G -    Moves to the specified line
       (defaults to the end of the buffer).
C-u -  Scrolls a half page up.
C-b -  Scrolls a full page up.
C-d -  Scrolls a half page down.
C-f -  Scrolls the full page down.</pre>
<p>By the way, in order to define scrollback buffer size start screen with the following key (5000 lines in this example):</p>
<p><code>screen -h 5000</code></p>
<p>Quick info about <a href="http://en.wikipedia.org/wiki/GNU_Screen">GNU Screen</a> utility: it is Unix tool that allows to run multiple applications in several &#8220;virtual&#8221; windows. It is very useful when you need, let&#8217;s say, to see hardware resources consumption caused by started application in different console etc. GNU screen is also good option to run applications remotely via ssh: just run application in screen and log off until it&#8217;s finished, then just &#8220;pick up&#8221; screen session and see how the application&#8217;s output.</p>
<p>Update: You can use activate copy mode of GNU Screen also by <strong>Ctrl + Esc</strong> that might be more useful than <strong>Ctrl + a + [ </strong>shortcut (thanks to <a href="http://sites.google.com/site/livibetter/">Yu-Jie Lin</a> for this tip).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/11/14/faq-how-to-scrollback-in-gnu-screen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FAQ: How to install and configure MySQL cluster?</title>
		<link>http://www.linuxscrew.com/2008/07/03/faq-how-to-install-and-configure-mysql-cluster/</link>
		<comments>http://www.linuxscrew.com/2008/07/03/faq-how-to-install-and-configure-mysql-cluster/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 13:33:39 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[faq]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/07/03/faq-how-to-install-and-configure-mysql-cluster/</guid>
		<description><![CDATA[Question: Can you give me more information on how to set up MySQL cluster?
Answer: Sure, below are the links to extremely informative Internet resources providing detailed guides on why and how to deploy MySQL cluster.
By the way a cluster in IT field is a group of linked computers, working together so they form a single [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question</strong>: Can you give me more information on how to set up MySQL cluster?</p>
<p><strong>Answer</strong>: Sure, below are the links to extremely informative Internet resources providing detailed guides on why and how to deploy MySQL cluster.</p>
<p>By the way a cluster in IT field is a group of linked computers, working together so they form a single computing system. The components of a cluster are usually connected to each other via fast local area networks. Clusters are usually deployed to improve performance and/or availability over that provided by a single computer, while typically being much more cost-effective than single computers of comparable speed or availability.</p>
<p>1. <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html</a></p>
<blockquote><p><strong>MySQL Cluster</strong> is a high-availability, high-redundancy version of MySQL adapted for the distributed computing environment. It uses the NDBCLUSTER  storage engine to enable running several MySQL servers in a cluster. This storage engine is available in MySQL 5.0 binary releases and in RPMs compatible with most modern Linux distributions.</p></blockquote>
<p style="text-align: center"><img src="http://dev.mysql.com/doc/refman/5.0/en/images/cluster-components-1.png" /></p>
<p>2. <a href="http://www.davz.net/static/howto/mysqlcluster" target="_blank">Mysql Cluster: The definitive HOWTO</a></p>
<p>3. <a href="http://www.howtoforge.com/loadbalanced_mysql_cluster_debian" target="_blank">How To Set Up A Load-Balanced MySQL Cluster</a></p>
<blockquote><p>This tutorial shows how to configure a MySQL 5 cluster with three nodes: two storage nodes and one management node. This cluster is load-balanced by a high-availability load balancer that in fact has two nodes that use the Ultra Monkey package which provides heartbeat (for checking if the other node is still alive) and <em>ldirectord</em> (to split up the requests to the nodes of the MySQL cluster).</p></blockquote>
<p>4. <a href="http://www.lod.com/whitepapers/mysql-cluster-howto.html" class="broken_link"  target="_blank">MySQL Cluster Server Setup</a></p>
<blockquote><p>MySQL Cluser Server is a fault-tolerant, redundant, scalable database architecture built on the open-source MySQL application, and capable of delivering 99.999% reliability. In this paper we describe the process we used to setup, configure, and test a three-node mySQL cluster server in a test environment.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/07/03/faq-how-to-install-and-configure-mysql-cluster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FAQ: How to block/allow packets sent by specific Operating System with iptables?</title>
		<link>http://www.linuxscrew.com/2008/06/19/faq-how-to-blockallow-packets-sent-by-specific-operating-system-with-iptables/</link>
		<comments>http://www.linuxscrew.com/2008/06/19/faq-how-to-blockallow-packets-sent-by-specific-operating-system-with-iptables/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 12:02:48 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[faq]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/06/19/faq-how-to-blockallow-packets-sent-by-specific-operating-system-with-iptables/</guid>
		<description><![CDATA[Question: How can I block traffic coming from specific operating system in Linux? In other words, how can I block traffic from Windows users on my firewall and allows other people?
Answer: There is an iptables module named OSF (passive OS Fingerprinting) that was written by Evgeniy Polyakov. This module allows passively detect OS packet was [...]]]></description>
			<content:encoded><![CDATA[<p><strong><img src="http://www.linuxscrew.com/wp-content/uploads/2008/05/netfilter-logo2.png" align="right" height="72" width="265" />Question</strong>: How can I block traffic coming from specific operating system in Linux? In other words, how can I block traffic from Windows users on my firewall and allows other people?</p>
<p><strong>Answer</strong>: There is an <strong>iptables</strong> module named <strong><a href="http://tservice.net.ru/~s0mbre/old/?section=projects&amp;item=osf" target="_blank">OSF</a> </strong>(passive OS Fingerprinting)<strong> </strong>that was written by <a href="http://tservice.net.ru/~s0mbre/old/?section=notes&amp;item=about" target="_blank">Evgeniy Polyakov</a>. This module allows passively detect OS packet was sent from and perform various netfilter actions based on this match. Packets with SYN bit set are analyzed.</p>
<p>In order to install OSF module, do the following:</p>
<p>1. Download latest release from <a href="http://tservice.net.ru/~s0mbre/archive/osf/" target="_blank">here</a>, for example as follows:<br />
<code>wget http://tservice.net.ru/~s0mbre/archive/osf/osf-2008_06_14.tar.gz</code></p>
<p>2. Edit Makefile from unpacked archive in order to set proper path to iptables headers (iptables.h and libiptc/ dir).</p>
<p>3. If your kernel sources can not be accessed via /lib/modules/$(shell uname -r)/build, you have to replace KDIR variable with the correct path to kernel sources.<br />
4. Run <code>make</code> that should build ipt_osf.ko kernel module.<br />
5. Run <code>make lib</code> that will build libipt_osf.so shared library (copy it to where all other iptables shared libs are placed in your distro e.g. /lib/iptables or /lib64/iptables in Fedora).</p>
<p>6. Run <code>make bin</code> that will build userspace applications which allows to load fingerprints and obtain information about matched packets (load, osfd, ucon_osf).</p>
<p>7. Download signatures list:<br />
wget http://www.openbsd.org/cgi-bin/cvsweb/src/etc/pf.os</p>
<p>8. Install kernel module:<br />
<code>insmod ./ipt_osf.ko</code></p>
<p>9. Load signatures:<br />
<code>./load ./pf.os /proc/sys/net/ipv4/osf</code></p>
<p>10. Set up iptables rules allowing/disallowing packets generated by certain OS:<br />
<code>iptables -I INPUT -j ACCEPT -p tcp -m osf --genre Linux --log 0 --ttl 2</code></p>
<p>This example allows traffic from Linux systems and logs packets from other ones:<br />
<code>ipt_osf: Windows [2000:SP3:Windows XP Pro SP1, 2000 SP3]: 11.22.33.55:4024 -&gt; 11.22.33.44:139</code></p>
<p>BTW, OSF has following options:</p>
<ul>
<li>  &#8211;log<br />
If present, OSF will log determined genres even if they don&#8217;t match desired one.<br />
0 &#8211; log all matched and unknown entries.<br />
1 &#8211; only first one.<br />
2 &#8211; log all matched entries.</li>
<li>  &#8211;ttl<br />
0 &#8211; true ip and fingerprint TTL comparison. Works for LAN.<br />
1 &#8211; check if ip TTL is less than fingerprint one. Works for global addresses.<br />
2 &#8211; do not compare TTL at all. Allows to detect NMAP, but can produce false results.</li>
<li>  &#8211;connector<br />
If present, OSF will log all events also through netlink connector(1.0 id).<br />
More about connector can be found in <code>Documentation/connector</code> in kernel source tree.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/06/19/faq-how-to-blockallow-packets-sent-by-specific-operating-system-with-iptables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FAQ: How to set up atomatic Linux reboot if kernel panic occurs?</title>
		<link>http://www.linuxscrew.com/2008/06/11/faq-how-to-set-up-atomatic-linux-reboot-if-kernel-panic-occurs/</link>
		<comments>http://www.linuxscrew.com/2008/06/11/faq-how-to-set-up-atomatic-linux-reboot-if-kernel-panic-occurs/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 09:00:15 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[faq]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/06/11/faq-how-to-set-up-atomatic-linux-reboot-if-kernel-panic-occurs/</guid>
		<description><![CDATA[Question: How can I get my Linux server rebooted/restarted automatically if it caught a kernel panic?
Answer: As you might know, kernel panic is an action taken by an operating system upon detecting an internal fatal error from which it cannot safely recover; the term is largely specific to Unix and Unix-like systems (it&#8217;s a wiki&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://en.wikipedia.org/wiki/Image:Forced-linux-kernel-panic-under-qemu.jpg" target="_blank"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Forced-linux-kernel-panic-under-qemu.jpg/180px-Forced-linux-kernel-panic-under-qemu.jpg" align="right" height="100" width="180" /></a>Question</strong>: How can I get my Linux server rebooted/restarted automatically if it caught a kernel panic?</p>
<p><strong>Answer</strong>: As you might know, kernel panic is an action taken by an operating system upon detecting an internal fatal error from which it cannot safely recover; the term is largely specific to Unix and Unix-like systems (it&#8217;s a wiki&#8217;s description).</p>
<p>By default Linux wouldn&#8217;t not reboot after panic occurs, but the following option of sysctl will cause a kernel to reboot after N seconds you specify. In our example server will be rebooted in 15 seconds if kernel panic stopped its operation:</p>
<p>1. Open sysctl&#8217;s configuration file:<br />
<code>sudo nano /etc/sysctl.conf</code></p>
<p>2. Add there the following line:<br />
<code>kernel.panic = 15</code></p>
<p>or</p>
<p>1. Execute the following command:<br />
<code>/sbin/sysctl -w kernel.panic=15</code></p>
<p>Hope it helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/06/11/faq-how-to-set-up-atomatic-linux-reboot-if-kernel-panic-occurs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FAQ: How to disable directory browsing in apache/httpd?</title>
		<link>http://www.linuxscrew.com/2008/06/03/faq-how-to-disable-directory-browsing-in-apachehttpd/</link>
		<comments>http://www.linuxscrew.com/2008/06/03/faq-how-to-disable-directory-browsing-in-apachehttpd/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 12:45:10 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/06/03/faq-how-to-disable-directory-browsing-in-apachehttpd/</guid>
		<description><![CDATA[Question: How can I disable building of directory index in apache/httpd? In other words, how to prevent users from seeing the contents of published directories?

Answer: Actually you are totally right that you wish to disable this feature. One of the &#8220;must do&#8217;s&#8221; on setting a secure apache web server is to disable directory browsing. Usually apache [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question</strong>: How can I disable building of directory index in apache/httpd? In other words, how to prevent users from seeing the contents of published directories?</p>
<p style="text-align: center"><img src="http://www.linuxscrew.com/wp-content/uploads/2008/06/directory_index.png" title="apache directory index" alt="apache directory index" /></p>
<p><strong>Answer</strong>: Actually you are totally right that you wish to disable this feature. One of the &#8220;must do&#8217;s&#8221; on setting a secure apache web server is to disable directory browsing. Usually apache comes with this feature enabled but its always a good idea to get it disabled unless you really need it.</p>
<p>First of all find where is the main apache&#8217;s config file <code>httpd.conf</code> is located. If you use Debian, it should be here: <code>/etc/apache/httpd.conf</code>. Using some file editor like Vim or Nano open this file and find the line that looks as follows:</p>
<p><code>Options Includes Indexes FollowSymLinks MultiViews</code></p>
<p>then remove word <code>Indexes</code> and save the file. The line should look like this one:</p>
<p><code>Options Includes FollowSymLinks MultiViews</code></p>
<p>After it is done, restart apache (e.g. <code>/etc/init.d/apache restart</code> in Debian). That&#8217;s it! <img src='http://www.linuxscrew.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/06/03/faq-how-to-disable-directory-browsing-in-apachehttpd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FAQ: How to select fastest APT server in Debian</title>
		<link>http://www.linuxscrew.com/2008/05/15/faq-how-to-select-fastest-apt-server-in-debian/</link>
		<comments>http://www.linuxscrew.com/2008/05/15/faq-how-to-select-fastest-apt-server-in-debian/#comments</comments>
		<pubDate>Thu, 15 May 2008 09:44:33 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/05/15/faq-how-to-select-fastest-apt-server-in-debian/</guid>
		<description><![CDATA[Question: I want to select APT repository server/mirror that is fastest for my location. How can I do it in Debian?
Answer: You can use application named as &#8220;netselect-apt&#8221; to get new sources.list file with fastest APT mirror. Install this application by command "sudo aptitude install netselect-apt" and run it in accordance with Debian distribution you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.linuxscrew.com/wp-content/uploads/2008/05/debianswirl.png" title="debian swirl logo" alt="debian swirl logo" align="right" /><strong>Question</strong>: I want to select APT repository server/mirror that is fastest for my location. How can I do it in <strong>Debian</strong>?</p>
<p><strong>Answer</strong>: You can use application named as &#8220;<strong>netselect-apt</strong>&#8221; to get new sources.list file with fastest APT mirror. Install this application by command <code>"sudo aptitude install netselect-apt"</code> and run it in accordance with Debian distribution you use (Debian Etch in our example):</p>
<p><code>sudo netselect-apt -n etch -o /etc/apt/sources.list<br />
sudo apt-get update</code></p>
<p>P.S. By the way, in Ubuntu you can <a href="http://www.linuxscrew.com/2007/10/20/download-or-upgrade-ubuntu-at-highest-speed/">do the same</a> in a few clicks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/05/15/faq-how-to-select-fastest-apt-server-in-debian/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FAQ: How to unload NIC driver (clear ifconfig counters)?</title>
		<link>http://www.linuxscrew.com/2008/05/13/faq-how-to-unload-nic-driver/</link>
		<comments>http://www.linuxscrew.com/2008/05/13/faq-how-to-unload-nic-driver/#comments</comments>
		<pubDate>Tue, 13 May 2008 12:40:44 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[faq]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/05/13/faq-how-to-unload-nic-driver/</guid>
		<description><![CDATA[Question: I want to reset counters in /proc/net/dev (also shown in ifconfig output as RX and TX bytes) and thus I have to unload network interface driver. How to do it?
Answer: There are two commands in Linux CLI coming by default which would help to unload drivers: rmmod and modprobe. First of all it is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question</strong>: I want to reset counters in <code>/proc/net/dev</code> (also shown in <code>ifconfig</code> output as RX and TX bytes) and thus I have to unload network interface driver. How to do it?</p>
<p><strong>Answer</strong>: There are two commands in Linux CLI coming by default which would help to unload drivers: <code>rmmod</code> and <code>modprobe</code>. First of all it is necessary to find what kernel module controls certain NIC and then unload that module. For example, you have VIA VT6102 (RHINE-II) network card that is recognized by Linux as eth0 and want to disable its driver temporarily. Just execute the following:</p>
<p>&#8220;<code>sudo rmmod via-rhine</code>&#8221; or &#8220;<code>sudo modprobe -r eth0</code>&#8221; (or &#8220;<code>sudo modprobe -r via-rhine</code>&#8220;). You can use command <code>dmesg</code> to determine the name of kernel module you wish to unload.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/05/13/faq-how-to-unload-nic-driver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FAQ: Iptables rules on timely basis</title>
		<link>http://www.linuxscrew.com/2008/05/12/faq-iptables-rules-on-timely-basis/</link>
		<comments>http://www.linuxscrew.com/2008/05/12/faq-iptables-rules-on-timely-basis/#comments</comments>
		<pubDate>Mon, 12 May 2008 13:52:09 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[faq]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/2008/05/12/faq-iptables-rules-on-timely-basis/</guid>
		<description><![CDATA[Question: How can I restrict/allow access to certain service on timely basis with iptables? For example restrict access to SSH between 7:00 pm &#8211; 8:00 am on weekdays?
Answer:  You are welcome to use iptables patch-o-matic extension (pom or p-o-m) that allows you to match a packet based on its arrival or departure (for locally [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.linuxscrew.com/wp-content/uploads/2008/05/netfilter-logo2.png" title="netfilter logo 2" alt="netfilter logo 2" align="right" /><em><strong>Question</strong></em>: How can I restrict/allow access to certain service on <strong>timely basis</strong> with <strong>iptables</strong>? For example restrict access to SSH between 7:00 pm &#8211; 8:00 am on weekdays?</p>
<p><em><strong>Answer</strong></em>:  You are welcome to use iptables <a href="http://www.netfilter.org/documentation/HOWTO/netfilter-extensions-HOWTO-2.html#ss2.1" target="_blank">patch-o-matic</a> extension (pom or p-o-m) that allows you to match a packet based on its arrival or departure (for locally generated packets) timestamp. The syntax is the following:</p>
<p><code>iptables RULE -m time --timestart TIME --timestop TIME --days DAYS -j ACTION</code></p>
<p>Where:</p>
<p><code>--timestart TIME</code>: Time start value (format is 00:00-23:59)<br />
<code>--timestop TIME</code>:  Time stop value (the same format)<br />
<code>--days DAYS</code>: a list of days to apply, from (format: Mon, Tue, Wed, Thu, Fri, Sat, Sun).</p>
<p>To add the rule stated in the question use the following command:</p>
<p><code>iptables -</code><code>A INPUT -p tcp -d 192.168.0.1 --dport 22 -m time --timestart 19:00 --timestop 8:00 -days Mon,Tue,Wed,Thu,Fri -j DROP</code></p>
<p>Hope it helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2008/05/12/faq-iptables-rules-on-timely-basis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
