<?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>Throx &#187; Linux</title>
	<atom:link href="http://www.throx.net/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.throx.net</link>
	<description>Quietly Brilliant</description>
	<lastBuildDate>Thu, 13 Oct 2011 04:22:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>VPSLink Discount Coupon !</title>
		<link>http://www.throx.net/2008/08/22/vpslink-discount-coupon/</link>
		<comments>http://www.throx.net/2008/08/22/vpslink-discount-coupon/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 12:34:29 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Discount]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=346</guid>
		<description><![CDATA[Hi guys, if you guys planning to get a VPS from vpslink.com you can get a 10% life time discount by entering my referral discount code while placing an order. Discount Code: JPF0JP Your code may be entered at the VPSLink Signup Page or using this embedded link VPSLink.com , at which the referral code [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.throx.net/wp-content/uploads/2008/08/logo-vpslink.gif" rel="shadowbox[sbpost-346];player=img;"><img class="alignnone size-medium wp-image-350" title="logo-vpslink" src="http://www.throx.net/wp-content/uploads/2008/08/logo-vpslink.gif" alt="" width="158" height="44" /></a></p>
<p>Hi guys, if you guys planning to get a VPS from vpslink.com you can get a 10% <strong>life time</strong> discount by entering my referral discount code while placing an order.</p>
<p>Discount Code: <strong><strong>JPF0JP</strong></strong></p>
<p>Your code may be entered at the <a title="VPSLink Signup Page" href="https://account.vpslink.com/order-vps/index.php?view=plan">VPSLink Signup Page</a> <em></em>or using this embedded link <a title="VPSLink" href="http://vpslink.com/?ref=JPF0JP">VPSLink.com</a> , at which the referral code will be stored in a cookie on your machine and automatically added at checkout.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/08/22/vpslink-discount-coupon/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/08/22/vpslink-discount-coupon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VPS Upgraded</title>
		<link>http://www.throx.net/2008/06/21/vps-upgraded/</link>
		<comments>http://www.throx.net/2008/06/21/vps-upgraded/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 20:40:40 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Hostings]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=311</guid>
		<description><![CDATA[Due to the increased of traffic and caused the site constantly crashed and break down. I have upgraded to a better plan and now page load faster than before significantly. Previously running on 128mb of memory and now running with 256mb.]]></description>
			<content:encoded><![CDATA[<p>Due to the increased of traffic and caused the site constantly crashed and break down. I have upgraded to a better plan and now page load faster than before significantly. Previously running on 128mb of memory and now running with 256mb.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/06/21/vps-upgraded/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/06/21/vps-upgraded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding your IP address with Squid and OpenVPN</title>
		<link>http://www.throx.net/2008/05/05/hiding-your-ip-address-with-squid-and-openvpn/</link>
		<comments>http://www.throx.net/2008/05/05/hiding-your-ip-address-with-squid-and-openvpn/#comments</comments>
		<pubDate>Sun, 04 May 2008 15:34:20 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=287</guid>
		<description><![CDATA[Squid proxy itself will not hide your external IP address but I will show you how to do that when squid combined with OpenVPN. First you need to have a working OpenVPN connection from your PV to the Linux machine. Guide on how to install OpenVPN can be found here. If you have a success [...]]]></description>
			<content:encoded><![CDATA[<p>Squid proxy itself will not hide your external IP address but I will show you how to do that when squid combined with OpenVPN. First you need to have a working OpenVPN connection from your PV to the Linux machine. Guide on how to install OpenVPN can be found <a title="OpenVPN Guide" href="http://www.throx.net/2008/04/13/openvpn-and-centos-5-installation-and-configuration-guide/">here</a>.</p>
<p>If you have a success OpenVPN connection, then you can proceed to next step to install Squid.</p>
<p>1. You can use yum to install squid</p>
<blockquote><p>#yum install squid</p></blockquote>
<p>2. Open the squid configuration file</p>
<blockquote><p>#vi /etc/squid/squid.conf</p></blockquote>
<p>3. Edit squid configuration to allow you to access to the web via the squid proxy.</p>
<p>Locate &#8220;http_port&#8221;, default port number is 3128, you can change it to any port you like. In this example I change it to 8080.</p>
<blockquote><p>http_port 8080</p></blockquote>
<p>Because you want to hide your IP address, you must connect to squid via OpenVPN tunnels. Now we need to create acl list to allow your VPN ip address to get through your squid proxy server. Search for &#8220;acl our_networks&#8221; then uncomment and modify it as follows:</p>
<blockquote><p>acl our_networks src 10.8.0.2  #assume your client VPN address is 10.8.0.2<br />
http_access allow our_networks</p></blockquote>
<p>4. Save your squid.conf and restart your squid.</p>
<blockquote><p>#/etc/init.d/squid restart</p></blockquote>
<p>5. Config you web browser connection settings to access the web via your squid proxy</p>
<p><strong>Firefox user:</strong></p>
<blockquote><p>Tools -&gt; Options -&gt; Network -&gt; Settings , Select manual proxy configuration<br />
HTTP Proxy: 10.8.0.1 and Port: 8080</p></blockquote>
<p><a class="thickbox" href="http://www.throx.net/wp-content/uploads/2008/05/firefox-proxy-config.jpg" rel="shadowbox[sbpost-287];player=img;"><img class="alignnone size-thumbnail wp-image-288" title="firefox-proxy-config" src="http://www.throx.net/wp-content/uploads/2008/05/firefox-proxy-config-150x150.jpg" alt="" width="150" height="150" /></a><br />
<strong>IE User:</strong></p>
<blockquote><p>Tools -&gt; Internet Options -&gt; Connections -&gt; LAN Settings , Tick the check box &#8220;Use a proxy server for your LAN&#8230;&#8221;<br />
Address: 10.8.0.1 and Port: 8080</p></blockquote>
<p><a class="thickbox" href="http://www.throx.net/wp-content/uploads/2008/05/ie-proxy-config.jpg" rel="shadowbox[sbpost-287];player=img;"><img class="alignnone size-thumbnail wp-image-289" title="ie-proxy-config" src="http://www.throx.net/wp-content/uploads/2008/05/ie-proxy-config-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>6. Go to http://www.whatismyip.com and check your IP address. You should be browsing with your squid server IP address now. Good luck.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/05/05/hiding-your-ip-address-with-squid-and-openvpn/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/05/05/hiding-your-ip-address-with-squid-and-openvpn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The mbstring PHP extension was not found ?</title>
		<link>http://www.throx.net/2008/05/02/the-mbstring-php-extension-was-not-found/</link>
		<comments>http://www.throx.net/2008/05/02/the-mbstring-php-extension-was-not-found/#comments</comments>
		<pubDate>Fri, 02 May 2008 13:34:22 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=286</guid>
		<description><![CDATA[If you got a fresh installed LAMP with phpMyAdmin and notice an error below saying &#8220;The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results&#8221; and &#8220;Cannot load mycrypt extension. Please [...]]]></description>
			<content:encoded><![CDATA[<p>If you got a fresh installed LAMP with phpMyAdmin and notice an error below saying</p>
<p>&#8220;The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results&#8221;</p>
<p>and</p>
<p>&#8220;Cannot load mycrypt extension. Please check you PHP configuration&#8221;</p>
<p>You are not alone, you can solve the problems with the followings steps.</p>
<p><span style="text-decoration: underline;"><strong>mbstring</strong></span></p>
<p>New linux repo has the mbstring removed by default, just install it back.</p>
<blockquote><p>#yum install php-mbstring</p></blockquote>
<p><span style="text-decoration: underline;"><strong>mycrypt</strong></span></p>
<p>Install libmcrypt and php-mcrypt</p>
<blockquote><p>#yum install libmcrypt<br />
#yum &#8211;enablerepo=centosplus install php-mcrypt</p></blockquote>
<p>Restart your apache / httpd, the warnings should have gone now.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/05/02/the-mbstring-php-extension-was-not-found/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/05/02/the-mbstring-php-extension-was-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cp -Rf still promt for confirmation ?</title>
		<link>http://www.throx.net/2008/04/26/cp-rf-still-promt-for-confirmation/</link>
		<comments>http://www.throx.net/2008/04/26/cp-rf-still-promt-for-confirmation/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 02:31:36 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=272</guid>
		<description><![CDATA[I was getting so frustrated when I try to copy and overwrite files in my CentOS linux, it keeps asking for confirmation even I added the -f (force) command. # cp -Rf * backup/ cp: overwrite &#8216;index.php?&#8217; y Then I search around and finally found a solution ! It was an alias preset for the [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting so frustrated when I try to copy and overwrite files in my CentOS linux, it keeps asking for confirmation even I added the -f (force) command.</p>
<blockquote><p># cp -Rf * backup/<br />
cp: overwrite &#8216;index.php?&#8217; y</p></blockquote>
<p>Then I search around and finally found a solution ! It was an alias preset for the c, which alias -i to ask for confirmation.</p>
<blockquote><p>#alias<br />
<strong>alias cp= &#8216;cp -i&#8217;</strong><br />
alias l.=&#8217;ls -d .* &#8211;color=tty&#8217;<br />
alias ll=&#8217;ls -l &#8211;color=tty&#8217;<br />
alias ls=&#8217;ls &#8211;color=tty&#8217;<br />
alias mv=&#8217;mv -i&#8217;<br />
alias rm=&#8217;rm -i&#8217;<br />
&#8230;&#8230;.</p></blockquote>
<p>Remove the cp alias</p>
<blockquote><p>#unalias cp</p></blockquote>
<p>Done, you should be able to cp -f without the confirmation now.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/04/26/cp-rf-still-promt-for-confirmation/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/04/26/cp-rf-still-promt-for-confirmation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vsftpd passive mode ports problems with apf firewalls</title>
		<link>http://www.throx.net/2008/04/26/vsftpd-passive-mode-ports-problems-with-apf-firewalls/</link>
		<comments>http://www.throx.net/2008/04/26/vsftpd-passive-mode-ports-problems-with-apf-firewalls/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 16:29:04 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=268</guid>
		<description><![CDATA[If you have an apf firewall setup on your linux box and running vsftpd as your ftp server. You might have problem when accessing to your ftp server via ftp client. Most of the ftp client transferring data via passive mode which used a big range of ports which usually blocked by your firewall by [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.throx.net/wp-content/uploads/2008/04/linux.jpg" rel="shadowbox[sbpost-268];player=img;"><img class="alignleft size-full wp-image-257" title="linux" src="http://www.throx.net/wp-content/uploads/2008/04/linux.jpg" alt="" width="135" height="101" /></a>If you have an apf firewall setup on your linux box and running vsftpd as your ftp server. You might have problem when accessing to your ftp server via ftp client. Most of the ftp client transferring data via passive mode which used a big range of ports which usually blocked by your firewall by default. Users will get an error message and wont be able to get the dir listings &#8220;LIST&#8221;.</p>
<p>Example:</p>
<blockquote><p>Command:    LIST<br />
Error:    Transfer channel can&#8217;t be opened. Reason: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.<br />
Error:    Could not retrieve directory listing</p></blockquote>
<p>There is a way to overcome this matter, first is to define a range of ports will be used for passive mode in vsftpd config file. Secondly, open the defined tcp port in your firewall setting.</p>
<p>1. Create vsftpd passive ports</p>
<blockquote><p>#vi /etc/vsftpd/vsftpd.conf</p></blockquote>
<p>Scroll down to the bottom and add the followings lines:</p>
<blockquote><p>pasv_enable=YES<br />
<span style="text-decoration: line-through;">pasv_max_port=9000<br />
pasv_min_port=9050</span></p>
<p>pasv_max_port=9000<br />
pasv_min_port=9050</p></blockquote>
<p>Save the config file and restart vsftpd</p>
<blockquote><p>#service vsftpd restart<br />
Shutting down vsftpd:                                      [  OK  ]<br />
Starting vsftpd for vsftpd:                                [  OK  ]</p></blockquote>
<p>2. Firewalls rules (APF Firewall)</p>
<p>Open your apf firewall configuration file:</p>
<blockquote><p>#vi /etc/apf/conf.apf</p></blockquote>
<p>Add the ports range of 9000 to 9050 into  IG_TCP_CPORTS</p>
<blockquote><p>IG_TCP_CPORTS=&#8221;20,21,22,25,26,53,80,110,143,&#8230;&#8230;,9000_9050&#8243;</p></blockquote>
<p>Save it and restart your apf firewall</p>
<blockquote><p>#apf -r</p></blockquote>
<p>Now you should be able to access your ftp server in passive mode.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/04/26/vsftpd-passive-mode-ports-problems-with-apf-firewalls/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/04/26/vsftpd-passive-mode-ports-problems-with-apf-firewalls/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Free up more ram space, use more swap space with Swappiness</title>
		<link>http://www.throx.net/2008/04/18/free-up-more-ram-space-use-more-swap-space-with-swappiness/</link>
		<comments>http://www.throx.net/2008/04/18/free-up-more-ram-space-use-more-swap-space-with-swappiness/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 03:46:35 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Swap]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=263</guid>
		<description><![CDATA[This tip is useful either for ppl with lots of RAM or less RAM. There is a way to set how your linux control the utilization of RAM and SWAP space called &#8220;swappiness&#8221;. There is a range from 0 to 100 in swappiness setting, higher value means the system will move idle memory usage to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-257" title="linux" src="http://www.throx.net/wp-content/uploads/2008/04/linux.jpg" alt="" width="135" height="101" />This tip is useful either for ppl with lots of RAM or less RAM. There is a way to set how your linux control the utilization of RAM and SWAP space called &#8220;swappiness&#8221;.</p>
<p>There is a range from 0 to 100 in swappiness setting, higher value means the system will move idle memory usage to SWAP file more often. Please note that by setting to &#8220;0&#8243; does not men it disabled the SWAP space, this will just make the system write to the SWAP space as little as possible.</p>
<p>To check your current swappiness setting type:</p>
<blockquote><p>#cat /proc/sys/vm/swappiness<br />
60</p></blockquote>
<p>You will see 60 by default, you can change it to other value to try out the effect before permanently change it in the configuration file:</p>
<blockquote><p>#sysctl -w vm.swappiness=10<br />
vm.swappiness = 10</p></blockquote>
<p>Put a value between 0 to 100 above and then run a some high resources program to try out the different. After you hve found the best setting then you can set it to your server configuration.</p>
<blockquote><p>#vi /etc/sysctl.conf<br />
add the line: &#8220;vm.swappiness=10&#8243; without the quote to the end of the file.</p></blockquote>
<p>This way your swappiness will be set to 10 after the next reboot.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/04/18/free-up-more-ram-space-use-more-swap-space-with-swappiness/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/04/18/free-up-more-ram-space-use-more-swap-space-with-swappiness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: Linux server change or setup the timezone</title>
		<link>http://www.throx.net/2008/04/15/howto-linux-server-change-or-setup-the-timezone/</link>
		<comments>http://www.throx.net/2008/04/15/howto-linux-server-change-or-setup-the-timezone/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 14:33:21 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Time Zone]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=254</guid>
		<description><![CDATA[Ok, may be you bought a VPS server and noticed that the timezone is different than your local timezone and wondering how to change it ? In virtual environment many VPS are sharing one server hardware and by default all VPS will be using the hardware system clock. Therefore it is impossible to change the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-257" title="linux" src="http://www.throx.net/wp-content/uploads/2008/04/linux.jpg" alt="" width="135" height="101" />Ok, may be you bought a VPS server and noticed that the timezone is different than your local timezone and wondering how to change it ? In virtual environment many VPS are sharing one server hardware and by default all VPS will be using the hardware system clock. Therefore it is impossible to change the hardware time. However, You can still change the date and time with a few simple steps below:</p>
<p>1. Go to your timezone dir and look for your city</p>
<blockquote><p>#cd /usr/share/zoneinfo<br />
#ls</p></blockquote>
<p>2. Now delete the original setting</p>
<blockquote><p>#rm -r /etc/localtime</p></blockquote>
<p>3. Use link command create a new localtime file linked to your city timezone, I choose Melbourne in this example:</p>
<blockquote><p>#ln -s /usr/share/zoneinfo/Australia/Melbourne /etc/localtime</p></blockquote>
<p>Restart your server to make the change.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/04/15/howto-linux-server-change-or-setup-the-timezone/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/04/15/howto-linux-server-change-or-setup-the-timezone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenVPN and CentOS 5 Installation and Configuration Guide</title>
		<link>http://www.throx.net/2008/04/13/openvpn-and-centos-5-installation-and-configuration-guide/</link>
		<comments>http://www.throx.net/2008/04/13/openvpn-and-centos-5-installation-and-configuration-guide/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 16:48:30 +0000</pubDate>
		<dc:creator>throx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.throx.net/?p=253</guid>
		<description><![CDATA[Many ppl found that installing VPN on linux is not that easy, the abvailable installation guides on VPN is often limited. I have tried a lot of installation guides and finally get it connected successfully. Here are the steps to guide you installed a secure connection between your� CentOS5 and Windows with OpenVPN open source [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-255" title="openvpn_logo" src="http://www.throx.net/wp-content/uploads/2008/04/openvpn_logo.png" alt="" width="289" height="67" />Many ppl found that installing VPN on linux is not that easy, the abvailable installation guides on VPN is often limited. I have tried a lot of installation guides and finally get it connected successfully.</p>
<p>Here are the steps to guide you installed a secure connection between your� CentOS5 and Windows with OpenVPN open source application.</p>
<p><strong>1. Download the required package files.</strong></p>
<blockquote><p>#wget http://openvpn.net/release/openvpn-2.0.9.tar.gz<br />
#wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm</p></blockquote>
<p><strong>2. Install and build your download files</strong></p>
<p>You may need the required repository before start your installation</p>
<blockquote><p>#yum install rpm-build<br />
#yum install autoconf.noarch<br />
#yum install zlib-devel<br />
#yum install pam-devel<br />
#yum install openssl-devel</p></blockquote>
<p>If you have the above dependencies installed, you can start your installation as follows:</p>
<blockquote><p>#rpmbuild &#8211;rebuild lzo-1.08-4.rf.src.rpm</p>
<p>#rpm -Uvh /usr/src/redhat/RPMS/i386/lzo-*.rpm</p>
<p>#rpmbuild -tb openvpn-2.0.9.tar.gz</p>
<p>#rpm -Uvh /usr/src/redhat/RPMS/i386/openvpn-2.0.9-1.i386.rpm</p></blockquote>
<p><strong>3. Copy configuration files</strong></p>
<blockquote><p>#cp -r /usr/share/doc/openvpn-2.0.9/easy-rsa/ /etc/openvpn/<br />
#cp /usr/share/doc/openvpn-2.0.9/sample-config-files/server.conf  /etc/openvpn/</p></blockquote>
<p><span id="more-253"></span></p>
<p><strong>4. CA configuration<br />
</strong></p>
<blockquote><p>#cd /etc/openvpn/easy-rsa/<br />
#pico vars (or use vi editor, I just like to use pico)</p></blockquote>
<p>then scroll down to the bottom, edit as you like.</p>
<blockquote><p>export KEY_COUNTRY=AU<br />
export KEY_PROVINCE=VIC<br />
export KEY_CITY=<a href="http://www.opendi.com.au/melbourne/">MELBOURNE</a><br />
export KEY_ORG=&#8221;THROXVPN&#8221;<br />
export KEY_EMAIL=&#8221;name@email.com&#8221;</p>
<p>#.�  ./vars (note a space between . . )<br />
#./clean-all</p></blockquote>
<p><strong>5. Build CA</strong></p>
<blockquote><p>#./build-ca</p>
<p>Generating a 1024 bit RSA private key<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;++++++<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++<br />
writing new private key to &#8216;ca.key&#8217;<br />
&#8212;&#8211;<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter &#8216;.&#8217;, the field will be left blank.<br />
&#8212;&#8211;<br />
Country Name (2 letter code) [AU]:<br />
State or Province Name (full name) [VIC]:<br />
Locality Name (eg, city) [MELBOURNE]:<br />
Organization Name (eg, company) [THROXVPN]:<br />
Organizational Unit Name (eg, section) []:Throx<br />
Common Name (eg, your name or your server&#8217;s hostname) []:throx.net<br />
Email Address [name@mail.com]:</p></blockquote>
<p>Some information above already entered in step 4, hust hit enter and go to next line.</p>
<p><strong>6. Building server key </strong></p>
<blockquote><p>#./build-key-server ovpnsrv1</p>
<p>Generating a 1024 bit RSA private key<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++<br />
writing new private key to &#8216;ovpnsrv1.key&#8217;<br />
&#8212;&#8211;<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter &#8216;.&#8217;, the field will be left blank.<br />
&#8212;&#8211;<br />
Country Name (2 letter code) [AU]:<br />
State or Province Name (full name) [VIC]:<br />
Locality Name (eg, city) [MELBOURNE]:<br />
Organization Name (eg, company) [THROXVPN]:<br />
Organizational Unit Name (eg, section) []:Throx<br />
Common Name (eg, your name or your server&#8217;s hostname) []:throx.net<br />
Email Address [name@email.com]:</p>
<p>Please enter the following &#8216;extra&#8217; attributes<br />
to be sent with your certificate request<br />
A challenge password []:&lt;enter your password here&gt;<br />
An optional company name []:<br />
Using configuration from /etc/openvpn/easy-rsa/openssl.cnf<br />
Check that the request matches the signature<br />
Signature ok<br />
The Subject&#8217;s Distinguished Name is as follows<br />
countryName���������� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;AU&#8217;<br />
stateOrProvinceName�� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;VIC&#8217;<br />
localityName��������� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;MELBOURNE&#8217;<br />
organizationName����� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;THROXVPN&#8217;<br />
organizationalUnitName:PRINTABLE:&#8217;Throx&#8217;<br />
commonName����������� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;throx.net&#8217;<br />
emailAddress��������� :IA5STRING:&#8217;name@email.com&#8217;<br />
Certificate is to be certified until Apr 10 15:15:27 2018 GMT (3650 days)<br />
Sign the certificate? [y/n]:y</p>
<p>1 out of 1 certificate requests certified, commit? [y/n]y<br />
Write out database with 1 new entries<br />
Data Base Updated</p></blockquote>
<p><strong>7. Building Diffie Hellman</strong></p>
<blockquote><p>#./build-dh</p>
<p>Generating DH parameters, 1024 bit long safe prime, generator 2<br />
This is going to take a long time</p></blockquote>
<p>(Wait until it finished)</p>
<p><strong>8. Copy key certificates to the required folder </strong></p>
<blockquote><p>#cp keys/ca.crt ../<br />
#cp keys/dh1024.pem ../<br />
#cp keys/ovpnsrv1.key ../<br />
#cp keys/ovpnsrv1.crt ../</p></blockquote>
<p><strong>9. OpenVPN configuration<br />
</strong></p>
<blockquote><p>#cd ../<br />
#pico server.conf<br />
dev tap<br />
;dev tun<br />
ca ca.crt<br />
cert ovpnsrv1.crt<br />
key ovpnsrv1.key  # This file should be kept secret</p></blockquote>
<p><strong>10. Startup the OpenVPN service (Finally, hold your breath)</strong></p>
<blockquote><p>#service openvpn restart<br />
#chkconfig openvpn on</p></blockquote>
<p><strong>Windows Client Installation and Configuration</strong></p>
<p><strong>1. Download a copy of windows client </strong></p>
<p>http://openvpn.net/release/openvpn-2.0.9-install.exe and install it.</p>
<p><strong>2. Create CA in windows machine</strong></p>
<p>Open windows cmd.exe command promp and change directory (cd) into c:\program files\openvpn\</p>
<blockquote><p>&gt;copy vars.bat.sample vars.bat</p>
<p>&gt;edit vars.bat (scroll down to the bottom)</p>
<p>set KEY_COUNTRY=AU<br />
set KEY_PROVINCE=VIC<br />
set KEY_CITY=MELBOURNE<br />
set KEY_ORG=THROXVPN<br />
set KEY_EMAIL=name@mail.com</p></blockquote>
<p>note: the above information must be same as the details set in server previously.</p>
<p><strong>3. Run the file vars.bat</strong></p>
<blockquote><p>&gt;vars</p></blockquote>
<p><strong>4. Build client&#8217;s key and certificate</strong></p>
<blockquote><p>&gt;copy openssl.cnf.sample openssl.cnf<br />
&gt;md keys<br />
&gt;build-key vpnhome</p></blockquote>
<p><strong>5. Copy vpnhome.csr to the server directory /etc/openvpn/easy-rsa/keys</strong></p>
<blockquote><p>#cd /etc/openvpn/easy-rsa/<br />
#./sign-req vpnhome<br />
Using configuration from /etc/openvpn/easy-rsa/openssl.cnf<br />
Check that the request matches the signature<br />
Signature ok<br />
The Subject&#8217;s Distinguished Name is as follows<br />
countryName���������� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;AU&#8217;<br />
stateOrProvinceName�� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;VIC&#8217;<br />
localityName��������� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;MELBOURNE&#8217;<br />
organizationName����� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;THROXVPN&#8217;<br />
organizationalUnitName:PRINTABLE:&#8217;Throx&#8217;<br />
commonName����������� <img src='http://www.throx.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:&#8217;throx.net&#8217;<br />
emailAddress��������� :IA5STRING:&#8217;name@mail.com&#8217;<br />
Certificate is to be certified until Apr 10 16:04:33 2018 GMT (3650 days)<br />
Sign the certificate? [y/n]:y</p>
<p>1 out of 1 certificate requests certified, commit? [y/n]y<br />
Write out database with 1 new entries<br />
Data Base Updated</p></blockquote>
<p><strong>6. Copy new signed certificate to your windows machine</strong></p>
<p>Go to /etc/openvpn/easy-rsa/keys/ , you will see 2 new generated file &#8211; ca.crt and vpnhome.crt</p>
<p>Copy both of them to your Windows home machine c:/Program Files/OpenVPN/config</p>
<p>Also copy your windows generated vpnhome.key from C:\Program Files\OpenVPN\easy-rsa\keys to C:\Program Files\OpenVPN\config</p>
<p><strong>7. Setting the client configuration for OpenVPN</strong></p>
<p>Copy client.ovpn from C:\Program Files\OpenVPN\sample-config to C:\Program Files\OpenVPN\config</p>
<p>Edit it with the followings changes, similar to what you have done in the linux server</p>
<blockquote><p>dev tap<br />
;dev tun<br />
dev-node OpenVPN_Tap<br />
remote &lt;ipaddress&gt; 1194� (example: remote 202.188.1.1 1194)<br />
ca ca.crt<br />
cert alanghome.crt<br />
key alanghome.key<br />
ns-cert-type server</p></blockquote>
<p><strong>8. Configure the network interface for OpenVPN</strong><br />
Select &#8220;Control Panel&#8221; -&gt; &#8220;Network Connection&#8221; -&gt; &#8220;TAP-Win32#(#)&#8221;<br />
Right-Click to rename as &#8216;OpenVPN_Tap&#8217;</p>
<p><strong>9. Startup the connection of client</strong></p>
<p>Go to START&gt;All Programs&gt;OpenVPN&gt;OpenVPN GUI , click it</p>
<p>In the task-bar, select &#8220;OpenVPN GUI&#8221; -&gt; right-click &#8220;Connect&#8221;</p>
<p>Phew&#8230;. if everything set correctly, now you should be connected to your linux via OpenVPN.</p>
<p><em>Source: http://yumax1012.blogspot.com/2007/08/install-openvpn-on-centos-44.html</em></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.throx.net/2008/04/13/openvpn-and-centos-5-installation-and-configuration-guide/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://www.throx.net/2008/04/13/openvpn-and-centos-5-installation-and-configuration-guide/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
	</channel>
</rss>

