Issue with OpenVPN server on Win10 with 2 network adapters
Posted: Fri Sep 30, 2016 5:24 am
I have 2 network adapters. 1 is connected to my gateway with the port forwarded for VPN, it's on the 10.0.0.0 subnet. I have a separate network adapter connected on a private network with some camera's, it's on a 172.16.12.0 subnet.
I have the setting in the server.ovpn
local 10.0.0.105
This binds the server to the correct network adapter I was expecting.
No matter what I do in the logs I see this:
Fri Sep 30 01:01:34 2016 OpenVPN 2.3.12 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 23 2016
Fri Sep 30 01:01:34 2016 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Sep 30 01:01:34 2016 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.09
Fri Sep 30 01:01:35 2016 Diffie-Hellman initialized with 1024 bit key
Fri Sep 30 01:01:35 2016 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Sep 30 01:01:35 2016 ROUTE_GATEWAY 172.16.12.1/255.255.255.0 I=5 HWADDR=
The server always binds to the route_gateway of 172.16.12.1. When it does this, I cannot connect to the VPN at all.
If I disable that network adapter and restart the OpenVPN service I will get the following:
Fri Sep 30 01:13:08 2016 OpenVPN 2.3.12 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 23 2016
Fri Sep 30 01:13:08 2016 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Sep 30 01:13:08 2016 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.09
Fri Sep 30 01:13:08 2016 Diffie-Hellman initialized with 1024 bit key
Fri Sep 30 01:13:08 2016 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Sep 30 01:13:08 2016 ROUTE_GATEWAY 10.0.0.1/255.255.255.0 I=12 HWADDR=
It binds to the correct route_gateway and works great.
The current solution I have in place is to disable the second network adapter, restart the OpenVPN server, it binds correctly, then afterwards I enable the second network adapter again and it starts working and the VPN continues to work.
I want OpenVPN to ignore that second NIC all together, it's not needed for the purposes I'm trying to solve. The "local" setting is not working.
I also tried to add "route-gateway 10.0.0.1" as a command and it changed nothing.
I'm not sure how it's selecting this.
I also modified registry to switch adapters from public to private in the category seeing if it made a difference, nothing.
Any ideas?
I have the setting in the server.ovpn
local 10.0.0.105
This binds the server to the correct network adapter I was expecting.
No matter what I do in the logs I see this:
Fri Sep 30 01:01:34 2016 OpenVPN 2.3.12 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 23 2016
Fri Sep 30 01:01:34 2016 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Sep 30 01:01:34 2016 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.09
Fri Sep 30 01:01:35 2016 Diffie-Hellman initialized with 1024 bit key
Fri Sep 30 01:01:35 2016 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Sep 30 01:01:35 2016 ROUTE_GATEWAY 172.16.12.1/255.255.255.0 I=5 HWADDR=
The server always binds to the route_gateway of 172.16.12.1. When it does this, I cannot connect to the VPN at all.
If I disable that network adapter and restart the OpenVPN service I will get the following:
Fri Sep 30 01:13:08 2016 OpenVPN 2.3.12 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 23 2016
Fri Sep 30 01:13:08 2016 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Sep 30 01:13:08 2016 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.09
Fri Sep 30 01:13:08 2016 Diffie-Hellman initialized with 1024 bit key
Fri Sep 30 01:13:08 2016 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Sep 30 01:13:08 2016 ROUTE_GATEWAY 10.0.0.1/255.255.255.0 I=12 HWADDR=
It binds to the correct route_gateway and works great.
The current solution I have in place is to disable the second network adapter, restart the OpenVPN server, it binds correctly, then afterwards I enable the second network adapter again and it starts working and the VPN continues to work.
I want OpenVPN to ignore that second NIC all together, it's not needed for the purposes I'm trying to solve. The "local" setting is not working.
I also tried to add "route-gateway 10.0.0.1" as a command and it changed nothing.
I'm not sure how it's selecting this.
I also modified registry to switch adapters from public to private in the category seeing if it made a difference, nothing.
Any ideas?