One client for two servers with same vpn subnet ip

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
vblack
OpenVpn Newbie
Posts: 1
Joined: Tue Jan 10, 2023 1:54 pm

One client for two servers with same vpn subnet ip

Post by vblack » Tue Jan 10, 2023 3:01 pm

Hello.
Could not find reliable solution on client configuration.

I have two openvpn servers (on routers) with same vpn subnet 192.168.254.0, so when I connect to them as a openvpn client - I get IP from same subnet, sometimes same IP ex. 192.168.254.2

Local network subnet of both servers is different 192.168.10.0/24 and 192.168.5.0/24 respectively, and I need to access them both from the client.
I could not change openvpn servers configuration as it is hardcoded inside router without ability to change it.

Is there anything I could do on openvpn client side to have successful routing to 192.168.10.0/24 and 192.168.5.0/24 networks at the same time or it is completely no go ?

client config looks like this:
Client config

client
dev tun4
proto tcp
remote <server_ip> <port>
resolv-retry infinite
keepalive 10 120

nobind
persist-key
persist-tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/client.crt
key /etc/openvpn/keys/client.key
cipher AES-128-CBC
comp-lzo


Thank you.

Post Reply