Hi,
I'm trying to configure OpenVPN Server in Windows 10 to connect it with another VPN that I have installed (UltraVPN/NordVPN), so all clients use the UltraVPN/NordVPN internet connection.
My current setup:
I have OpenVPN Server installed on Windows 10 (configs are below) and I shared the Windows 10 WIFI internet with OpenVPN Network adapter (network properties, select WIFI Network Adapter -> Sharing -> point to OpenVPN Server network adapter)
In this setup everything works fine - clients can connect to OpenVPN Server, browse the internet, ping the server.
This is my "route print" table for the working connection with WIFI sharing
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.145 40
10.8.0.0 255.255.255.0 On-link 10.8.0.1 281 OpenVPN Server (.1)
10.8.0.1 255.255.255.255 On-link 10.8.0.1 281
10.8.0.255 255.255.255.255 On-link 10.8.0.1 281
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.1.0 255.255.255.0 On-link 192.168.1.145 296
192.168.1.145 255.255.255.255 On-link 192.168.1.145 296
192.168.1.255 255.255.255.255 On-link 192.168.1.145 296
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 10.8.0.1 281
224.0.0.0 240.0.0.0 On-link 192.168.1.145 296
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 10.8.0.1 281
255.255.255.255 255.255.255.255 On-link 192.168.1.145 296
===========================================================================
Desired State:
I have the UltraVPN/NordVPN installed on my Windows 10, alongside with OpenVPN Server, and I would like to configure my OpenVPN Server to provide the clients with UltraVPN/NordVPN connection, not my local WIFI.
For example, if I establish UltraVPN/NordVPN connection with New Zealand I want my OpenVPN Server to use that connection, not my local WIFI. So the OpenVPN clients are getting the traffic from UltraVPN/NordVPN
Question: How to do it?
I tried to share my UltraVPN/NordVPN network adapter (not WIFI) with OpenVPN Server adapter. In this case, the clients can connect to OpenVPN Server, but they have neither internet, nor they can ping 8.8.8.8.
I checked my OpenVPN Server PC internet and browsed to
https://mylocalion.org to confirm that I'm in New Zealand, so the Ultra VPN it's working on server PC, but clients cannot see this traffic.
I reverted back to sharing WIFI connection on OpenVPN Server PC and it's back to normal - but my hometown internet/location, not New Zealand
What I found that when I have WIFI connection shared with OpenVPN Server, and everything is working via WIFI adapter, the moment I establish UltraVPN connection the internet disappears on OpenVPN clients (cannot ping 8.8.8.8), but the connection to OpenVPN Server still successful
The internet on OpenVPN Server PC goes via established UltraVPN and I appear in New Zealand (but not my clients)
There seems to be something wrong with my OpenVPN Server configuration or routing tables.
I captured the routing table when UltraVPN connection is established with the existing WIFI sharing and the table looks like below.
You can see that there is an additional record appears to get 0.0.0.0 to UltraVPN IP address (network adapter IP) somehow cutting off the internet from OpenVPN clients.
But I don't understand why
Could you advise what is wrong and how to configure OpenVPN to get the traffic from another VPN connection?
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.145 4265
0.0.0.0 0.0.0.0 On-link 10.121.228.43 2 UlraVPN
10.8.0.0 255.255.255.0 On-link 10.8.0.1 4506
10.8.0.1 255.255.255.255 On-link 10.8.0.1 4506
10.8.0.255 255.255.255.255 On-link 10.8.0.1 4506
10.121.228.43 255.255.255.255 On-link 10.121.228.43 257
85.132.61.122 255.255.255.255 192.168.1.1 192.168.1.145 4266 This is the UltraVPN Public IP
127.0.0.0 255.0.0.0 On-link 127.0.0.1 4556
127.0.0.1 255.255.255.255 On-link 127.0.0.1 4556
127.255.255.255 255.255.255.255 On-link 127.0.0.1 4556
192.168.1.0 255.255.255.0 On-link 192.168.1.145 4521
192.168.1.145 255.255.255.255 On-link 192.168.1.145 4521
192.168.1.255 255.255.255.255 On-link 192.168.1.145 4521
224.0.0.0 240.0.0.0 On-link 127.0.0.1 4556
224.0.0.0 240.0.0.0 On-link 10.8.0.1 4506
224.0.0.0 240.0.0.0 On-link 192.168.1.145 4521
224.0.0.0 240.0.0.0 On-link 10.121.228.43 2
255.255.255.255 255.255.255.255 On-link 127.0.0.1 4556
255.255.255.255 255.255.255.255 On-link 10.8.0.1 4506
255.255.255.255 255.255.255.255 On-link 192.168.1.145 4521
255.255.255.255 255.255.255.255 On-link 10.121.228.43 257
===========================================================================
port 1194
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh2048.pem"
topology subnet
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
cipher AES-256-CBC
max-clients 10
persist-key
persist-tun
log
openvpn.log
verb 4
explicit-exit-notify 1
client
dev tun
proto udp
remote <myserverIP> 1194
resolv-retry infinite
keepalive 5 10
nobind
persist-key
persist-tun
verb 4
ca ca.crt
cert Client1.crt
key Client1.key[/olog]