OpenVPN 1.6-beta1 released
Well it's that time again... the first 1.6 beta is now available and ready for testing. This is primarily a bugfix release, with the most significant change being the implementation of "--ip-win32 dynamic" for the Windows version. Instead of releasing this version as a quickie 1.5.1, I decided to jump to 1.6 and do another beta testing cycle because "--ip-win32 dynamic" involves a moderate addition to the TAP-Win32 driver, and device driver changes need to always be treated with caution. I've done my own stress testing on the driver using XP, and I'm confident at this point to release it as beta.
Some of you may recall during the 1.5 beta testing cycle, that getting the --ifconfig option to work on Windows was problematic because there did not seem to be a consistent API for programmatically setting the TCP/IP properties of a network adapter. The choice was made in 1.5 to use the "IP Helper API" by default, but that produced the strange side effect that the adapter ends up with two addresses, one is what you want, the other is the bogus "autoconfiguration" address which besides being a terrible hack, tends to break samba.
But there's another way, and it happens to be one of the most universal and often-used mechanism for setting TCP/IP properties: DHCP. When OpenVPN opens a TAP-Win32 interface, Windows (by default) starts sending DHCP queries, looking for a DHCP server. All one has to do is reply to these queries and windows will dutifully set any TCP/IP property which you care to specify. This is the basis of the new "--ip-win32 dynamic" option. It's been made the default in 1.6-beta1 and I would encourage all to test it to determine whether or not it will be the definitive --ip-win32 method.
There are a number of other bugfixes in this release, the most notable being improvements to the HTTP proxy client mode, which in 1.5.0 does not work on certain HTTP proxies.
James
James,
Just put 1.6 beta into place. I will no longer set routes via office.up.bat on Windows 2000. I currently have a up delay of 5 seconds. This is what I get in my logs:
---SNIP---
Sun Jan 18 14:30:17 2004 20: Local Options hash (VER=V3): 'e6303372'
Sun Jan 18 14:30:17 2004 21: Expected Remote Options hash (VER=V3): 'e6303372'
Sun Jan 18 14:30:17 2004 22: UDPv4 link local (bound): [undef]:5001
Sun Jan 18 14:30:17 2004 23: UDPv4 link remote: 12.27.xxx.xxx:5001
Sun Jan 18 14:30:20 2004 24: Peer Connection Initiated with 12.27.xxx.xxx:5001
Sun Jan 18 14:30:22 2004 25: Attempting to lock Win32 semaphore 'openvpn_netcmd' prior to net shell command (timeout = 600 sec)
Sun Jan 18 14:30:22 2004 26: TAP-WIN32 device [OpenVPN] opened: \\.\{A93FB2A2-9C8A-4040-9B4A-461BEB112723}.tap
Sun Jan 18 14:30:22 2004 27: TAP-Win32 Driver Version 4.18
Sun Jan 18 14:30:22 2004 28: TAP-Win32 MTU=1500
Sun Jan 18 14:30:22 2004 29: Notified TAP-Win32 driver to set a dynamic IP/netmask of 192.168.200.6/255.255.255.252 on interface {A93FB2A2-9C8A-4040-9B4A-461BEB112723} Sun Jan 18 14:30:22 2004 30: Successful ARP Flush on interface [2] {A93FB2A2-9C8A-4040-9B4A-461BEB112723}
Sun Jan 18 14:30:22 2004 31: office.up.bat OpenVPN 1500 1577 192.168.200.6 255.255.255.252 init
C:\Program Files\OpenVPN\config>route add 192.168.100.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.101.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.102.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.103.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.104.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
---SNIP---
Now, if I remove the office.up.bat in the configuration and wait for the VPN to be established, and run the office.up.bat manually, everything works great. Guessing it's to do with the .252 subnet mask?
Doug
Quoted 2 lines
James,
Just put 1.6 beta into place. I will no longer set routes via office.up.bat on Windows 2000. I currently have a up delay of 5 seconds. This is what I get in my logs:
---SNIP---
Sun Jan 18 14:30:17 2004 20: Local Options hash (VER=V3): 'e6303372' Sun Jan 18 14:30:17 2004 21: Expected Remote Options hash (VER=V3):
'e6303372'
Sun Jan 18 14:30:17 2004 22: UDPv4 link local (bound): [undef]:5001 Sun Jan 18 14:30:17 2004 23: UDPv4 link remote: 12.27.xxx.xxx:5001 Sun Jan 18 14:30:20 2004 24: Peer Connection Initiated with 12.27.xxx.xxx:5001
Sun Jan 18 14:30:22 2004 25: Attempting to lock Win32 semaphore 'openvpn_netcmd' prior to net shell command (timeout = 600 sec) Sun Jan 18 14:30:22 2004 26: TAP-WIN32 device [OpenVPN] opened:
\\.\{A93FB2A2-9C8A-4040-9B4A-461BEB112723}.tap
Sun Jan 18 14:30:22 2004 27: TAP-Win32 Driver Version 4.18 Sun Jan 18 14:30:22 2004 28: TAP-Win32 MTU=1500
Sun Jan 18 14:30:22 2004 29: Notified TAP-Win32 driver to set a dynamic IP/netmask of 192.168.200.6/255.255.255.252 on interface {A93FB2A2-9C8A-4040-9B4A-461BEB112723}
Sun Jan 18 14:30:22 2004 30: Successful ARP Flush on interface [2] {A93FB2A2-9C8A-4040-9B4A-461BEB112723}
Sun Jan 18 14:30:22 2004 31: office.up.bat OpenVPN 1500 1577 192.168.200.6 255.255.255.252 init
C:\Program Files\OpenVPN\config>route add 192.168.100.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.101.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.102.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.103.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
C:\Program Files\OpenVPN\config>route add 192.168.104.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.
---SNIP---
Now, if I remove the office.up.bat in the configuration and wait for the VPN to be established, and run the office.up.bat manually, everything works great. Guessing it's to do with the .252 subnet mask?
Doug
Quoted 2 lines
Quoted 5 lines · Doug Lytle
James,
Just put 1.6 beta into place. I will no longer set routes via office.up.bat on Windows 2000. I currently have a up delay of 5 seconds. This is what I get in my logs:
I think the problem is that the "Notified TAP-Win32 driver to set a dynamic IP/netmask of" line signals the start of the process to set the IP/netmask by responding to DHCP messages, but it takes few seconds for the process to complete. Therefore, a delay must exist between this step and the running of the up script.
So try "route-delay 10" then add the routes either with the "route" option or a "route-up" script.
James
Quoted 68 lines
---SNIP---
Sun Jan 18 14:30:17 2004 20: Local Options hash (VER=V3): '
e6303372' Sun Jan 18 14:30:17 2004 21: Expected Remote Options hash (VER=V3):
'e6303372'
Sun Jan 18 14:30:17 2004 22: UDPv4 link local (bound): [undef]:5001 Sun Jan 18 14:30:17 2004 23: UDPv4 link remote: 12.27.xxx.xxx:5001 Sun Jan 18 14:30:20 2004 24: Peer Connection Initiated with 12.27.xxx.xxx:5001
Sun Jan 18 14:30:22 2004 25: Attempting to lock Win32 semaphore 'openvpn_netcmd' prior to net shell command (timeout = 600 sec) Sun Jan 18 14:30:22 2004 26: TAP-WIN32 device [OpenVPN] opened:
\\.\{A93FB2A2-9C8A-4040-9B4A-461BEB112723}.tap
Sun Jan 18 14:30:22 2004 27: TAP-Win32 Driver Version 4.18 Sun Jan 18 14:30:22 2004 28: TAP-Win32 MTU=1500
Sun Jan 18 14:30:22 2004 29: Notified TAP-Win32 driver to set a dynamic IP/netmask of 192.168.200.6/255.255.255.252 on interface {A93FB2A2-9C8A-4040-9B4A-461BEB112723}
Sun Jan 18 14:30:22 2004 30: Successful ARP Flush on interface [2] {A93FB2A2-9C8A-4040-9B4A-461BEB112723}
Sun Jan 18 14:30:22 2004 31: office.up.bat OpenVPN 1500 1577 192.168.200.6 255.255.255.252 initC:\Program Files\OpenVPN\config>route add 192.168.100.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.C:\Program Files\OpenVPN\config>route add 192.168.101.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.C:\Program Files\OpenVPN\config>route add 192.168.102.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.C:\Program Files\OpenVPN\config>route add 192.168.103.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.C:\Program Files\OpenVPN\config>route add 192.168.104.0 mask 255.255.255.0 192.168.200.5
The route addition failed: Either the interface index is wrong or the gateway does not lie on the same network as the interface. Check the IP Address Table for the machine.---SNIP---
Now, if I remove the office.up.bat in the configuration and wait for the VPN to be established, and run the office.up.bat manually, everything works great. Guessing it's to do with the .252 subnet mask?
Doug
Quoted 2 lines