<?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</title>
	<atom:link href="http://vpsnoc.com/blog/tag/openvpn/feed/" rel="self" type="application/rss+xml" />
	<link>http://vpsnoc.com/blog</link>
	<description>Your Number One VPS Host</description>
	<lastBuildDate>Thu, 23 Feb 2012 14:14:22 +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>
		<item>
		<title>How to setup a VPN server on a CentOS VPS instantly</title>
		<link>http://vpsnoc.com/blog/how-to-setup-a-vpn-server-on-a-centos-vps-instantly/</link>
		<comments>http://vpsnoc.com/blog/how-to-setup-a-vpn-server-on-a-centos-vps-instantly/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 00:04:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS VPS]]></category>
		<category><![CDATA[OpenVPN VPS]]></category>
		<category><![CDATA[VPN VPS]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[VPS hosting]]></category>

		<guid isPermaLink="false">http://vpsnoc.com/blog/?p=86</guid>
		<description><![CDATA[We have made a small and dirty bash script which installs and configures OpenVPN on CentOS 5 32bit. The VPN server&#8217;s primary (and only) use is for safe browsing i.e. tunneling all your traffic through your VPS. The script also generates your client configuration file along with the necessary keys for authentication. Requirements 1. CentOS [...]]]></description>
			<content:encoded><![CDATA[<p>We have made a small and dirty bash script which installs and configures <strong>OpenVPN on CentOS</strong> 5 32bit. The VPN server&#8217;s primary (and only) use is for safe browsing i.e. <strong>tunneling all your traffic through your VPS</strong>. The script also generates your client configuration file along with the necessary keys for authentication.</p>
<p><strong> Requirements </strong></p>
<p>1. CentOS 5 32bit minimal OS template</p>
<p>2. TUN/TAP device enabled on your VPS</p>
<p>3. iptables NAT support</p>
<p>You will have to open a ticket to request a TUN/TAP device to be enabled on your VPS. If you&#8217;re not a customer of ours and your host&#8217;s support staff doesn&#8217;t know how to do this, you may tell them to execute the following commands on the hardware node where your VPS is hosted.<br />
<code><br />
vzctl stop YOUR_VEID<br />
vzctl set YOUR_VEID  --devices c:10:200:rw --save<br />
vzctl set YOUR_VEID  --capability net_admin:on --save<br />
vzctl start YOUR_VEID<br />
vzctl exec YOUR_VEID  "mkdir -p /dev/net; mknod /dev/net/tun c 10 200; chmod 600 /dev/net/tun"<br />
# iptables support<br />
vzctl stop YOUR_VEID<br />
vzctl set YOUR_VEID  --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save<br />
vzctl start YOUR_VEID<br />
</code><br />
Make sure they will replace &#8216;YOUR_VEID&#8217; with your VPS&#8217;s VEID and you will be ready to roll</p>
<p>Login to your VPS as root and execute the following commands<br />
<code><br />
wget http://vpsnoc.com/scripts/install-openvpn.sh<br />
chmod +x install-openvpn.sh<br />
./install-openvpn.sh<br />
</code><br />
You will be prompted to enter values for your server and client certificate, feel free to accept (hit enter) the default values. Its not recommended to setup a password for your server certificate as you will have to type in the password each time you wish to start/restart the <strong>openvpn daemon</strong>.<br />
You can however set a password for your client&#8217;s certificate since it offers extra level of protection in case your certificate and key files are compromised. You will be prompted for that password each time you connect on your <strong>VPS&#8217;s VPN</strong>.</p>
<p>After the script finished installing openvpn (should be very quick) the client keys and the <strong>openvpn client </strong>configuration file will be archived in /root/keys.tgz<br />
You may use a sftp/scp client such as <a href="http://winscp.net/eng/download.php">winscp</a> or <a href="http://filezilla-project.org/download.php">filezilla </a> to download the archive on your computer.</p>
<p>If you already haven&#8217;t installed <a href="http://openvpn.se/download.html">openvpn</a> for windows you may do so now.<br />
You may use winrar or 7zip to extract the content of keys.tgz in C:\Program Files\OpenVPN\config\VPN (create a folder named VPN there)<br />
After you have extracted the files from keys.tgz in the above folder, you may start openvpn-gui from the start menu, right click the tray icon, go to VPN and click connect. After the icon turns green all your traffic will be forwarded through your VPS, no extra configuration on your browser/IM client/email client is required.</p>
<p>If you&#8217;re facing issues make sure that your computer clock is synchronized, if so make sure that your VPS&#8217;s clock is correct as well. If it&#8217;s not you will have to ask your host to sync it.</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.<br />
<code><br />
#!/bin/bash<br />
# Quick and dirty OpenVPN install script<br />
# Tested on Centos 5.x 32bit, openvz minimal CentOS OS templates<br />
# Please submit feedback and questions at support@vpsnoc.com</code></p>
<p><code># John Malkowski vpsnoc.com 01/04/2010</code></p>
<p><code>ip=`grep IPADDR /etc/sysconfig/network-scripts/ifcfg-venet0:0 | awk -F= '{print $2}'`</code></p>
<p><code>wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm<br />
rpm -iv rpmforge-release-0.3.6-1.el5.rf.i386.rpm<br />
rm -rf rpmforge-release-0.3.6-1.el5.rf.i386.rpm</code></p>
<p><code>yum -y install openvpn openssl openssl-devel<br />
cd /etc/openvpn/<br />
cp -R /usr/share/doc/openvpn-2.0.9/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/</code></p>
<p><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"<br />
</code><br />
<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</code></p>
<p><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 nobody<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/sysconfig/iptables<br />
sed -i 's/eth0/venet0/g' /etc/sysconfig/iptables # dirty vz fix for iptables-save<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-setup-a-vpn-server-on-a-centos-vps-instantly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

