D
D
DrunkGambit2020-04-24 11:08:57
openvpn
DrunkGambit, 2020-04-24 11:08:57

How to access server network via vpn from client network?

Good day, there was a problem with forwarding the ip of the server's local network through vpn. The task itself is quite simple: create a vpn (via openvpn) on one of the devices (windows 10) / server (server 2019), which will make it possible to connect to the local network from an insecure network (Internet) through external devices. (OS windows 7-10)
VPN: 10.10.10.0, server LAN: 192.168.1.0

OpenVPN server settings:
port 7777
proto tcp
dev tun
dev-node OpenVPN
ca "C:\\Program Files\\OpenVPN\\ssl\\ ca.crt"
cert "C:\\Program Files\\OpenVPN\\ssl\\server.crt"
key "C:\\Program Files\\OpenVPN\\ssl\\server.key"
dh "C:\\ Program Files\\OpenVPN\\ssl\\dh1024.pem"
tls-server
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
server 10.10.10.0 255.255.255.0
log "C:\\Program Files\\OpenVPN\\openvpn.log"
verb 3
mute 20
max-clients 15
keepalive 10 120
client-to -client
comp-lzo
persist-key
persist-tun
route-method exe
route-delay 5
push "route 192.168.1.0 255.255.255.0 10.10.10.1"
route 192.168.1.0 255.255.255.0 10.10.10.1
route 10.10.10.1 255.205.1 .1.0
route-gateway 10.10.10.1
topology subnet

OpenVPN client settings:
dev tun
proto tcp
remote *************** 7777
route-delay 3
client
tls-client
ns-cert-type server
ca "C:\\Program files\\OpenVPN\\ssl\\ca.crt"
cert "C:\\Program files\\OpenVPN\\ssl\\User.crt"
key "C:\\Program files\\OpenVPN\\ssl\\User.key"
comp-lzo
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450 ping
-restart 60
ping 10
verb 3

client to the server's local network (192.168.1.0).

Client
5ea3e4759e94e106220610.png
routing: Server routing:
5ea3e4a825eb6043258205.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Drno, 2020-04-24
@Drno

In the client config, you need to set the route
On the server, allow masquarade

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question