<?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 how to &#124; Linux Server &#124; Linux tutorials</title>
	<atom:link href="http://www.linuxserver.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxserver.org</link>
	<description>linux, linux howto,linux tutorial, learn linux, linux tuning, linux firewall, linux help,dedicated linuxserver.org</description>
	<lastBuildDate>Fri, 19 Aug 2011 10:32:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Grsecurity on Debian</title>
		<link>http://www.linuxserver.org/linux/debian/grsecurity-on-debian/</link>
		<comments>http://www.linuxserver.org/linux/debian/grsecurity-on-debian/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 10:31:30 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[chpax]]></category>
		<category><![CDATA[EMUTRMAP]]></category>
		<category><![CDATA[grsec]]></category>
		<category><![CDATA[grsecurity]]></category>
		<category><![CDATA[linux security]]></category>
		<category><![CDATA[MPROTECT]]></category>
		<category><![CDATA[PAGEEXEC]]></category>
		<category><![CDATA[paxctl]]></category>
		<category><![CDATA[RANDEXEC]]></category>
		<category><![CDATA[RANDMMAP]]></category>
		<category><![CDATA[SEGMEXEC]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=184</guid>
		<description><![CDATA[If you do not know yet what is grsec / grsecurity, a good starting point is http://grsecurity.net/. For linux, grsecurity is a &#8220;Holy Grail&#8221; in security. In addition, it will get rid of a problem that has linux and that irritates me me: ps aux (after any user can see all processes.) In this short [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not know yet what is grsec / grsecurity, a good starting point is http://grsecurity.net/.<br />
For linux, grsecurity is a &#8220;Holy Grail&#8221; in security. In addition, it will get rid of a problem that has linux and that irritates me me:<br />
ps aux  (after any user can see all processes.)</p>
<p>In this short tutorial I will show you how to install the debian grsecurity, without configure it from source .</p>
<p>linuxsrv ~ # echo &#8220;deb http://debian.cr0.org/repo/ kernel-security/&#8221; >> /etc/apt/sources.list<br />
linuxsrv ~ # curl -o kernel-security.asc http://kernelsec.cr0.org/kernel-security.asc<br />
linuxsrv ~ # apt-key add kernel-security.asc<br />
linuxsrv ~ # apt-get update<br />
linuxsrv ~ # apt-get install linux-image-2.6.32.15-1-grsec</p>
<p>If you want the sources from linux-image-2.6.32.15-1-grsec:</p>
<p>linuxsrv ~ # apt-get install linux-source-2.6.32.15-1-grsec<br />
If you need paxctl to set flags on binary (PAGEEXEC, EMUTRMAP, MPROTECT, RANDMMAP, RANDEXEC and SEGMEXEC)</p>
<p>linuxsrv ~ # apt-get install paxctl</p>
<p>After the kernel installed , if you want simlink&#8217;s &#8220;vmlinuz&#8221; and &#8220;vmlinuz.old&#8221; in &#8220;/&#8221;, you can delete and then change the &#8216;lilo.conf&#8217;. On this server looks like this:</p>
<p>image=/boot/vmlinuz-2.6.32.15-1-grsec<br />
        label=Linux<br />
        read-only<br />
        initrd=/boot/initrd.img-2.6.32.15-1-grsec</p>
<p>image=/boot/vmlinuz-2.6.32-5-amd64<br />
        label=LinuxOLD<br />
        read-only<br />
        optional<br />
        initrd=/boot/initrd.img-2.6.32-5-amd64</p>
<p>Do not forget to lilo-v after the changes. If you are not experienced with OS boot I will not advise you to try changing the kernel. It is recommended that you have access to a console ipkvm / ILO / dell devil.</p>
<p>Reference links:</p>
<p>http://kernelsec.cr0.org/</p>
<p>http://pax.grsecurity.net/</p>
<p>http://grsecurity.net/</p>
<p>Recommended: </p>
<p>http://en.wikibooks.org/wiki/Grsecurity</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/debian/grsecurity-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian DHCP server installation and configuration</title>
		<link>http://www.linuxserver.org/linux/debian/debian-dhcp-server-installation-and-configuration/</link>
		<comments>http://www.linuxserver.org/linux/debian/debian-dhcp-server-installation-and-configuration/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 10:09:41 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[alocare ip]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dhcpd]]></category>
		<category><![CDATA[lan]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[server dhcp]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=176</guid>
		<description><![CDATA[Installing and configuring dhcpd server on Debian (Lenny) ## Install DHCP server for automatic IP assignment apt-get update apt-get install dhcp3-server ## Remove original config file and set the IP address for eth1 (internal network card) rm /etc/dhcp3/dhcpd.conf pico /etc/network/interfaces # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # ## Example configuration: (no eth0) auto eth1 iface eth1 inet static address [...]]]></description>
			<content:encoded><![CDATA[<p>Installing and configuring dhcpd server on Debian (Lenny)</p>
<p>## Install DHCP server for automatic IP assignment<br />
apt-get update<br />
apt-get install dhcp3-server</p>
<p>## Remove original config file and set the IP address for eth1 (internal network card)<br />
rm /etc/dhcp3/dhcpd.conf<br />
pico /etc/network/interfaces</p>
<p># &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; #<br />
## Example configuration: (no eth0)<br />
auto eth1<br />
    iface eth1 inet static<br />
    address 192.168.0.1<br />
    netmask 255.255.255.0<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; #</p>
<p>## Configure &#8220;dhcpd.conf&#8221;<br />
# From file: &#8220;/etc/dhcp3/dhcpd.conf&#8221;</p>
<p>example:<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211; #<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- #<br />
# Dhcpd configuration file #<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- #</p>
<p># Server configuration<br />
DDNS-update-style ad-hoc;<br />
boot-unknown-clients false;<br />
option domain-name-servers 4.2.2.2,4.2.2.3,4.2.2.4,4.2.2.5;<br />
authoritative;<br />
default-lease-time 43200;<br />
max-lease-time 86400;<br />
allow unknown-clients;</p>
<p>subnet 192.168.0.0 netmask 255.255.255.0 {<br />
       range 192.168.0.2 192.168.0.254;<br />
       option subnet-mask 255.255.255.0;<br />
       option routers 192.168.0.1;<br />
       option broadcast-address 192.168.0.255;<br />
       allow unknown-clients;<br />
}<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211; #</p>
<p>Notes:</p>
<p>     DHCP server will assign IP addresses in the range: 192.168.0.2 &#8211; 192.168.0.254<br />
     If you want the DHCP server to allocate IP addresses used by Poppy example below (just below the line &#8220;allow unknown-clients&#8221; in dhcpd.conf)<br />
     Hardware address (Mac) can be seen using arping command (ex: arping -I eth1 local_ip)</p>
<p>linuxserver host {<br />
   hardware ethernet 00:2b:dc:36:32:46;<br />
   fixed-address 192.168.0.10;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/debian/debian-dhcp-server-installation-and-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and configuring memcached</title>
		<link>http://www.linuxserver.org/linux/centos/installing-and-configuring-memcached/</link>
		<comments>http://www.linuxserver.org/linux/centos/installing-and-configuring-memcached/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 05:41:35 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[instalare memcached]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-pecl-memcache]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=174</guid>
		<description><![CDATA[Undoubtedly, memcached is the best caching system can be run distributed reaching extreme performance ( it uses libevent find). As dependency to be used we will need: libevent, memcached and php-memcached PECL. ## Install PHP PECL Memcache and memcached-(Dependencies will be installed along with them) yum install php-pecl-memcache memcached ## To Configure the memcached edit [...]]]></description>
			<content:encoded><![CDATA[<p>Undoubtedly, memcached is the best caching system can be run distributed reaching extreme performance ( it uses libevent find).</p>
<p>As dependency to be used we will need: libevent, memcached and php-memcached PECL.</p>
<blockquote><p>
## Install PHP PECL Memcache and memcached-(Dependencies will be installed along with them)<br />
yum install php-pecl-memcache memcached</p>
<p>## To Configure the memcached edit the file &#8216;/ etc / sysconfig / memcached &#8220;as follows:<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
# Memcached configuration file<br />
# Port used<br />
PORT=&#8221;11211&#8243;<br />
# User daemon runs memcached<br />
USER=&#8221;memcached&#8221;<br />
# The maximum number of connections<br />
MAXCONN=&#8221;1024&#8243;<br />
# Size of memory that can be used<br />
Cachesize=&#8221;512&#8243;<br />
OPTIONS=&#8221;"<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
## Activate memcached to start at boot<br />
chkconfig memcached on</p>
<p>## Start the daemon<br />
memcached service home
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/centos/installing-and-configuring-memcached/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find memory used by a group of processes</title>
		<link>http://www.linuxserver.org/linux/find-memory-used-by-a-group-of-processes/</link>
		<comments>http://www.linuxserver.org/linux/find-memory-used-by-a-group-of-processes/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 05:36:21 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[average memory]]></category>
		<category><![CDATA[Group of Processes]]></category>
		<category><![CDATA[Memory Usage]]></category>
		<category><![CDATA[Memory used]]></category>
		<category><![CDATA[non-swapped]]></category>
		<category><![CDATA[physical memory]]></category>
		<category><![CDATA[resident set size]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=171</guid>
		<description><![CDATA[## To find memory used by a group of processes (Example: php-cgi / http): ps aux &#124; grep &#8211;exclude=grep httpd &#124; awk &#8216;BEGIN{s=0;}{s=s+$6;}END{print s;}&#8217; ## To find the average memory after a group of processes: ps aux &#124; grep &#8211;exclude=grep httpd &#124; awk &#8216;BEGIN{s=0;}{s=s+$6;}END{print s/126;}&#8217; Note: The return value is expressed in KB. From holy [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>## To find memory used by a group of processes (Example: php-cgi / http):<br />
ps aux | grep &#8211;exclude=grep httpd | awk &#8216;BEGIN{s=0;}{s=s+$6;}END{print s;}&#8217;</p>
<p>## To find the average memory after a group of processes:<br />
ps aux | grep &#8211;exclude=grep httpd | awk &#8216;BEGIN{s=0;}{s=s+$6;}END{print s/126;}&#8217;</p>
<p>Note: The return value is expressed in KB.</p>
<p>From holy &#8220;man ps&#8221;:<br />
RSS: resident set size, the non-swapped physical memory used That HAS to task (in kilobytes)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/find-memory-used-by-a-group-of-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suphp + DSO on the same server</title>
		<link>http://www.linuxserver.org/web-server/apache/suphp-dso-on-the-same-server/</link>
		<comments>http://www.linuxserver.org/web-server/apache/suphp-dso-on-the-same-server/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 19:59:53 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[dso]]></category>
		<category><![CDATA[libphp5]]></category>
		<category><![CDATA[mod_php]]></category>
		<category><![CDATA[mod_suphp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5_module]]></category>
		<category><![CDATA[suPHP]]></category>
		<category><![CDATA[suphp_module]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=167</guid>
		<description><![CDATA[First of all we will explain the terms used. DSO &#8211; Dynamic Shared Object MPM &#8211; Multi-Processing Modules The idea is to run on the same apache both mod_php (DSO) with suphp. First, mod_php is very fast but sux at security chapter. In this case (example) Apache with MPM Prefork have two virtual hosts, each [...]]]></description>
			<content:encoded><![CDATA[<p>First of all we will explain the terms used.</p>
<p>DSO &#8211; Dynamic Shared Object<br />
MPM &#8211; Multi-Processing Modules</p>
<p>The idea is  to run on the same apache both mod_php (DSO) with suphp. First, mod_php is very fast but sux at security chapter.<br />
In this case (example) Apache with MPM Prefork have two virtual hosts, each one with suPHP and mod_php. For better understand, I&#8217;ll start with sections of configuration file (httpd.conf).</p>
<p>If you have any questions, please leave a comment.</p>
<p><code></p>
<blockquote><p># # Load Modules<br />
LoadModule suphp_module            modules/mod_suphp.so<br />
LoadModule php5_module             modules/libphp5.so</p>
<p># # SuPHP Configuration<br />
<IfModule mod_suphp.c><br />
 suPHP_Engine on<br />
 suPHP_AddHandler x-httpd-php<br />
 AddHandler x-httpd-php .php .phtml<br />
suPHP_ConfigPath /usr/local/etc<br />
</IfModule></p>
<p># # Default, mod_php is OFF (PHP engine off), so suPHP is default.<br />
php_admin_flag engine off</p>
<p># # Virtual host that uses suPHP<br />
<VirtualHost 4.4.4.4><br />
 DocumentRoot /home/cristian/www/example.com<br />
 ServerAdmin tech@linuxserver.org<br />
 ServerName example.com<br />
 ServerAlias www.example.com<br />
 CustomLog logs/example.com-access_log combined<br />
 ErrorLog logs/example.com-error_log<br />
 suPHP_UserGroup cristian cristian<br />
 suPHP_ConfigPath /etc/userconfig/cristian<br />
</VirtualHost></p>
<p># Virtual host that uses mod_php (DSO)<br />
<VirtualHost 4.4.4.4><br />
 DocumentRoot /home/client/www/websiteclient.com<br />
 ServerAdmin cristian@linuxserver.org<br />
 ServerName websiteclient.com<br />
 ServerAlias www.websiteclient.com<br />
 CustomLog logs/websiteclient.com-access_log combined<br />
 ErrorLog logs/websiteclient.com-error_log<br />
 suPHP_Engine Off<br />
 php_admin_flag engine on<br />
 RemoveHandler .php<br />
</VirtualHost></p></blockquote>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/web-server/apache/suphp-dso-on-the-same-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP virtual host settings in Apache with DSO</title>
		<link>http://www.linuxserver.org/web-server/apache/php-virtual-host-settings-in-apache-with-dso/</link>
		<comments>http://www.linuxserver.org/web-server/apache/php-virtual-host-settings-in-apache-with-dso/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 12:12:31 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[dso]]></category>
		<category><![CDATA[mod_php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php settings]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[php_admin_value]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=164</guid>
		<description><![CDATA[Perhaps you have wondered how to set per virtual host settings when using mod_php (DSO) to apache. The suPHP is simple for each user or virtual host can have his own php.ini . In the example below you can see how to configure a virtual host with PHP custom settings. We use Suhosin to enhance [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps you have wondered how to set per virtual host settings when using mod_php (DSO) to apache.<br />
The suPHP is simple for each user or virtual host can have his own php.ini .<br />
In the example below you can see how to configure a virtual host with PHP custom settings.<br />
We use Suhosin to enhance security.</p>
<blockquote><p><VirtualHost 3.3.3.3><br />
 DocumentRoot /home/vhosts/www/linuxserver.org<br />
 ServerAdmin admin@linuxserver.org<br />
 ServerName linuxserver.org<br />
 ServerAlias www.linuxserver.org<br />
 CustomLog logs/linuxserver.org-access_log combined<br />
 ErrorLog logs/linuxserver.org-error_log<br />
 php_admin_value suhosin.executor.func.blacklist &#8220;exec,shell_exec,passthru,show_source,dl,leak,ini_alter,ini_restore,proc_open,proc_nice,proc_terminate,proc_close,proc_get_status,symlink,system,popen,pcntl_getpriority,pcntl_wait,diskfreespace,disk_free_space,disk_total_space,get_current_user,get_headers,headers_list,stream_socket_accept,stream_socket_client,stream_socket_get_name,stream_socket_recvfrom,stream_socket_sendto,stream_socket_server,stream_socket_shutdown&#8221;<br />
 php_admin_value disable_functions &#8220;exec,shell_exec,passthru,dl&#8221;<br />
 php_admin_value open_basedir &#8220;/home/vhosts/www:/usr/local/bin:/usr/bin:/tmp:/usr/local/share/pear&#8221;<br />
 php_admin_value memory_limit 88M<br />
 php_admin_value post_max_size 56M<br />
 php_admin_value max_execution_time 25<br />
 php_admin_value max_input_time 60<br />
</VirtualHost></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/web-server/apache/php-virtual-host-settings-in-apache-with-dso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPN Server on Debian Lenny</title>
		<link>http://www.linuxserver.org/linux/debian/vpn-server-on-debian-lenny/</link>
		<comments>http://www.linuxserver.org/linux/debian/vpn-server-on-debian-lenny/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 10:52:44 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debian Lenny]]></category>
		<category><![CDATA[setup VPN Server]]></category>
		<category><![CDATA[VPN Server]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=162</guid>
		<description><![CDATA[Installation and setup for a VPN server on Debian Lenny in few minutes # Install pptpd apt-get install pptpd # Turn on IP Forwarding sysctl-w net.ipv4.ip_forward = 1 # We set the permanent IP forwarding pico /etc/sysctl.conf # Remove the comment line &#8220;net.ipv4.ip_forward = 1&#8243; # Configure pptpd # Example: 10.0.1.1 LOCALIP remoteip 10.0.0.3-10.0.0.200 # [...]]]></description>
			<content:encoded><![CDATA[<p>Installation and setup for a VPN server on Debian Lenny in few minutes</p>
<blockquote><p>
# Install pptpd<br />
apt-get install pptpd</p>
<p># Turn on IP Forwarding<br />
sysctl-w net.ipv4.ip_forward = 1</p>
<p># We set the permanent IP forwarding<br />
pico /etc/sysctl.conf<br />
# Remove the comment line &#8220;net.ipv4.ip_forward = 1&#8243;</p>
<p># Configure pptpd<br />
# Example:<br />
10.0.1.1 LOCALIP<br />
remoteip 10.0.0.3-10.0.0.200</p>
<p># Configure DNS<br />
# File &#8220;/etc/ppp/pptpd-options&#8221;<br />
# Example DNS sites:<br />
ms-dns 4.2.2.2<br />
ms-dns 4.2.2.3</p>
<p># We add authentication in &#8220;/etc/ppp/pap-secrets&#8217;<br />
# Format: username pptpd password *<br />
echo &#8220;test pptpd cdhc1346wvkv *&#8221;> /etc/ppp/pap-secrets</p>
<p># Restart the daemon<br />
/etc/init.d/pptpd restart</p>
<p># allow port 1723 / TCP if we want to connect from outside.<br />
iptables-I INPUT-p tcp &#8211; dport 1723 -j ACCEPT</p>
<p># we are done here.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/debian/vpn-server-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set Date Time and Timezone on linux</title>
		<link>http://www.linuxserver.org/linux/set-date-time-and-timezone-on-linux/</link>
		<comments>http://www.linuxserver.org/linux/set-date-time-and-timezone-on-linux/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 10:43:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Set Date and time]]></category>
		<category><![CDATA[Timezone]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=160</guid>
		<description><![CDATA[To synchronize with a server on the exact time and if you want to set the hardware clock in localtime and time as short as possible, you can use the example below, (this example is for linux) root@example[~] # rm /etc/localtime &#038;&#038; ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime root@example[~] # ntpdate -vb de.pool.ntp.org &#038;&#038; hwclock -w Aug [...]]]></description>
			<content:encoded><![CDATA[<p>To synchronize with a server on the exact time and if you want to set the hardware clock in localtime and time as short as possible, you can use the example below, (this example is for linux)</p>
<p>root@example[~] # rm /etc/localtime &#038;&#038; ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime<br />
root@example[~] # ntpdate -vb de.pool.ntp.org &#038;&#038; hwclock -w<br />
Aug 17 04:23:43 ntpdate[6332]: ntpdate 4.2.4p4@1.1520-o Mon May 12 19:58:15 UTC 2009 (1)<br />
Aug 17 04:23:49 ntpdate[6332]: step time server 92.86.31.38 offset 14.817283 sec<br />
root@example[~] # date<br />
Wed Aug 17 12:40:25 EEST 2011<br />
root@example[~] #</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/set-date-time-and-timezone-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Apache and PHP on Debian</title>
		<link>http://www.linuxserver.org/linux/debian/installing-apache-and-php-on-debian/</link>
		<comments>http://www.linuxserver.org/linux/debian/installing-apache-and-php-on-debian/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 10:36:25 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Apache on Debian]]></category>
		<category><![CDATA[Installing Apache]]></category>
		<category><![CDATA[PHP on Debian]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=156</guid>
		<description><![CDATA[This is a tutorial for beginners extremely small: In this short tutorial I will show you how to install apache and php on Debian in just 4 minutes. Setting the example was done on a virtual machine. &#160; root@example:~# apt-get install apache2 root@example:~# apt-get install php5 php5-cli php5-cgi php5-curl php5-common php5-gd php5-mcrypt php5-mysql php5-tidy libapache2-mod-php5 [...]]]></description>
			<content:encoded><![CDATA[<p>This is a tutorial for beginners extremely small: In this short tutorial I will show you how to install apache and php on Debian in just 4 minutes. Setting the example was done on a virtual machine.</p>
<p>&nbsp;</p>
<blockquote><p>root@example:~# apt-get install apache2<br />
root@example:~# apt-get install php5 php5-cli php5-cgi php5-curl php5-common php5-gd php5-mcrypt php5-mysql php5-tidy libapache2-mod-php5<br />
root@example:~# a2enmod rewrite<br />
root@example:~# /etc/init.d/apache2 restart<br />
root@example:~# echo &#8220;&#8221; &gt;&gt; /var/www/index.php<br />
root@example:~# rm /var/www/index.html</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/debian/installing-apache-and-php-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS configuration Ubuntu</title>
		<link>http://www.linuxserver.org/linux/ubuntu/dns-configuration-ubuntu/</link>
		<comments>http://www.linuxserver.org/linux/ubuntu/dns-configuration-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 11:20:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns install]]></category>
		<category><![CDATA[dns linux]]></category>
		<category><![CDATA[Domain Name Service]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=149</guid>
		<description><![CDATA[9WWVWRNNBR6R Domain Name Service (DNS) is an Internet service that maps IP addresses and fully qualified domain names (FQDN) to one another. In this way, DNS alleviates the need to remember IP addresses. Computers that run DNS are called name servers. Ubuntu ships with BIND (Berkley Internet Naming Daemon), the most common program used for [...]]]></description>
			<content:encoded><![CDATA[<p>9WWVWRNNBR6R</p>
<p>Domain Name Service (DNS) is an Internet service that maps IP addresses and fully                 qualified domain names (FQDN) to one another. In this way, DNS alleviates the need to                 remember IP addresses. Computers that run DNS are called                 <em>name                 servers</em>. Ubuntu ships with <strong>BIND</strong> (Berkley                 Internet Naming Daemon), the most common program used for maintaining a name                 server on GNU/Linux.</p>
<div lang="C">
<div>
<div>
<div>
<h3>Installation</h3>
</div>
</div>
</div>
<p>At a terminal prompt, enter the following command to install                   <strong>dns</strong>:</p>
<pre><strong>sudo apt-get install bind</strong></pre>
<h3>Configuration</h3>
</div>
<div lang="C">
<p>The DNS configuration files are stored in the           <code>/etc/bind</code> directory. The           primary configuration file is          <code>/etc/bind/named.conf</code>. The content           of the default configuration file is shown below:</p>
<p>&nbsp;</p>
<pre>// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind/README.Debian for information on the
// structure of BIND configuration files in Debian for BIND versions 8.2.1
// and later, *BEFORE* you customize this configuration file.
//

include "/etc/bind/named.conf.options";

// reduce log verbosity on issues outside our control
logging {
	category lame-servers { null; };
	category cname { null; };
};

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

// add local zone definitions here
include "/etc/bind/named.conf.local";</pre>
<p>&nbsp;</p>
<p>The <strong>include</strong> line specifies the           filename which contains the DNS options. The           <strong>directory</strong> line in the options file tells           DNS where to look for files. All files BIND uses will be           relative to this directory.</p>
<p>The file named <code>/etc/bind/db.root</code> describes the root name servers in the world. The servers           change over time and must be maintained now and then.</p>
<p>The <strong>zone</strong> section defines a master           server, and it is stored in a file mentioned against file tag.           Every zone file contains 3 resource records (RRs): an SOA RR, an           NS RR and a PTR RR. SOA is short of Start of Authority. The           &#8220;@&#8221; is a special notation meaning the origin. NS is the Name           Server RR. PTR is Domain Name Pointer.  To start the DNS server,           run the following command from a terminal prompt:</p>
<pre><strong>sudo /etc/init.d/bind start</strong></pre>
<p>You can refer to the           documentation mentioned in the references section for details.</p>
<h3>References</h3>
<p><a href="http://www.tldp.org/HOWTO/DNS-HOWTO.html" target="_top">DNS HOWTO</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/ubuntu/dns-configuration-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DHCP server on Ubuntu</title>
		<link>http://www.linuxserver.org/linux/ubuntu/dhcp-server-on-ubuntu/</link>
		<comments>http://www.linuxserver.org/linux/ubuntu/dhcp-server-on-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 11:17:31 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dhcp configuration]]></category>
		<category><![CDATA[dhcp install]]></category>
		<category><![CDATA[dhcp protocol]]></category>
		<category><![CDATA[DHCP server]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=146</guid>
		<description><![CDATA[Learn how to install Dynamic Host Configuration Protocol The Dynamic Host Configuration Protocol (DHCP) is a network service that enables host computers to be automatically assigned settings from a server as opposed to manually configuring each network host. Computers configured to be DHCP clients have no control over the settings they receive from the DHCP [...]]]></description>
			<content:encoded><![CDATA[<h3>Learn how to install Dynamic Host Configuration Protocol</h3>
<p>The Dynamic Host Configuration Protocol (DHCP) is a network service that enables host                 computers to be automatically assigned settings from a server as opposed to                 manually configuring each network host. Computers configured to be DHCP clients have                 no control over the settings they receive from the DHCP server, and the configuration                 is transparent to the computer&#8217;s user.</p>
<p>The most common settings provided by a DHCP server to DHCP clients include:</p>
<div>
<ul type="disc" compact="compact">
<li>IP-Address and Netmask</li>
<li>DNS</li>
<li>WINS</li>
</ul>
</div>
<p>However, a DHCP server can also supply configuration properties such as:</p>
<div>
<ul type="disc" compact="compact">
<li>Host Name</li>
<li>Domain Name</li>
<li>Default Gateway</li>
<li>Time Server</li>
<li>Print Server</li>
</ul>
</div>
<p>The advantage of using DHCP is that changes to the network, for example a change                 in the address of the DNS server, need only be changed at the DHCP server, and all                 network hosts will be reconfigured the next time their DHCP clients poll the                 DHCP server. As an added advantage, it is also easier to integrate new computers into                 the network, as there is no need to check for the availability of an IP address.                 Conflicts in IP address allocation are also reduced.</p>
<p>A DHCP server can provide configuration settings using two methods:</p>
<div>
<dl>
<dt> MAC Address </dt>
<dd>This method entails using DHCP to identify the unique hardware address                             of each network card connected to the network and then continually                             supplying a constant configuration each time the DHCP client makes a                             request to the DHCP server using that network device.</p>
</dd>
<dt> Address Pool </dt>
<dd>This method entails defining a pool (sometimes also called a range or                             scope) of IP addresses from which DHCP clients are supplied their                             configuration properties dynamically and on a fist come first serve                             basis. When a DHCP client is no longer on the network for a specified                             period, the configuration is expired and released back to the address                             pool for use by other DHCP Clients.</p>
</dd>
</dl>
</div>
<p>Ubuntu is shipped with both DHCP server and client. The server is                     <strong>dhcpd</strong> (dynamic host configuration protocol daemon).                 The client provided with Ubuntu is                 <strong>dhclient</strong> and should be                 installed on all computers required to be automatically configured. Both programs                 are easy to install and configure and will be automatically started at system boot.</p>
<div lang="C">
<div>
<div>
<div>
<h3>Installation</h3>
</div>
</div>
</div>
<p>At a terminal prompt, enter the following command to install                   <strong>dhcpd</strong>:</p>
<pre><strong>sudo apt-get install dhcpd</strong>
</pre>
<p>You will see the following output, which explains what to do next:</p>
<pre>Please note that if you are installing the DHCP server for the first
time you need to configure. Please stop (/etc/init.d/dhcp
stop) the DHCP server daemon, edit /etc/dhcpd.conf to suit your needs
and particular configuration, and restart the DHCP server daemon
(/etc/init.d/dhcp start).

You also need to edit /etc/default/dhcp to specify the interfaces dhcpd
should listen to. By default it listens to eth0.

NOTE: dhcpd's messages are being sent to syslog. Look there for
diagnostics messages.

Starting DHCP server: dhcpd failed to start - check syslog for diagnostics.</pre>
</div>
<div lang="C">
<div>
<div>
<div>
<h3>Configuration</h3>
</div>
</div>
</div>
<p>The error message the installation ends with might be a little confusing, but the                 following steps will help you configure the service:</p>
<p>Most commonly, what you want to do is assign an IP address randomly. This can be                 done with settings as follows:</p>
<pre># Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}</pre>
<p>This will result in the DHCP server giving a client an IP address from the range                 192.168.1.10-192.168.1.100 or 192.168.1.150-192.168.1.200. It will lease an IP                 address for 600 seconds if the client doesn&#8217;t ask for a specific time frame. Otherwise                 the maximum (allowed) lease will be 7200 seconds. The server will also &#8220;advise&#8221; the                 client that it should use 255.255.255.0 as its subnet mask, 192.168.1.255 as its                 broadcast address, 192.168.1.254 as the router/gateway and 192.168.1.1 and                 192.168.1.2 as its DNS servers.</p>
<p>If you need to specify a WINS server for your Windows clients, you will need to                 include the netbios-name-servers option, e.g.</p>
<pre>option netbios-name-servers 192.168.1.1;</pre>
<p>Dhcpd configuration settings are taken from the DHCP mini-HOWTO, which can be found                     <a href="http://www.tldp.org/HOWTO/DHCP/index.html" target="_top">here</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/ubuntu/dhcp-server-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network  File  System  on  Ubuntu</title>
		<link>http://www.linuxserver.org/linux/ubuntu/network-file-system-on-ubuntu/</link>
		<comments>http://www.linuxserver.org/linux/ubuntu/network-file-system-on-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 11:12:41 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Network File System]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=140</guid>
		<description><![CDATA[NFS allows a system to share directories and files with others over a network. By using NFS, users and programs can access files on remote systems almost as if they were local files. Some of the most notable benefits that NFS can provide are: Local workstations use less disk space because commonly used data can [...]]]></description>
			<content:encoded><![CDATA[<p>NFS allows a system to share directories and files with others           over a network. By using NFS, users and programs can access           files on remote systems almost as if they were local files.</p>
<p>Some of the most notable benefits that NFS can provide are:</p>
<ul type="disc">
<li>Local workstations use less disk space because commonly used data can be stored on a single machine and still remain accessible to others over the network.</li>
<li>There is no need for users to have separate home directories on every network machine. Home directories could be set up on the NFS server and made available throughout the network.</li>
<li>Storage devices such as floppy disks, CDROM drives, and USB Thumb drives can be used by other machines on the network. This may reduce the number of removable media drives throughout the network.</li>
</ul>
<h3>Installation</h3>
<p>At a terminal prompt enter the following command to install the NFS           Server:</p>
<p>&nbsp;</p>
<pre><strong>sudo apt-get install nfs-kernel-server</strong></pre>
<p>&nbsp;</p>
<h3>Configuration</h3>
<p>You can configure the directories to be exported by adding them to           the <code>/etc/exports</code> file. For example:</p>
<p>&nbsp;</p>
<pre>/ubuntu  *(ro,sync,no_root_squash)
/home    *(rw,sync,no_root_squash)</pre>
<p>&nbsp;</p>
<p>You can replace * with one of the hostname formats. Make the           hostname declaration as specific as possible so unwanted           systems cannot access the NFS mount.</p>
<p>To start the NFS server, you can run the following command at a terminal prompt:</p>
<p>&nbsp;<br />
<strong>sudo /etc/init.d/nfs-kernel-server start</strong>&nbsp;</p>
<h3>NFS Client Configuration</h3>
<p>Use the <strong>mount</strong> command to mount a shared NFS directory from           another machine, by typing a command line similar to the following at a terminal prompt:</p>
<p>&nbsp;</p>
<pre><strong>sudo mount example.hostname.com:/ubuntu /local/ubuntu</strong></pre>
<p>&nbsp;</p>
<table border="0" summary="Warning">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">The mount point directory <code>/local/ubuntu</code> must       exist. There should be no files or subdirectories in the       <code>/local/ubuntu</code> directory.</td>
</tr>
</tbody>
</table>
<p>An alternate way to mount an NFS share from another machine is to        add a line to the <code>/etc/fstab</code> file. The line must state the        hostname of the NFS server, the directory on the server being        exported, and the directory on the local machine where the NFS        share is to be mounted.</p>
<p>The general syntax for the line in <code>/etc/fstab</code> file is as follows:</p>
<p>&nbsp;</p>
<pre>example.hostname.com:/ubuntu /local/ubuntu nfs rsize=8192,wsize=8192,timeo=14,intr</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/ubuntu/network-file-system-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Openssh server on ubuntu</title>
		<link>http://www.linuxserver.org/linux/ubuntu/openssh-server-on-ubuntu/</link>
		<comments>http://www.linuxserver.org/linux/ubuntu/openssh-server-on-ubuntu/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 08:59:22 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=135</guid>
		<description><![CDATA[OpenSSH is a freely available version of the Secure Shell (SSH) protocol family of tools for remotely controlling a computer or transferring files between computers. Traditional tools used to accomplish these functions, such as telnet or rcp, are insecure and transmit the user&#8217;s password in cleartext when used. OpenSSH provides a server daemon and client [...]]]></description>
			<content:encoded><![CDATA[<p>OpenSSH is a freely available version of the Secure Shell (SSH) protocol family of              tools for remotely controlling a computer or transferring files between computers.             Traditional tools used to accomplish these functions, such as <strong>telnet</strong> or <strong>rcp</strong>, are insecure and transmit the user&#8217;s password in             cleartext when used. OpenSSH provides a server daemon and client tools to facilitate             secure, encrypted remote control and file transfer operations, effectively replacing             the legacy tools.</p>
<p>The OpenSSH server component, <strong>sshd</strong>, listens continuously for             client connections from any of the client tools. When a connection request occurs,             <strong>sshd</strong> sets up the correct connection depending on the type             of client tool connecting. For example, if the remote computer is connecting with the             <strong>ssh</strong> client application, the OpenSSH server sets up a remote             control session after authentication. If a remote user connects to an OpenSSH server with             <strong>scp</strong>, the OpenSSH server daemon initiates a secure copy of files             between the server and client after authentication. OpenSSH can use many authentication             methods, including plain password, public key, and <strong>Kerberos</strong> tickets.</p>
<h3>Installation</h3>
<p>Installation of the OpenSSH client and server applications is  simple. To install the OpenSSH client applications on your Ubuntu  system, use this command at a terminal prompt:</p>
<pre><strong>sudo apt-get install openssh-client</strong>
</pre>
<p>To install the OpenSSH server application, and related support files, use this command at a terminal prompt:</p>
<pre><strong>sudo apt-get install openssh-server</strong>
</pre>
<h3>Configuration</h3>
<p>You may configure the default behavior of the OpenSSH server application, <strong>sshd</strong>, by editing the file <code>/etc/ssh/sshd_config</code>. For information about the configuration directives used in this file, you may               view the appropriate manual page with the following command, issued at a terminal prompt:</p>
<pre><strong>man sshd_config</strong>
</pre>
<p>There are many directives in the <strong>sshd</strong> configuration file controlling such things as communications             settings and authentication modes. The following are  examples of configuration directives that can be changed by editing the <code>/etc/ssh/ssh_config</code> file.</p>
<table border="0" summary="Tip">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Prior to editing the configuration file, you should make a copy of the original file and protect it                 from writing so you will have the original settings as a reference and to reuse as necessary.</p>
<p>Copy the <code>/etc/ssh/sshd_config</code> file and protect it from writing with the following commands, issued at a terminal prompt:</td>
</tr>
</tbody>
</table>
<pre><strong>sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original</strong>
<strong>sudo chmod a-w /etc/ssh/sshd_config.original</strong>
</pre>
<p>The following are examples of configuration directives you may change:</p>
<div>
<ul type="disc">
<li>To set your OpenSSH to listen on TCP port 2222 instead of the default TCP port 22, change                the Port directive as such:Port 2222</li>
<li>To have <strong>sshd</strong> allow public key-based login credentials, simply add or modify the line:PubkeyAuthentication yes
<p>in the <code>/etc/ssh/sshd_config</code> file, or if already present, ensure the line is not commented out.</li>
<li>To make your OpenSSH server display the contents of the <code>/etc/issue.net</code> file as a pre-login              banner, simply add or modify the line:Banner  /etc/issue.net
<p>in the <code>/etc/ssh/sshd_config</code> file.</li>
</ul>
<p>After making changes to the <code>/etc/ssh/sshd_config</code> file, save the file, and restart the <strong>sshd</strong> server application to effect the changes using the following command at a terminal prompt:</p>
<pre><strong>sudo /etc/init.d/ssh restart</strong>
</pre>
<table border="0" summary="Warning">
<tbody>
<tr>
<td rowspan="2" width="25" align="center" valign="top"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">Many other configuration directives for <strong>sshd</strong> are available for changing the server application&#8217;s                            behavior to fit your needs. Be advised, however, if your only method of access to a server is <strong>ssh</strong>,                            and you make a mistake in configuring <strong>sshd</strong> via the <code>/etc/ssh/sshd_config</code> file, you may find you                            are locked out of the server upon restarting it, or that the <strong>sshd</strong> server refuses to start due                            to an incorrect configuration directive, so  be extra careful when editing this file on a remote server.</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/ubuntu/openssh-server-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to configure ubuntu firewall</title>
		<link>http://www.linuxserver.org/linux/ubuntu/how-to-configure-ubuntu-firewall/</link>
		<comments>http://www.linuxserver.org/linux/ubuntu/how-to-configure-ubuntu-firewall/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 08:54:34 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=130</guid>
		<description><![CDATA[The Linux kernel includes the Netfilter subsystem, which is used to manipulate or decide the fate of network traffic headed into or through your server. All modern Linux firewall solutions use this system for packet filtering. Firewall Introduction The kernel&#8217;s packet filtering system would be of little use to administrators without a userspace interface to [...]]]></description>
			<content:encoded><![CDATA[<p>The Linux kernel includes the <em>Netfilter</em> subsystem, 			 which is used to manipulate or decide the fate of network traffic headed into or through 			 your server.  All modern Linux firewall solutions use this system for packet filtering.</p>
<h3>Firewall Introduction</h3>
<p>The kernel&#8217;s packet filtering system would be of little use to administrators without 			  a userspace interface to manage it.  This is the purpose of iptables.  When a packet 			  reaches your server, it will be handed off to the Netfilter subsystem for acceptance, 			  manipulation, or rejection based on the rules supplied to it from userspace via 			  iptables.  Thus, iptables is all you need to manage your firewall if you&#8217;re familiar 			  with it, but many frontends are available to simplify the task.</p>
<h3>IP Masquerading</h3>
<p>The purpose of IP Masquerading is to allow machines with private, non-routable IP 			  addresses on your network to access the Internet through the machine doing the 			  masquerading.  Traffic from your private network destined for the Internet must be 			  manipulated for replies to be routable back to the machine that made the request. 			  To do this, the kernel must modify the <em>source</em> IP address of each packet so that replies will be routed back to it, rather than 			  to the private IP address that made the request, which is impossible over the  			  Internet.  Linux uses <em>Connection Tracking</em> (conntrack) to keep track of which connections belong to which machines and reroute 			  each return packet accordingly.  Traffic leaving your private network is thus 			  &#8220;masqueraded&#8221; as having originated from your Ubuntu gateway machine. 			  This process is referred to in Microsoft documentation as Internet 			  Connection Sharing.</p>
<p>This can be accomplished with a single iptables rule, which may differ slightly 			  based on your network configuration:</p>
<pre>sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o ppp0 -j MASQUERADE</pre>
<p>The above command assumes that your private address space is 192.168.0.0/16 and 			  that your Internet-facing device is ppp0.  The syntax is broken down as follows:</p>
<ul type="disc">
<li>-t nat &#8212; the rule is to go into the nat table</li>
<li>-A POSTROUTING &#8212; the rule is to be appended (-A) to the POSTROUTING  				  chain</li>
<li>-s 192.168.0.0/16 &#8212; the rule applies to traffic originating from the 				  specified address space</li>
<li>-o ppp0 &#8212; the rule applies to traffic scheduled to be routed through 				  the specified network device</li>
<li>-j MASQUERADE &#8212; traffic matching this rule is to &#8220;jump&#8221; 				  (-j) to the MASQUERADE target to be manipulated as described above</li>
</ul>
<p>Each chain in the filter table (the default table, and where most or all packet 			  filtering occurs) has a default <em>policy</em> of 			  ACCEPT, but if you are creating a firewall in addition to a gateway device, you 			  may have set the policies to DROP or REJECT, in which case your masqueraded 			  traffic needs to be allowed through the FORWARD chain for the above rule to work:</p>
<pre>sudo iptables -A FORWARD -s 192.168.0.0/16 -o ppp0 -j ACCEPT
sudo iptables -A FORWARD -d 192.168.0.0/16 -m state --state ESTABLISHED,RELATED -i ppp0 -j ACCEPT</pre>
<p>The above commands will allow all connections from your local network to the 			  Internet and all traffic related to those connections to return to the machine 			  that initiated them.</p>
<h3>Tools</h3>
<p>There are many tools available to help you construct a complete firewall without 			  intimate knowledge of iptables.  For the GUI-inclined,  			  <strong>Firestarter</strong> is quite popular and easy to use, and 			  <strong>fwbuilder</strong> is very powerful and will look familiar  			  to an administrator who has used a commercial firewall utility such as Checkpoint  			  FireWall-1.  If you prefer a command-line tool with plain-text configuration files,  			  <strong>Shorewall</strong> is a very powerful solution to help you  			  configure an advanced firewall for any network.  If your network is relatively  			  simple, or if you don&#8217;t have a network, <strong>ipkungfu</strong> should  			  give you a working firewall &#8220;out of the box&#8221; with zero configuration,  			  and will allow you to easily set up a more advanced firewall by editing simple,  			  well-documented configuration files.  Another interesting tool is  			  <strong>fireflier</strong>, which is designed to be a desktop firewall  			  application.  It is made up of a server (fireflier-server) and your choice of GUI  			  clients (GTK or QT), and behaves like many popular interactive firewall  			  applications for Windows.</p>
<h3>Logs</h3>
<p>Firewall logs are essential for recognizing attacks, troubleshooting your 			  firewall rules, and noticing unusual activity on your network.  You must include 			  logging rules in your firewall for them to be generated, though, and logging 			  rules must come before any applicable terminating rule (a rule with a target 			  that decides the fate of the packet, such as ACCEPT, DROP, or REJECT).  For 			  example:</p>
<pre>sudo iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j LOG --log-prefix "NEW_HTTP_CONN: "</pre>
<p>A request on port 80 from the local machine, then, would generate a log in dmesg 			  that looks like this:</p>
<pre>[4304885.870000] NEW_HTTP_CONN: IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=127.0.0.1 DST=127.0.0.1 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=58288 DF PROTO=TCP SPT=53981 DPT=80 WINDOW=32767 RES=0x00 SYN URGP=0</pre>
<p>The above log will also appear in <code>/var/log/messages</code>, 			  <code>/var/log/syslog</code>, and <code>/var/log/kern.log</code>. 			  This behavior can be modified by editing <code>/etc/syslog.conf</code> appropriately or by installing and configuring <strong>ulogd</strong> and using the ULOG target instead of LOG.  The <strong>ulogd</strong> daemon is a userspace server that listens for logging instructions from the kernel 			  specifically for firewalls, and can log to any file you like, or even to a 			  <strong>PostgreSQL</strong> or <strong>MySQL</strong> database.  Making sense of your firewall logs can be simplified by using a log 			  analyzing tool such as <strong>fwanalog</strong>, <strong> fwlogwatch</strong>, or <strong>lire</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/ubuntu/how-to-configure-ubuntu-firewall/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to configure Ubuntu network</title>
		<link>http://www.linuxserver.org/linux/ubuntu/how-to-configure-ubuntu-network/</link>
		<comments>http://www.linuxserver.org/linux/ubuntu/how-to-configure-ubuntu-network/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 08:49:22 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.linuxserver.org/?p=126</guid>
		<description><![CDATA[Ethernet Most ethernet configuration is centralized in a single file, /etc/network/interfaces. If you have no ethernet devices, only the loopback interface will appear in this file, and it will look something like this: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). [...]]]></description>
			<content:encoded><![CDATA[<h3>Ethernet</h3>
<p>Most ethernet configuration is centralized in a single file, 		  <code>/etc/network/interfaces</code>.  If you have no ethernet devices, only 		  the loopback interface will appear in this file, and it will look something like 		  this:</p>
<pre># This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0</pre>
<p>If you have only one ethernet device, eth0, and it gets its configuration from a DHCP server, 		and it should come up automatically at boot, only two additional lines are required:</p>
<pre>auto eth0
iface eth0 inet dhcp</pre>
<p>The first line specifies that the eth0 device should come up automatically when you boot. 		The second line means that interface (“iface”) eth0 should have an IPv4 address 		space (replace “inet” with “inet6” for an IPv6 device) and that 		it should get its configuration automatically from DHCP.  Assuming your network and DHCP 		server are properly configured, this machine&#8217;s network should need no further configuration to 		operate properly.  The DHCP server will provide the default gateway (implemented via the 		<strong>route</strong> command), the device&#8217;s IP address (implemented via the  		<strong>ifconfig</strong> command), and and DNS servers used on the network 		(implemented in the <code>/etc/resolv.conf</code> file.)</p>
<p>To configure your ethernet device with a static IP address and custom configuration, 		some more information will be required.  Suppose you want to assign the IP address 		192.168.0.2 to the device eth1, with the typical netmask of 255.255.255.0.  Your default 		gateway&#8217;s IP address is 192.168.0.1.  You would enter something like this into 		<code>/etc/network/interfaces</code>:</p>
<pre>iface eth1 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1</pre>
<p>In this case, you will need to specify your DNS servers manually in 		<code>/etc/resolv.conf</code>, which should look something like this:</p>
<pre>search mydomain.com
nameserver 192.168.0.1
nameserver 4.2.2.2</pre>
<p>The search directive will append mydomain.com 		to hostname queries in an attempt to resolve names to your network.  For example, 		if your network&#8217;s domain is mydomain.com and you try to ping the host 		“mybox”, the DNS query will be modified to “mybox.mydomain.com” 		for resolution.  The nameserver directives 		specifiy DNS servers to be used to resolve hostnames to IP addresses.  If you use 		your own nameserver, enter it here.  Otherwise, ask your Internet Service Provider 		for the primary and secondary DNS servers to use, and enter them into 		<code>/etc/resolv.conf</code> as shown above.</p>
<p>Many more configurations are possible, including dialup PPP interfaces, IPv6 		networking, VPN devices, etc.  Refer to <strong>man 5 interfaces</strong> for more information and supported options.  Remember that 		<code>/etc/network/interfaces</code> is used by the  		<strong>ifup</strong>/<strong>ifdown</strong> scripts as a 		higher level configuration scheme than may be used in some other Linux distributions, 		and that the traditional, lower level utilities such as <strong>ifconfig</strong>, 		<strong>route</strong>, and <strong>dhclient</strong> are still 		available to you for ad hoc configurations.</p>
<h3>Managing DNS Entries</h3>
<p>This section explains how to configure the nameserver             to use when resolving IP address to hostnames and vice             versa. It does not explain how to configure the system as a name             server.</p>
<p>To manage DNS entries, you can add, edit, or remove DNS names             from the <code>/etc/resolv.conf</code> file. A sample file is given below:</p>
<pre>search com
nameserver 204.11.126.131
nameserver 64.125.134.133
nameserver 64.125.134.132
nameserver 208.185.179.218
</pre>
<p>The <strong>search</strong> key specifies the string              which will be appended to an incomplete hostname. Here, we              have mentioned it as <strong>com</strong>. If we              run: <strong>ping <a title="ubuntu server" href="http://www.linuxserver.org/tag/ubuntu-linux/">ubuntu</a></strong> it would be interpreted              as <strong>ping  ubuntu.com</strong>.</p>
<p>The <strong>nameserver</strong> key specifies the             nameserver IP address. It will be used to resolve the given             IP address or hostname. This file can have multiple nameserver             entries. The nameservers will be used by the network query             in the same order</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxserver.org/linux/ubuntu/how-to-configure-ubuntu-network/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

