One client for two servers with same vpn subnet ip
Posted: 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
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.
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.