<?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>linuxbuddies.com &#187; Network</title>
	<atom:link href="http://linuxbuddies.com/category/network/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxbuddies.com</link>
	<description>For linux documentations.</description>
	<lastBuildDate>Fri, 11 Sep 2009 10:11:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enable/ disable ping requests in linux</title>
		<link>http://linuxbuddies.com/2009/01/20/enable-disable-ping-requests-in-linux/</link>
		<comments>http://linuxbuddies.com/2009/01/20/enable-disable-ping-requests-in-linux/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 18:54:11 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[server tweak]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ping]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=299</guid>
		<description><![CDATA[ Ping Requests use ICMP protocols. This is enabled/disabled using sysctl values.
To Disable Ping:
 
echo 1 &#62; /proc/sys/net/ipv4/icmp_echo_ignore_all
 
To Enable Ping:
 
echo 0 &#62; /proc/sys/net/ipv4/icmp_echo_ignore_all
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-298" title="ping" src="http://linuxbuddies.com/wp-content/uploads/2009/01/ping-150x150.gif" alt="ping" width="150" height="150" /> Ping Requests use ICMP protocols. This is enabled/disabled using sysctl values.<br />
To Disable Ping:</p>
<p> </p>
<p style="padding-left: 30px;">echo 1 &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all</p>
<p style="padding-left: 30px;"> </p>
<p>To Enable Ping:</p>
<p> </p>
<p style="padding-left: 30px;">echo 0 &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/enable-disable-ping-requests-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSH login using Public/Private key authentication</title>
		<link>http://linuxbuddies.com/2009/01/20/ssh-login-using-publicprivate-key-authentication/</link>
		<comments>http://linuxbuddies.com/2009/01/20/ssh-login-using-publicprivate-key-authentication/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 18:50:47 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[private key]]></category>
		<category><![CDATA[Public key]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=294</guid>
		<description><![CDATA[ Scenario
To log into &#8220;Server A&#8221; from &#8220;Server B&#8221; without using passwords. Users for both the server will be &#8220;root&#8221;
Process

 Login to &#8220;Server B&#8221; as root user and generate key for the root user. No need to enter any passphrase while generating this key.


ssh-keygen -t rsa
 
Once the key is generated, copy the ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-295" title="key1" src="http://linuxbuddies.com/wp-content/uploads/2009/01/key1-150x150.png" alt="key1" width="150" height="150" /><strong> Scenario</strong></p>
<p><strong><span style="font-weight: normal;">To log into &#8220;Server A&#8221; from &#8220;Server B&#8221; without using passwords. Users for both the server will be &#8220;root&#8221;</span></strong></p>
<p><strong><span style="font-weight: normal;"><span><strong>Process</strong></span><br />
</span></strong></p>
<p><strong><span style="font-weight: normal;"> Login to &#8220;Server B&#8221; as root user and generate key for the root user. No need to enter any passphrase while generating this key.</span></strong></p>
<p><strong><span style="font-weight: normal;"><br />
</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">ssh-keygen -t rsa</span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;">Once the key is generated, copy the contents of &#8220;Server B&#8221; /root/.ssh/id_rsa.pub to &#8220;Server A&#8221; /root/.ssh/authorized_keys file. Make sure that the permission of authorized_keys is 0600 and .ssh folder is 0700 .</p>
<p>Also make sure that you have the following lines in your /etc/ssh/sshd_config file: <br />
RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
</span></strong></p>
<p><strong><span style="font-weight: normal;">Finally restart your ssh service and try logging to your &#8220;Server B&#8221; from &#8220;Server A&#8221;:</span></strong></p>
<p><strong><span style="font-weight: normal;"><br />
</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">/etc/init.d/sshd restart</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">ssh [Server_A_ip]<br />
</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;"><br />
</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/ssh-login-using-publicprivate-key-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collecting User IP!</title>
		<link>http://linuxbuddies.com/2009/01/03/collecting-user-ip/</link>
		<comments>http://linuxbuddies.com/2009/01/03/collecting-user-ip/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 07:14:44 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[bash scripting]]></category>
		<category><![CDATA[cgi scripting]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[msyql]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[users IP]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=272</guid>
		<description><![CDATA[A sample BASH CGI script for collecting IPs of your colleagues in your network.
Prerequisites 
1) apache/cgi configuration
2) a Mysql installation
Then create script &#8220;getip.sh&#8221; under &#8220;/var/www/cgi-bin/&#8221;  ( set location of cgi-bin directory  as per the apache configuration) 
#!/bin/bash #Getting IP address CGI-BASH-script#Jadu Saikia http://unstableme.blogspot.com/ #MySQL settings
# MHOME=  ( location of mysql ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-273" title="ip" src="http://linuxbuddies.com/wp-content/uploads/2009/01/ip.jpg" alt="ip" width="138" height="112" /><span style="color: #000000;">A sample BASH CGI script for collecting IPs of your colleagues in your network.</span></p>
<p><strong><span style="color: #000000;">Prerequisites </span></strong><br />
<span style="color: #000000;">1) apache/cgi configuration</span><br />
<span style="color: #000000;">2) a Mysql installation</span></p>
<p><span style="color: #000000;">Then create script &#8220;getip.sh&#8221; under &#8220;/var/www/cgi-bin/&#8221;  ( set location of cgi-bin directory  as per the apache configuration) </span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><span style="font-family: courier new,monospace;">#!/bin/bash</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">#Getting IP address CGI-BASH-script</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">#Jadu Saikia <a href="http://unstableme.blogspot.com/" target="_blank">http://unstableme.blogspot.com/</a></span><br style="font-family: courier new,monospace;" /> <br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">#MySQL settings</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"># MHOME=  ( location of mysql binary)<br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">MHOME=/usr/local/mysql/bin</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">HOST=127.0.0.1</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">USER=root</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">PASS=&#8221;"</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">DB=mydb</span><br style="font-family: courier new,monospace;" /> <br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">OWNER=$(echo &#8220;$QUERY_STRING&#8221; |awk -F &#8220;=&#8221; &#8216;{print $NF}&#8217;)</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">IP=$REMOTE_ADDR</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">#QUERY_STRING = Query information that follows the ? in the URL that referenced this script.</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">#REMOTE_ADDR = IP address of the remote host making the request</span><br style="font-family: courier new,monospace;" /><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">#HTML Output</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">echo &#8220;Content-type: text/html&#8221;</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">echo &#8220;&#8221;</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">echo &#8220;&lt;html&gt;&lt;head&gt;&lt;title&gt;YOUR IP&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;I am collecting the IPs&lt;/h1&gt;&lt;pre&gt;&#8221;;</span><br style="font-family: courier new,monospace;" /> <span style="font-family: courier new,monospace;">echo &#8220;IP: &lt;em&gt;$IP&lt;/em&gt;&lt;br /&gt;&#8221;</span><br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">echo &#8220;You Are IP is : &lt;em&gt;$OWNER&lt;/em&gt;&lt;br /&gt;&#8221;</span><br style="font-family: courier new,monospace;" /> <br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">$MHOME/mysql -u$USER -h$HOST &#8211;password=$PASS -e &#8220;INSERT INTO mydb.ips(rdate,ip,owner) VALUES(NOW(),&#8217;$IP&#8217;,'$OWNER&#8217;)&#8221; $DB</span><br style="font-family: courier new,monospace;" /> <br style="font-family: courier new,monospace;" /><span style="font-family: courier new,monospace;">echo &#8220;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&#8221;;</span></span></p>
<p>Then</p>
<p><span style="color: #000000;">Create MySql Database for storing the data. </span></p>
<p><span style="color: #000000;">logon to mysql </span></p>
<p style="padding-left: 30px;"><span style="color: #000000;">mysql -u root -p password </span></p>
<p><span style="color: #000000;">create database and table</span></p>
<p><span style="color: #000000;"> create database mydb<br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #000000;">use mydb<br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #000000;">create table </span><span style="font-family: courier new,monospace;">mydb.ips (</span> <span style="font-family: courier new,monospace;">rdate DATE,</span> <span style="font-family: courier new,monospace;">ip VARCHAR(20) NOT NULL PRIMARY KEY,</span> <span style="font-family: courier new,monospace;">owner VARCHAR(25)</span><span style="font-family: courier new,monospace;">);</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,monospace;">exit</span></p>
<p>Suppose the IP of the box where you are running the cgi is &#8220;172.22.22.188&#8243; (your local ip).</p>
<p>Now construct the urls for your colleagues this way:</p>
<p><a href="http://172.22.22.188/cgi-bin/retrip.sh?owner=alexm" target="_blank">http://172.22.22.188/cgi-bin/getip.sh?owner=alexm</a><br />
<a href="http://172.22.22.188/cgi-bin/retrip.sh?owner=nsarma" target="_blank">http://172.22.22.188/cgi-bin/getip.sh?owner=nsarma</a><br />
&#8230;<br />
&#8230;</p>
<p>And send them the individual urls in mail with a request to click the url (just to help you collecting the ips in the mysql table)</p>
<p>Once they click, your database table will be automatically populated with datas like this:</p>
<p>mysql&gt; select * from mydb.ips;<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+</p>
<div id=":2xf" class="ArwC7c ckChnd">&#8212;&#8212;&#8212;+<br />
| rdate | ip | owner |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+<br />
| 2007-01-02 | 172.22.22.111 | alexm |<br />
| 2007-01-03 | 172.22.22.92 | nsarma |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+<br />
2 rows in set (0.00 sec)</div>
<div class="ArwC7c ckChnd">Finished.</div>
<p><span style="font-family: courier new,monospace;"><br />
</span></p>
<p><span style="font-family: courier new,monospace;"><br />
</span></p>
<p><span style="color: #000000;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/03/collecting-user-ip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu internet sharing</title>
		<link>http://linuxbuddies.com/2008/12/23/ubunthu-network-sharing/</link>
		<comments>http://linuxbuddies.com/2008/12/23/ubunthu-network-sharing/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 12:52:53 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[User administration]]></category>
		<category><![CDATA[ubunthu network]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=196</guid>
		<description><![CDATA[ The following will explain how to share your Internet connection:
Note: Type all the following commands in a root terminal, DO NOT use sudo.
1. Start by configuring the network card that interfaces to the other computers on you network:
# ifconfig ethX ip 
where ethX is the network card and ip is your ...]]></description>
			<content:encoded><![CDATA[<p> <img class="alignnone size-thumbnail wp-image-197" title="ubuntu-1280x1024" src="http://linuxbuddies.com/wp-content/uploads/2008/12/ubuntu-1280x1024-150x150.png" alt="ubuntu-1280x1024" width="150" height="150" />The following will explain how to share your Internet connection:<br />
Note: Type all the following commands in a root terminal, DO NOT use sudo.</p>
<p>1. Start by configuring the network card that interfaces to the other computers on you network:</p>
<blockquote><p># ifconfig ethX ip </p></blockquote>
<p>where ethX is the network card and ip is your desired server ip address (Usually 192.168.0.1 is used)</p>
<p>2. Then configure the NAT as follows:</p>
<blockquote><p># iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE </p></blockquote>
<p>where ethX is the network card that the Internet is coming from </p>
<blockquote><p># echo 1 &gt; /proc/sys/net/ipv4/ip_forward</p></blockquote>
<p>3. Install dnsmasq and ipmasq using apt-get: </p>
<blockquote><p># apt-get install dnsmasq ipmasq</p></blockquote>
<p>4. Restart dnsmasq:</p>
<blockquote><p># /etc/init.d/dnsmasq restart</p></blockquote>
<p>5. Reconfigure ipmasq to start after networking has been started:</p>
<blockquote><p># dpkg-reconfigure ipmasq</p></blockquote>
<p>6. Repeat steps 1 and 2.<br />
7. Add the line &#8220;net.ipv4.ip_forward = 1&#8243; to /etc/sysctl.conf</p>
<blockquote><p># gedit /etc/sysctl.conf</p></blockquote>
<p>8. Reboot. (Optional) or sysctrl -p</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/23/ubunthu-network-sharing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open VPN installation</title>
		<link>http://linuxbuddies.com/2008/12/23/open-vpn-installation/</link>
		<comments>http://linuxbuddies.com/2008/12/23/open-vpn-installation/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 12:13:08 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Vpn]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open vpn]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=189</guid>
		<description><![CDATA[
Install openvpn using the rpm
Installing OpenVPN from a binary RPM package has these dependencies:




openssl 
lzo 
pamInstall rpms as root:# rpm -ivh      openvpn-2.0.5-1.el4.rf.i386.rpm

 
installing rpm 
 

    rpm -ivh lzo-1.08-4.2.el4.rf.i386.rpm



 The main configuration directory for open vpn is /etc/openvpn
Setting up your Certificate Authority (CA) and generating certificates and keys for ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-188" title="vpn-1_sc_connect" src="http://linuxbuddies.com/wp-content/uploads/2008/12/vpn-1_sc_connect-150x150.gif" alt="vpn-1_sc_connect" width="150" height="150" /></p>
<p class="MsoNormal"><strong><span>Install openvpn using the rpm</span></strong><span><br />
Installing OpenVPN from a binary RPM package has these dependencies:</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<ul type="disc">
<li class="MsoNormal"><span>openssl </span></li>
<li class="MsoNormal"><span>lzo </span></li>
<li class="MsoNormal"><span>pamInstall rpms as root:# rpm -ivh      openvpn-2.0.5-1.el4.rf.i386.rpm</span></li>
</ul>
<p> </p>
<p>installing rpm </p>
<p> </p></blockquote>
<blockquote>
<p class="MsoNormal"><span>    rpm -ivh lzo-1.08-4.2.el4.rf.i386.rpm</span></p>
</blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span> The main configuration directory for open vpn is <strong><em>/etc/openvpn</em></strong></span></p>
<p class="MsoNormal"><a name="119c877c69af3f75_11172c379e2cab09_OpenVP"></a><strong><span>Setting up your Certificate Authority (CA) and generating certificates and keys for an OpenVPN server and multiple clients </span></strong></p>
<p class="MsoNormal"><span>The first step in building an OpenVPN 2.0 configuration is to establish a PKI (public key infrastructure). The PKI consists of:</span></p>
<ul type="disc">
<li class="MsoNormal"><span>A separate certificate (also known as a public      key) and private key for the server and each client, and </span></li>
<li class="MsoNormal"><span>A master Certificate Authority (CA) certificate      and key which is used to sign each of the server and client certificates </span></li>
</ul>
<p class="MsoNormal"><span> Copy the /usr/share/doc/openvpn-2.0.7/easy-rsa/2.0/ directory to /etc/openvpn/easy-rsa</span></p>
<p class="MsoNormal"><span><br />
</span></p>
<blockquote>
<p class="MsoNormal"><span><span>    </span> cp -r /usr/share/doc/openvpn-2.0.7/easy-rsa/2.0/ /etc/openvpn/easy-rsa</span></p>
</blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><strong><span>Configure easy-rsa</span></strong></p>
<p class="MsoNormal"><span>Now edit the <strong>vars</strong> file  and set the KEY_COUNTRY, KEY_PROVINCE, KEY_CITY, KEY_ORG, and KEY_EMAIL parameters. Don&#8217;t leave any of these parameters blank.</span></p>
<p class="MsoNormal"><span>Next, initialize the PKI. on Linux:</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>./vars</span></p>
<p class="MsoNormal"><span>./clean-all</span></p>
<p class="MsoNormal"><span>./build-ca</span></p>
</blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>The final command (build-ca) will build the certificate authority (CA) certificate and key by invoking the interactive openssl command:</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>Generating a 1024 bit RSA private key</span></p>
<p class="MsoNormal"><span>&#8230;&#8230;&#8230;&#8230;++++++</span></p>
<p class="MsoNormal"><span>&#8230;&#8230;&#8230;..++++++</span></p>
<p class="MsoNormal"><span>writing new private key to &#8216;ca.key&#8217;</span></p>
<p class="MsoNormal"><span>&#8212;&#8211;</span></p>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>You are about to be asked to enter information that will be incorporated</span></p>
<p class="MsoNormal"><span>into your certificate request.</span></p>
<p class="MsoNormal"><span>What you are about to enter is what is called a Distinguished Name or a DN.</span></p>
<p class="MsoNormal"><span>There are quite a few fields but you can leave some blank</span></p>
<p class="MsoNormal"><span>For some fields there will be a default value,</span></p>
<p class="MsoNormal"><span>If you enter &#8216;.&#8217;, the field will be left blank.</span></p>
<p class="MsoNormal"><span>&#8212;&#8211;</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>Country Name (2 letter code) [KG]:IN</span></p>
<p class="MsoNormal"><span>State or Province Name (full name) [NA]:KERALA</span></p>
<p class="MsoNormal"><span>Locality Name (eg, city) [BISHKEK]:KOCHI</span></p>
<p class="MsoNormal"><span>Organization Name (eg, company) [OpenVPN-TEST]:company name</p>
<p></span></p>
<p class="MsoNormal"><span>Organizational Unit Name (eg, section) []:company name</p>
<p></span></p>
<p class="MsoNormal"><span>Common Name (eg, your name or your server&#8217;s hostname) []:company name</span></p>
<p class="MsoNormal"><span>Email Address [</span>Riyesh@linuxbuddies.com]</p>
</blockquote>
<p class="MsoNormal"><span>Note that in the above sequence, most queried parameters were defaulted to the values set in the vars or vars.bat files. The only parameter which must be explicitly entered is the Common Name. In the example above.</span></p>
<p class="MsoNormal"><strong><span>Generate certificate &amp; key for server</span></strong><span><br />
Next, we will generate a certificate and private key for the server. On Linux:</span></p>
<p class="MsoNormal"><span><br />
</span></p>
<blockquote>
<p class="MsoNormal"><span>./build-key-server server</span></p>
</blockquote>
<blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>As in the previous step, most parameters can be defaulted. When the Common Name is queried, enter &#8220;server&#8221;. Two other queries require positive responses, &#8220;Sign the certificate? [y/n]&#8221; and &#8220;1 out of 1 certificate requests certified, commit? [y/n]&#8220;. </span></p>
</blockquote>
<p class="MsoNormal"><strong><span>Generate certificates &amp; keys for  clients</span></strong></p>
<p class="MsoNormal"><span>Generating client certificates is very similar to the previous step. On Linux:</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>./build-key client1</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>./build-key client2 and so on&#8230;</span></p>
</blockquote>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span>   <strong><span class="msoIns"><ins> Generate Diffie Hellman parameters</ins></span></strong></span></p>
<p class="MsoNormal"><span>Diffie Hellman parameters must be generated for the OpenVPN server. On Linux:</span></p>
<p class="MsoNormal"><span>./build-dh</span></p>
<blockquote>
<p class="MsoNormal"> ./build-dh</p>
</blockquote>
<blockquote>
<p class="MsoNormal"><span>Generating DH parameters, 1024 bit long safe prime, generator 2</span></p>
<p class="MsoNormal"><span>This is going to take a long time</span></p>
<p class="MsoNormal"><span>&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</span></p>
<p class="MsoNormal"><span>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;.+&#8230;&#8230;&#8230;&#8230;&#8230;..+&#8230;&#8230;&#8230;</span></p>
<p class="MsoNormal"><span>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</span></p>
<p class="MsoNormal"><span><br />
</span></p></blockquote>
<p class="MsoNormal"><strong><span>         </span></strong><span> <strong><span class="msoIns"><ins>Creating TLS Key</ins></span></strong></span></p>
<p class="MsoNormal"><span>The <em>tls-auth</em> directive adds an additional HMAC signature to all SSL/TLS handshake packets for integrity verification. Any UDP packet not bearing the correct HMAC signature can be dropped without further processing. The <em>tls-auth</em> HMAC signature provides an additional level of security above and beyond that provided by SSL/TLS.<br />
Using tls-auth requires that you generate a shared-secret key that is used in addition to the standard RSA certificate/key: </span></p>
<blockquote>
<p class="MsoNormal"><span>openvpn &#8211;genkey &#8211;secret ta.key</span></p>
</blockquote>
<p class="MsoNormal"><span>This command will generate an OpenVPN static key and write it to the file <em>ta.key</em>. This key should be copied over a pre-existing secure channel to the server and all client machines. It can be placed in the same directory as the RSA <em>.key</em> and <em>.crt</em> files.</span></p>
<p class="MsoNormal"><span>In the server configuration, add:</span></p>
<blockquote>
<p class="MsoNormal"><span>tls-auth ta.key 0</span></p>
</blockquote>
<p class="MsoNormal"><span>In the client configuration, add:</span></p>
<blockquote>
<p class="MsoNormal"><span>tls-auth ta.key 1</span></p>
</blockquote>
<p class="MsoNormal"><strong><span>        </span></strong></p>
<p class="MsoNormal"><strong><span>        </span></strong><span>  <strong><span class="msoIns"><ins>Creating configuration files for server and clients</ins></span></strong></span></p>
<blockquote>
<p class="MsoNormal"><strong><span>remote </span><a href="http://ekm1.dyndns.org/" target="_blank"><span>ekm1.dyndns.org</span></a></strong><strong><span> 1194</span></strong></p>
</blockquote>
<p class="MsoNormal"><strong><span>#remote<span>  </span></span><a href="http://ek2.levare.com/" target="_blank"><span>ekm2.linuxbuddies.com</span></a></strong><span> 1194/<strong><em>etc/openvpn/server.conf</em></strong></span></p>
<blockquote>
<p class="MsoNormal"><span>port 1194<span>                               </span>; Port for OpenVpn traffic</span></p>
<p class="MsoNormal"><span>proto tcp<span>                               </span>; TCP protocol</span></p>
<p class="MsoNormal"><span>dev tun<span>                                 </span>; use Tun device</span></p>
<p class="MsoNormal"><span>ca ca.crt<span>                               </span>; Certificate file of signing Authority</span></p>
<p class="MsoNormal"><span>cert server.crt<span>                         </span>; Server certificate</span></p>
<p class="MsoNormal"><span>key server.key<span>                          </span>; Server Key</span></p>
<p class="MsoNormal"><span>dh dh2048.pem<span>                           </span>;Diffie Hellman parameters</span></p>
<p class="MsoNormal"><span>server </span><a href="http://10.2.100.0/" target="_blank"><span>10.2.100.0</span></a><span> </span><a href="http://255.255.255.0/" target="_blank"><span>255.255.255.0</span></a><span><span>         </span>; Openvpn subnet should be different from the local network of server and client</span></p>
<p class="MsoNormal"><span>ifconfig-pool-persist ipp.txt</span></p>
<p class="MsoNormal"><span>push &#8220;route </span><a href="http://10.2.1.0/" target="_blank"><span>10.2.1.0</span></a><span> </span><a href="http://255.255.255.0/" target="_blank"><span>255.255.255.0</span></a><span>&#8220;<span>     </span>; Pushing routes to client</span></p>
<p class="MsoNormal"><span>push &#8220;route </span><a href="http://10.1.1.0/" target="_blank"><span>10.1.1.0</span></a><span> </span><a href="http://255.255.255.0/" target="_blank"><span>255.255.255.0</span></a><span>&#8220;</span></p>
<p class="MsoNormal"><span>client-config-dir ccd</span></p>
<p class="MsoNormal"><span>route </span><a href="http://10.2.100.0/" target="_blank"><span>10.2.100.0</span></a><span> </span><a href="http://255.255.255.0/" target="_blank"><span>255.255.255.0</span></a></p>
<p class="MsoNormal"><span>push &#8220;dhcp-option DNS </span><a href="http://10.2.1.11/" target="_blank"><span>10.2.1.11</span></a><span>&#8220;<span>        </span>; Pushing DNS server to client</span></p>
<p class="MsoNormal"><span>client-to-client<span>                        </span>; Clients can communicate eatch other</span></p>
<p class="MsoNormal"><span>duplicate-cn</span></p>
<p class="MsoNormal"><span>keepalive 10 120</span></p>
<p class="MsoNormal"><span>tls-auth ta.key 0<span>                       </span>; tls key</span></p>
<p class="MsoNormal"><span>comp-lzo<span>                                </span>; Use lzo compression Algo</span></p>
<p class="MsoNormal"><span>max-clients 10</span></p>
<p class="MsoNormal"><span>user nobody<span>                             </span>; Run openvpn as user nobody<span>  </span>-</span></p>
<p class="MsoNormal"><span>group nobody<span>                            </span>; group nobody for security</span></p>
<p class="MsoNormal"><span>persist-key</span></p>
<p class="MsoNormal"><span>persist-tun</span></p>
<p class="MsoNormal"><span>tun-mtu 1500</span></p>
<p class="MsoNormal"><span>status openvpn-status.log</span></p>
<p class="MsoNormal"><span>log-append /var/log/openvpn.log</span></p>
<p class="MsoNormal"><span>verb 6</span></p>
<p class="MsoNormal"><span>mute 20</span></p>
<p class="MsoNormal"><strong><em><span>client.conf</span></em></strong></p>
<p class="MsoNormal"><span>client</span></p>
<p class="MsoNormal"><span>dev tun</span></p>
<p class="MsoNormal"><span>proto tcp</span></p>
</blockquote>
<blockquote>
<p class="MsoNormal"><span>resolv-retry infinite</span></p>
<p class="MsoNormal"><span>nobind</span></p>
<p class="MsoNormal"><span>persist-key</span></p>
<p class="MsoNormal"><span>persist-tun</span></p>
<p class="MsoNormal"><span>ca ca.crt</span></p>
<p class="MsoNormal"><span>cert client.crt</span></p>
<p class="MsoNormal"><span>key client.key</span></p>
<p class="MsoNormal"><span>tls-auth ta.key 1</span></p>
<p class="MsoNormal"><span>comp-lzo</span></p>
<p class="MsoNormal"><span>verb 3</span></p>
<p class="MsoNormal"><span>mute 20</span></p>
<p class="MsoNormal"><span>ns-cert-type server</span></p>
<p class="MsoNormal"><span>auth-user-pass</span></p>
<p class="MsoNormal"><span>pull</span></p>
<p class="MsoNormal"><span>mssfix 1450</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">############</p>
<p class="MsoNormal"> </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/23/open-vpn-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Linux Remotly</title>
		<link>http://linuxbuddies.com/2008/12/22/installing-linux-remotly/</link>
		<comments>http://linuxbuddies.com/2008/12/22/installing-linux-remotly/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 05:44:26 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Network installation]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Remote installation]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=84</guid>
		<description><![CDATA[This comes into picture when one Admin doesn’t have physical access to a system in which Linux needs to be installed. Here we need help from one person who is having physical access to that remote machine to get it booted from bootable media and to type the command shown ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-83" title="remoteinstallation" src="http://linuxbuddies.com/wp-content/uploads/2008/12/remoteinstallation-150x150.jpg" alt="remoteinstallation" width="150" height="150" />This comes into picture when one Admin doesn’t have physical access to a system in which Linux needs to be installed. Here we need help from one person who is having physical access to that remote machine to get it booted from bootable media and to type the command shown below command at boot prompt.</p>
<p><a href="http://2.bp.blogspot.com/_h3s55wvQhgU/SSe_YXiHlYI/AAAAAAAAAEE/j7RNQeZtesI/s1600-h/text_telnet_ip.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5271392314215339394" src="http://2.bp.blogspot.com/_h3s55wvQhgU/SSe_YXiHlYI/AAAAAAAAAEE/j7RNQeZtesI/s200/text_telnet_ip.jpg" border="0" alt="" /></a></p>
<p>Now anaconda will start to run and will pause at a particular moment showing the below message<br />
<a href="http://3.bp.blogspot.com/_h3s55wvQhgU/SSe_fPDt_eI/AAAAAAAAAEM/m0HvNPEavrk/s1600-h/waitingForTelnet.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5271392432199433698" src="http://3.bp.blogspot.com/_h3s55wvQhgU/SSe_fPDt_eI/AAAAAAAAAEM/m0HvNPEavrk/s200/waitingForTelnet.jpg" border="0" alt="" /></a></p>
<p>Now try to telnet to this IP from a remote machine and proceed with installation steps as usual as we do as shown below<br />
<a href="http://4.bp.blogspot.com/_h3s55wvQhgU/SSe_limIXJI/AAAAAAAAAEU/wH_Fc7OYRlw/s1600-h/telnet_192_168_241_130.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5271392540523256978" src="http://4.bp.blogspot.com/_h3s55wvQhgU/SSe_limIXJI/AAAAAAAAAEU/wH_Fc7OYRlw/s200/telnet_192_168_241_130.jpg" border="0" alt="" /></a><br />
<a href="http://3.bp.blogspot.com/_h3s55wvQhgU/SSe_rKPVZaI/AAAAAAAAAEc/p5ZcwuDV6Xg/s1600-h/telnetSession.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5271392637064406434" src="http://3.bp.blogspot.com/_h3s55wvQhgU/SSe_rKPVZaI/AAAAAAAAAEc/p5ZcwuDV6Xg/s200/telnetSession.jpg" border="0" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/22/installing-linux-remotly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cacti Installation</title>
		<link>http://linuxbuddies.com/2008/12/21/cacti-installation/</link>
		<comments>http://linuxbuddies.com/2008/12/21/cacti-installation/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 07:13:51 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[bandwitdthd]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[network monitoring]]></category>
		<category><![CDATA[server monitoring]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=323</guid>
		<description><![CDATA[ Cacti uses RRDTool to generate graphs for network statistics like bandwidthd. 
 
Requirements:

Mysql
Php
Rrdtool
net-snmp
net-snmp-devel.i386
net-snmp-libs.i386
net-snmp-perl.i386
net-snmp-utils.i386
php-snmp
Apache with PHP Support
 
MySQL configuration for cacti:
 
mysql -u root -p
mysql&#62; create database cacti;
mysql&#62; grant all on cacti.* to cactiuser@’localhost’ identified by ‘cactipassword’;
mysql&#62; flush privileges;
 
RRDTool Installation
 
Requirements:

tcl
tcl-devel
 
[root]# cd /usr/local/src/
[root]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
[root]# tar -zxf rrdtool.tar.gz
[root]# cd rrdtool*
[root]# ./configure
[root]# make
[root]# make install
[root]# make site-perl-install
 
   ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-324" title="cacti1" src="http://linuxbuddies.com/wp-content/uploads/2009/01/cacti1-150x150.png" alt="cacti1" width="150" height="150" /> Cacti uses RRDTool to generate graphs for network statistics like bandwidthd. </p>
<p> </p>
<p><span><strong>Requirements:</strong></span></p>
<p style="padding-left: 30px; "><span><strong></strong></span><br />
Mysql<br />
Php<br />
Rrdtool<br />
net-snmp<br />
net-snmp-devel.i386<br />
net-snmp-libs.i386<br />
net-snmp-perl.i386<br />
net-snmp-utils.i386<br />
php-snmp<br />
Apache with PHP Support</p>
<p style="padding-left: 30px; "> </p>
<p><strong>MySQL configuration for cacti:</strong></p>
<p> </p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">mysql -u root -p<br />
mysql&gt; create database cacti;<br />
mysql&gt; grant all on cacti.* to cactiuser@’localhost’ identified by ‘cactipassword’;<br />
mysql&gt; flush privileges;</span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;"><strong>RRDTool Installation</strong></span></strong></p>
<p> </p>
<p><strong><span style="font-weight: normal;"><strong><span>Requirements:</span><br />
</strong></span></strong></p>
<p style="padding-left: 30px; ">tcl<br />
tcl-devel</p>
<p style="padding-left: 30px; "> </p>
<p style="padding-left: 30px; ">[root]# cd /usr/local/src/<br />
[root]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz<br />
[root]# tar -zxf rrdtool.tar.gz<br />
[root]# cd rrdtool*<br />
[root]# ./configure<br />
[root]# make<br />
[root]# make install<br />
[root]# make site-perl-install</p>
<p style="padding-left: 30px; "> </p>
<p>                  <strong>OR</strong></p>
<p style="padding-left: 30px; "> </p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;"> yum install -y rrdtool*</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">[root]# useradd cactiuser<br />
[root]# tar -zxvf cacti*<br />
[root]# mv cacti-0.8.xx /home/cactiuser/cacti<br />
[root]# cd /home/cactiuser/cacti<br />
[root]# mysql cactidb &lt; cacti.sql</span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;"><strong>Edit config.php:</strong></span></strong></p>
<p> </p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;">[root]# vi /include/config.php<br />
$database_defaut = “cacti”;<br />
$database_hostname = “localhost”;<br />
$database_username = “cactiuser”;<br />
$database_password = “cactipassword”</span></strong></span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong>Adding CRON Job:</strong></span></strong></span></strong></p>
<p> </p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;">[root]# crontab -e<br />
*/5 * * * * cactiuser php /home/cactiuser/cacti/poller.php &gt; /dev/null 2&gt;&amp;1</span></strong></span></strong></span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong>In httpd.conf:</strong></span></strong></span></strong></span></strong></p>
<p> </p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;">Alias /cacti/ “/home/cactiuser/cacti/”</span></strong></span></strong></span></strong></span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong>Restart Services </strong></p>
<p style="padding-left: 30px; "> </p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">/etc/init.d/httpd restart<br />
/etc/init.d/mysqld restart</span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;"><span><strong>Cacti Installed Successfully&#8230;</strong></span><br />
Access: <a class="postlink" href="http://localhost/cacti">http://localhost/cacti</a><br />
Login with username/password : admin/admin<br />
</span></strong></p>
<p style="padding-left: 30px; "> </p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/21/cacti-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
