Nov 17, 2019 12:08 PM
(This post was last modified: Nov 17, 2019 12:14 PM by __Digital__.)
Today i will show you how to setup and install openvpn plus portforward on your vps or dedicated server, since there are so many people asking about vpns and safety.
Step 1. Is buy a vps or dedicated server from a reputable provider
Step 2. Connect to your vps/dedictaed server as follows download putty from Putty Here
![[Image: a033f87ca4bd464cc90d5e16c53b0130.png]](https://i.gyazo.com/a033f87ca4bd464cc90d5e16c53b0130.png)
Step 3. Install Git
Step 4. Get the road warrior install of openvpn
![[Image: cd4cd6fff2254bc83d663ff031e4cfe1.png]](https://i.gyazo.com/cd4cd6fff2254bc83d663ff031e4cfe1.png)
Step 5. Install openvpn using the script
Answer the following questions:
Public ip/Hostname Would be your server ip here
UDP or TCP
![[Image: 49d1b0d2fbd14392d1e532648ae77078.png]](https://i.gyazo.com/49d1b0d2fbd14392d1e532648ae77078.png)
Port listening on:![[Image: 9461cdc52561b68f49e4fa2965f5afa9.png]](https://i.gyazo.com/9461cdc52561b68f49e4fa2965f5afa9.png)
Select your DNS provider:
![[Image: 9009a88208d06433a786c78599257343.png]](https://i.gyazo.com/9009a88208d06433a786c78599257343.png)
Finally Client name of certificate:
![[Image: 71474b04a81391df476733771160eac3.png]](https://i.gyazo.com/71474b04a81391df476733771160eac3.png)
Step 6. Run openvpn-install.sh again
![[Image: 5746d1135520d944dea4801a61fd30c1.png]](https://i.gyazo.com/5746d1135520d944dea4801a61fd30c1.png)
Step 7. Connect to server with winscp or ftp client on port 22 get the client.ovpn file
![[Image: 5d3e48aa8c4324e8237a93cca77e59b9.png]](https://i.gyazo.com/5d3e48aa8c4324e8237a93cca77e59b9.png)
Step 8. Port forward 10.1.134.110 would be your openvpn client ip
Step 1. Is buy a vps or dedicated server from a reputable provider
Step 2. Connect to your vps/dedictaed server as follows download putty from Putty Here
![[Image: a033f87ca4bd464cc90d5e16c53b0130.png]](https://i.gyazo.com/a033f87ca4bd464cc90d5e16c53b0130.png)
Step 3. Install Git
Code
apt-get install git #Debian/ubuntu
yum install git #CentosStep 4. Get the road warrior install of openvpn
![[Image: cd4cd6fff2254bc83d663ff031e4cfe1.png]](https://i.gyazo.com/cd4cd6fff2254bc83d663ff031e4cfe1.png)
Code
git clone https://github.com/Nyr/openvpn-install.gitStep 5. Install openvpn using the script
Code
cd openvpn-install && chmod +x openvpn-install.sh && ./openvpn-install.shAnswer the following questions:
Public ip/Hostname Would be your server ip here
UDP or TCP
![[Image: 49d1b0d2fbd14392d1e532648ae77078.png]](https://i.gyazo.com/49d1b0d2fbd14392d1e532648ae77078.png)
Port listening on:
![[Image: 9461cdc52561b68f49e4fa2965f5afa9.png]](https://i.gyazo.com/9461cdc52561b68f49e4fa2965f5afa9.png)
Select your DNS provider:
![[Image: 9009a88208d06433a786c78599257343.png]](https://i.gyazo.com/9009a88208d06433a786c78599257343.png)
Finally Client name of certificate:
![[Image: 71474b04a81391df476733771160eac3.png]](https://i.gyazo.com/71474b04a81391df476733771160eac3.png)
Step 6. Run openvpn-install.sh again
![[Image: 5746d1135520d944dea4801a61fd30c1.png]](https://i.gyazo.com/5746d1135520d944dea4801a61fd30c1.png)
Step 7. Connect to server with winscp or ftp client on port 22 get the client.ovpn file
![[Image: 5d3e48aa8c4324e8237a93cca77e59b9.png]](https://i.gyazo.com/5d3e48aa8c4324e8237a93cca77e59b9.png)
Step 8. Port forward 10.1.134.110 would be your openvpn client ip
Code
iptables -t nat -A PREROUTING -p tcp --dport 28006 -j DNAT --to 10.1.134.110



