Documente Academic
Documente Profesional
Documente Cultură
If this is your rst visit, be sure to check out the FAQ by clicking the link above. You
may have to register before you can post: click the register link above to proceed. To
start viewing messages, select the forum that you want to visit from the selection
below.
Tags: dedicated, install openvpn, openvpn setup, vps
1
TmzHosting said:
06-27-2012 12:35 PM
If you get anything else, you will need to contact your hosting provider to have TUN
enabled. Generally if it is disabled it will return a le not found message.
We will proceed by installing some modules which will be required later on in the
install process.
Code: [View]
yum install gcc make rpm-build zlib-devel pam-devel openssl openssl-devel autoconf.noarch nano -y
Lets download the OpenVPN REPO and RPMForge REPO install les.
CentOS 6.x 64-bit
Code: [View]
wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm
wget http://pkgs.repoforge.org/rpmforge-r....rf.x86_64.rpm
If you are using CentOS 5.x, change the el6 in the second URL to el5. If youre using
the 32-bit version of your OS, change x86_64 to read i386
Next we need to build and install the RPM packages we just downloaded.
Code: [View]
rpmbuild --rebuild lzo-1.08-4.rf.src.rpm
rpm -Uvh lzo-1.08-4.rf.src.rpm
rpm -Uvh rpmforge-release*
Copy the contents of the easy-rsa folder to /etc/openvpn so we can build the
certicates required to connect to the VPN.
Code: [View]
cp -R /usr/share/doc/openvpn-2.*/easy-rsa/ /etc/openvpn/
The next step will actually build the certicate. It will ask you questions and they will
need to be modied or you can just press enter to skip through most of them.
Code: [View]
./build-ca
Code: [View]
./build-key-server server
Use the same entries as build-ca, along with the following additional parameters
A challenge password:Leave this blank
An optional company name:Optional
Sign the certicate?: y
1 out of 1 certicate requests certied, commit?: y
Build DH Parameters (this may take a moment):
Code: [View]
./build-dh
We will now make a conguration le for OpenVPN. You may use any text editor you
like. I prefer nano and will use it for the remainder of this tutorial.
Code: [View]
nano /etc/openvpn/cong-default.conf
Code: [View]
local x.x.x.x #- your_server_ip
port 1194 #- default port
proto udp #- protocol
dev tun
If youre using nano you can save and close the le by Ctrl+X and typing y at the
prompt asking to save changes.
Now lets start the OpenVPN server using the conguration le we just made.
Code: [View]
openvpn /etc/openvpn/cong-default.conf &
Ctrl+C to exit from the process monitor. OpenVPN should remain running in the
background.
Enable IP forwarding on the server:
Code: [View]
echo 1 > /proc/sys/net/ipv4/ip_forward
Create the iptables routes to enable trac to ow through the VPN properly
Code: [View]
iptables -t nat -A POSTROUTING -s 1.2.3.0/24 -j SNAT --to x.x.x.x
C:\Program Files\OpenVPN\cong. If youre using Windows Visa/7 x64, this will likely
be found in C:\Program Files (x86)\OpenVPN\cong.
Picture 2
Were now on the home stretch. Lets create a cong le on our desktop that will let us
connect to the VPN.
Create a le in the same cong directory and paste the following details in it. Please
make sure it is not namedanything.ovpn.txt or this will not work correctly.
Code: [View]
client
dev tun
proto udp #- protocol
remote x.x.x.x 1194 #- SERVER IP and OPENVPN Port
HostWinds said:
06-28-2012 11:57 AM
Thank you for the guide! I've seen several OpenVPN tutorials and this is one of the
most straightforward. Keeping it on my bookmarks just in case.
Hostwinds Unlimited Web Hosting
Cpanel/WHM | Not Oversold | Low Server Loads | Reseller / Business Plans Available
VPS Hosting | OpenVZ | SolusVM | Popular Distributions | Windows VPS's
quantumphysics said:
06-28-2012 12:09 PM
don't use 1.* for internal IPs!
they are publicly routed IPs being used by other people!!
mirACL: rewalls in software.
ServerZoo said:
06-28-2012 12:19 PM
nice how to indeed!
KnownHost-Jonathan said:
06-28-2012 01:00 PM
Originally Posted by quantumphysics
don't use 1.* for internal IPs!
they are publicly routed IPs being used by other people!!
1.2.3.4 is for example purposes.
KnownHost Managed VPS Specialists
Fully Managed VPS and Dedicated Servers
RocketVPS.com - Premium Unmanaged VPS Hosting
KnownHost is hiring ! Click here for more informatio n!
trige said:
06-28-2012 03:40 PM
IT may sounds strange but many VPS providers have pre-installed templates for this!
TmzHosting said:
06-28-2012 04:22 PM
Originally Posted by trige
IT may sounds strange but many VPS providers have pre-installed templates for
this!
You are correct, but MANY do not. We posted this article on our blog and it has been
getting a lot of hits, which made us post it here because it's in demand.
- Daniel
Managed & Unmanaged VPS's [OpenVZ & KVM] by tmzVPS.com | FAST SSD Accelerated Plans!
Locations in California, Florida & London - Legal Adult Content Allowed! 24/7 Certied Support.
DDOS Protected VPS [KVM] - cPanel/WHM | Premium Softaculous | Data Migration Included!
INSTANT SETUP | Paypal, Skrill, 2checkout, BitCoin & all Major Credit Cards Accepted!
Abhinandangarg said:
06-29-2012 05:26 AM
Filezilla is good as an FTP client, as you wouldn't have to actually enable FTP. If you
set it to use port 22, it will transfer les over SSH, which is much more secure
brlm2011 said:
06-30-2012 11:27 PM
Ok so I am new to installing openVPN on a VPS server which is what I am
currently trying to do. I know absolutely nothing about this stu I just followed the
tutorial so far. I have reached the point of making a conguration le but I am stuck.
Do I have to use a text editor and save the le as cong-default.conf?? Or do i just
enter the info into the command line.?? I really have no idea any help would be much
appreciated.
hxrsmurf said:
07-01-2012 07:50 PM
Thank you so much! I have tried many tutorials and even the template provided by my
VPS provider, but this is the only one that has worked, but maybe I did something
wrong with the earlier tutorials. Thanks so much.
AlienVPS: 199.19.116.157
Simple, but easy
My Website
TmzHosting said:
07-02-2012 07:22 AM
Originally Posted by brlm2011
Ok so I am new to installing openVPN on a VPS server which is what I am currently
trying to do. I know absolutely nothing about this stu I just followed the tutorial so
far. I have reached the point of making a conguration le but I am stuck. Do I have
to use a text editor and save the le as cong-default.conf?? Or do i just enter the
info into the command line.?? I really have no idea any help would be much
appreciated.
Jonathan will be in soon and he will get this question answered for you.
Originally Posted by hxrsmurf
Thank you so much! I have tried many tutorials and even the template provided by
my VPS provider, but this is the only one that has worked, but maybe I did
something wrong with the earlier tutorials. Thanks so much.
AlienVPS: 199.19.116.157
I am glad you found this tutorial useful.
- Daniel
Managed & Unmanaged VPS's [OpenVZ & KVM] by tmzVPS.com | FAST SSD Accelerated Plans!
Locations in California, Florida & London - Legal Adult Content Allowed! 24/7 Certied Support.
DDOS Protected VPS [KVM] - cPanel/WHM | Premium Softaculous | Data Migration Included!
INSTANT SETUP | Paypal, Skrill, 2checkout, BitCoin & all Major Credit Cards Accepted!
KnownHost-Jonathan said:
07-02-2012 12:32 PM
TmzHosting said:
07-02-2012 12:37 PM
I also got this in a PM and wanted to post it here in case someone else is having this
issue:
Hey, so i looked at your guide and gave it a go. But when i got to wget
http://openvpn.net/release/lzo-1.08-4.rf.src.rpm
wget http://pkgs.repoforge.org/rpmforge-r....rf.x86_64.rpm
it did not work, it said invalid command.
- Daniel
Managed & Unmanaged VPS's [OpenVZ & KVM] by tmzVPS.com | FAST SSD Accelerated Plans!
Locations in California, Florida & London - Legal Adult Content Allowed! 24/7 Certied Support.
DDOS Protected VPS [KVM] - cPanel/WHM | Premium Softaculous | Data Migration Included!
INSTANT SETUP | Paypal, Skrill, 2checkout, BitCoin & all Major Credit Cards Accepted!
error10 said:
07-02-2012 12:47 PM
Originally Posted by TmzHosting
I also got this in a PM and wanted to post it here in case someone else is having this
issue:
You need to have wget installed. Many VPS templates omit it. Just do:
yum install wget
Your real IP address -- That proxy may not be as anonymous as you think! Now with IPv6 support!
KnownHost-Jonathan said:
07-02-2012 01:49 PM
Originally Posted by error10
You need to have wget installed. Many VPS templates omit it. Just do:
yum install wget
OR, for Debian-based distro's:
Code: [View]
apt-get install wget
BoxyVPS said:
07-04-2012 03:04 PM
GH-Chris said:
07-04-2012 03:08 PM
Very useful, detailed and informative tutorial!
TmzHosting said:
07-04-2012 04:36 PM
Originally Posted by BoxyVPS
Thanks for this, If you dont mind i have put it on my site.
I have put where it originated from.
-BoxyVPS
Can you please share the link where it is posted. It really originated from our blog.
- Daniel
Managed & Unmanaged VPS's [OpenVZ & KVM] by tmzVPS.com | FAST SSD Accelerated Plans!
Locations in California, Florida & London - Legal Adult Content Allowed! 24/7 Certied Support.
DDOS Protected VPS [KVM] - cPanel/WHM | Premium Softaculous | Data Migration Included!
INSTANT SETUP | Paypal, Skrill, 2checkout, BitCoin & all Major Credit Cards Accepted!
ultimatewebhost said:
07-04-2012 05:40 PM
Awesome tutorial.
Ultimatehostings
Fully Managed Services
doughnet said:
07-22-2012 01:39 PM
great tut
years i couldnt gure this stu out
now i already set this up on 10 of my systems!
<3
TmzHosting said:
07-23-2012 10:50 AM
gold2 said:
07-23-2012 12:35 PM
really great tutorial,
Web Hosting in Pakistan -> Fast Hosting,(25 minute initial ticket response time guarantee)
Hosting in Pakistan -> Keep your site online with Cheap Price
neovo said:
08-03-2012 07:34 PM
I keep getting this
Code: [View]
Connecting to apt.sw.be|193.1.193.67|:80... connected.
-bash: 193.1.193.67: command not found
-bash: :80...: command not found
-bash: Connecting: command not found
[root@myvps ~]# HTTP request sent, awaiting response... 404 Not Found
CronicHosting said:
08-10-2012 08:52 AM
Nice tutorial!
dmitriy2011 said:
10-19-2012 10:49 PM
Hi.
Please pardon my ignorance but if I want to use vpn with torrent client do I need to set
the torrent client to use the port of the vpn or I will still be able to use a random port
in my torrent client?
Thank you for help.
D