N
N
neosapient2021-06-08 23:44:48
openvpn
neosapient, 2021-06-08 23:44:48

How to turn a VPS into a proxy server if you have already raised OpenVPN?

Hello.
Newbie question.
I have a need to access the network from a static IP.
(My home Internet has a dynamic IP. Plus, I often travel on business and the IP often changes.)
I rented a VPS and deployed OpenVPN on it - I expected that this would allow it to be used as a proxy for accessing the Internet.

Used this guide to set up OpenVPN
https://internet-lab.ru/windows_openvpn_2_5_1

Managed to set up OpenVPN - computers on the same network, and now I can RDP into the VPS.
My laptop got an additional IP of 10.8.0.6, and the VPS has an IP of 10.8.0.1
(By the way, both my home laptop and the VPS are running Windows).

How do I get my laptop to connect to the internet through a VPS host? How to make a proxy server from VPS?
Now, when I go online, the laptop shows up under the IP of the home provider

. Perhaps something needs to be corrected in the ovpn files?
client.ovpn

client
proto tcp
dev tun
remote XX.XX.XX.XX 1194 # <-- тут указан IP моего VPS и порт 1194

resolv-retry infinite
nobind
persist-key
persist-tun

ca ca.crt
cert client.crt
key client.key # This file should be kept secret

remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-GCM
verb 0
connect-retry-max 25

server.ovpn

port 1194
proto tcp
dev tun

ca "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\issued\\server.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\private\\server.key" # This file should be kept secret
dh "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\dh.pem"

server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
duplicate-cn
keepalive 10 120
tls-auth "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ta.key" 0 # This file is secret
cipher AES-256-GCM
persist-key
persist-tun
status "C:\\Program Files\\OpenVPN\\log\\status.log"
log "C:\\Program Files\\OpenVPN\\log\\openvpn.log"
verb 4
mute 20
windows-driver wintun

Thank you.
picture
60bfd57b67e4b079191762.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
neosapient, 2021-06-20
@neosapient

Digging through the openvpn.net forum, I found several posts that for my case I need to
1) Enable the setting in the server.ovpn file
push "redirect-gateway def1 bypass-dhcp"
This will force traffic on the side of the home laptop to look for access to the Internet inside the raised local network .
2) Set up NAT on the VPS server.
I tried to install NAT on Windows 2016: OpenVPN + NAT did not work.
Demolished Windows 2016.
Then I tried to install Windows 2012, installed OpenVPN + NAT on it = the link worked! I am visible on the internet with the ip address of my VPS server.

C
CityCat4, 2021-06-09
@CityCat4

Perhaps you need to put a proxy on the VPS? :)

L
Leonid Rtemyev, 2022-03-19
@ArtN23

Cloud servers REG.RU: https://8goo.top/IkY/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question