Openvpn connect two networks

Hi, sorry to bother but i've followed the basic guide to configure openvpn but i can't get it to work with 2 different subnet like it was with the previous guide, now removed from the site.

Server network 192.168.1.0
Client network 192.168.0.0

Server conf:

verb 3
user nobody
group nogroup
dev tun0
port 1194
proto udp
server 192.168.8.0 255.255.255.0
topology subnet
client-to-client
keepalive 10 120
persist-tun
persist-key
push "dhcp-option DNS 192.168.8.1"
push "dhcp-option DOMAIN lan"
#push "redirect-gateway def1"
push "persist-tun"
push "persist-key"

Client conf:

verb 3
dev tun
nobind
client
remote mysyte.com 1194 udp
auth-nocache
remote-cert-tls server

I thanks for your time and help on resolving this problem.

EDIT: I've followed the Site-to-Site instructions but i can't seem to be able to access the client network but the ping it's working on 192.168.8.2 (client pvn ip) from my server network.

You need a route 192.168.1.0 255.255.255.0 on server side and 192.168.1.0 on client side.

1 Like

Thanks yes that's it, i forgot to edit the config under /etc/openvpn/ccd/vpnclient

but instead of adding on client side the guide set like that:

ifconfig-push 192.168.8.2 255.255.255.0
iroute 192.168.0.0 255.255.255.0

Now it's working fine. Thanks for your help, now next time i know what needs to be done.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.