A
A
Anton2020-06-10 20:15:49
linux
Anton, 2020-06-10 20:15:49

How to set up openVPN to log into your home network?

Given:
VPS on the Internet, where the openVPN Server is up
At home, the openVPN Client is up on the router They
see each other and ping in both directions.
Settings on the client

spoiler
client
tls-client
tls-auth ta.key 1
auth SHA1
dev tun
proto udp
remote 185.188.zzz.zzz 1194
cipher AES-256-CBC
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
verb 3
tun-mtu 1500 
tun-mtu-extra 32 
mssfix 1450 
ping-restart 60 
ping 10

Server settings
spoiler
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key 
dh dh2048.pem
tls-server
tls-auth ta.key 0
server 10.10.10.0 255.255.255.0
cipher AES-256-CBC
status openvpn-status.log
log openvpn.log
duplicate-cn
push "route 10.10.10.0 255.255.255.0 10.10.10.1"
verb 3
mute 20
max-clients 15
keepalive 10 120
client-to-client
persist-key
persist-tun
route-gateway 10.10.10.1
topology subnet

VPS has a white ip 185.188.zzz.zzz and ip vpn 10.10.10.1 The
router at home does not have a white ip, vpn 10.10.10.4, the home LAN has addresses 192.168.1.1-100, the usb modem 192.168 is included in the router via usb. 8 .1
Ping inside vpn in both directions
From computer 192.168.1.5 there is a ping to 10.10.10.1
But with VPN it no longer pings to the home network and to the router (there is no ping 192.168.1.1 from the server 10.10.10.1)
How to make access with vpn to the local home network?
(everything is conceived as part of the implementation of this question: Sending post requests through vpn - will my scheme work? )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2020-06-10
@flapflapjack

You do not have routes to the 192.168 subnet in the client settings, on the server I think the same thing.
You need to manually add the route on the server, and on the client - as you wish. I connect to work with a config, where the routes are immediately registered, and they are added themselves:

part of client.ovpn
route 172.17.172.1 172.17.172.49
route 172.17.172.49 255.255.255.255
route 192.168.0.0 255.255.255.0 172.17.172.49
route 192.168.2.0 255.255.255.0 172.17.172.49
route 192.168.1.0 255.255.255.0 172.17.172.49
route 192.168.6.0 255.255.255.0 172.17.172.49
route 192.168.10.0 255.255.255.0 172.17.172.49

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question