Skip to content
WJunction - Webmaster Forum

any guides to install a open vpn

Status
Not open for further replies.
hi there i am looking for a simple noobish guide to install open vpn on my dedi

so i can use the dedis ip to server the internet on my home pc is this possible

tia for any help with this
 

9 comments

In ubuntu, it's simple.

I will assume you have 10.04 and higher. I have no experience to the earlier versions.

First, install the required components, I do it this way:

1. apt-get update -y (I will always do this first, more of an impulse)
2. apt-get install openvpn nano wget iptables -y
3. copy some openvpn files
cp -R /usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn/
4. go to the directory to set your certificates
cd /etc/openvpn/easy-rsa/2.0/
source ./vars
./clean-all
./build-ca (this will ask you a few things, just answer it)
./build-key-server server (this will ask you a few things, just answer it)
./build-dh
5. upload your server config file to the /etc/openvpn directory
6. run openvpn using this command - service openvpn start
7. create iptables, depending on the subnet you use in the openvpn config, I do it using this command:
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o venet0 -j SNAT --to vpsIPhere

I used 10.0.0.0 as a subnet.

This works assuming you already have tun/tap enable by your host.

If this post helped, kindly give me a like ;)
 
You can check it using this command:

cat /dev/net/tun

If it says "file descriptor in bad state" then you have tun/tap.

Also, you can integrate your openvpn to scripts for authentication if you have clients.

---------- Post added at 06:28 PM ---------- Previous post was at 06:23 PM ----------

Oh,btw,I'll be up in the next few hours, just post on this thread should you have some concerns and I'll walk you through it.
 
^ how to integrate some scripts for authentication mate? like clients won't be able to share their accounts.
 
Status
Not open for further replies.

About the author

J
Active Member · Joined
479
Messages
62
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom