<?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>VPS Network Operation Center &#187; OpenVPN VPS</title>
	<atom:link href="http://vpsnoc.com/blog/tag/openvpn-vps/feed/" rel="self" type="application/rss+xml" />
	<link>http://vpsnoc.com/blog</link>
	<description>Your Number One VPS Host</description>
	<lastBuildDate>Thu, 15 Dec 2011 14:36:07 +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>How to install OpenVPN on a Debian/Ubuntu VPS instantly</title>
		<link>http://vpsnoc.com/blog/how-to-install-openvpn-on-a-debianubuntu-vps-instantly/</link>
		<comments>http://vpsnoc.com/blog/how-to-install-openvpn-on-a-debianubuntu-vps-instantly/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 14:38:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debian vps]]></category>
		<category><![CDATA[OpenVPN VPS]]></category>
		<category><![CDATA[ubuntu vps]]></category>
		<category><![CDATA[VPN VPS]]></category>
		<category><![CDATA[debian vpn]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[ubuntu vpn]]></category>

		<guid isPermaLink="false">http://vpsnoc.com/blog/?p=99</guid>
		<description><![CDATA[This is a follow up post to How to setup a VPN server on a CentOS VPS instantly same requirements and instructions apply. Minor distribution specific changes were made on the previous CentOS script to get it working under Debian and Ubuntu. We might create one single script which will install OpenVPN on most distributions [...]]]></description>
			<content:encoded><![CDATA[<p>This is a follow up post to <a href="http://vpsnoc.com/blog/how-to-setup-a-vpn-server-on-a-centos-vps-instantly/" target="_self">How to setup a VPN server on a CentOS VPS instantly</a> same requirements and instructions apply.</p>
<p>Minor distribution specific changes were made on the previous CentOS script to get it working under Debian and Ubuntu. We might create one single script which will install OpenVPN on most distributions and architectures in future.</p>
<p>To install issue the following commands logged in as root on your VPS (Refer to <a href="http://vpsnoc.com/blog/how-to-setup-a-vpn-server-on-a-centos-vps-instantly/" target="_self">this post</a> if you are facing any issues)</p>
<p><code>wget http://vpsnoc.com/scripts/debian-openvpn.sh</code></p>
<p><code>chmod +x debian-openvpn.sh</code></p>
<p><code>./debian-openvpn.sh</code></p>
<p>For any other issues and feedback please e-mail us at support@vpsnoc.com</p>
<p>You may use and modify this script however you see fit, provided that you do not edit the original copyright.</p>
<p><code>#!/bin/bash<br />
# Quick and dirty OpenVPN install script<br />
# Tested on debian 5.0 32bit, openvz minimal debian OS template<br />
# and Ubuntu 9.04 32 bit minimal, should work on 64bit images as well<br />
# Please submit feedback and questions at support@vpsnoc.com</code></p>
<p><code># John Malkowski vpsnoc.com 01/18/2010</code></p>
<p><code>ip=`grep address /etc/network/interfaces | grep -v 127.0.0.1  | awk '{print $2}'`<br />
apt-get update<br />
apt-get install openvpn libssl-dev  openssl<br />
cd /etc/openvpn/<br />
cp -R /usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn/<br />
cd /etc/openvpn/easy-rsa/2.0/<br />
chmod +rwx *<br />
. ./vars<br />
./clean-all<br />
source ./vars</code></p>
<p><code>echo -e "\n\n\n\n\n\n\n" | ./build-ca<br />
clear<br />
echo "####################################"<br />
echo "Feel free to accept default values"<br />
echo "Wouldn't recommend setting a password here"<br />
echo "Then you'd have to type in the password each time openVPN starts/restarts"<br />
echo "####################################"<br />
./build-key-server server<br />
./build-dh<br />
cp keys/{ca.crt,ca.key,server.crt,server.key,dh1024.pem} /etc/openvpn/<br />
</code><br />
<code>clear<br />
echo "####################################"<br />
echo "Feel free to accept default values"<br />
echo "This is your client key, you may set a password here but it's not required"<br />
echo "####################################"<br />
./build-key client1<br />
cd keys/</code></p>
<p><code>client="<br />
client<br />
remote $ip 1194<br />
dev tun<br />
comp-lzo<br />
ca ca.crt<br />
cert client1.crt<br />
key client1.key<br />
route-delay 2<br />
route-method exe<br />
redirect-gateway def1<br />
dhcp-option DNS 10.8.0.1<br />
verb 3"</code></p>
<p><code>echo "$client" &gt; $HOSTNAME.ovpn</code></p>
<p><code>tar czf keys.tgz ca.crt ca.key client1.crt client1.csr client1.key $HOSTNAME.ovpn<br />
mv keys.tgz /root<br />
</code><br />
<code>opvpn='<br />
dev tun<br />
server 10.8.0.0 255.255.255.0<br />
ifconfig-pool-persist ipp.txt<br />
ca ca.crt<br />
cert server.crt<br />
key server.key<br />
dh dh1024.pem<br />
push "route 10.8.0.0 255.255.255.0"<br />
push "redirect-gateway"<br />
comp-lzo<br />
keepalive 10 60<br />
ping-timer-rem<br />
persist-tun<br />
persist-key<br />
group daemon<br />
daemon'</code></p>
<p><code>echo "$opvpn" &gt; /etc/openvpn/openvpn.conf</code></p>
<p><code>echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br />
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE<br />
iptables-save &gt; /etc/iptables.conf<br />
echo "#!/bin/sh" &gt; /etc/network/if-up.d/iptables<br />
echo "iptables-restore &lt; /etc/iptables.conf" &gt;&gt; /etc/network/if-up.d/iptables<br />
chmod +x /etc/network/if-up.d/iptables<br />
echo "net.ipv4.ip_forward=1" &gt;&gt; /etc/sysctl.conf</code></p>
<p><code>/etc/init.d/openvpn start<br />
clear</code></p>
<p><code>echo "OpenVPN has been installed<br />
Download /root/keys.tgz using winscp or other sftp/scp client such as filezilla<br />
Create a directory named vpn at C:\Program Files\OpenVPN\config\ and untar the content of keys.tgz there<br />
Start openvpn-gui, right click the tray icon go to vpn and click connect<br />
For support/bug reports email us at support@vpsnoc.com"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://vpsnoc.com/blog/how-to-install-openvpn-on-a-debianubuntu-vps-instantly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

