|
|
I'm not sure I understand this problem. I tried to reproduce by putting a
route in an --up script, that routes to an address that is part of the
TAP-Win32 adapter subnet, and everything worked fine (running 1.5-beta6).
The reason why it makes sense that this would work correctly is that an IP
address in the TAP-Win32 subnet can be used as a routing target as soon as the
TAP-Win32 device is opened by OpenVPN. A TAP-Win32 adapter is designed to
appear "unplugged" only when it is not open by an OpenVPN process. In your
example below, test.bat is run after the TAP-Win32 adapter is opened, so I
would expect the adapter to appear "plugged in" at the point that the batch
file is executed (Note that a TAP-Win32 adapter and its subnet becomes active
when it is opened by OpenVPN, not when you see a "connection established" or
"peer connection initiated" message).
Now obviously you have the route errors below, so something is not right, but
are you sure that those errors are occuring because the media status of the
TAP-Win32 adapter is offline at the time that your batch file is run? Try
putting an "ipconfig /all" command in your --up batch file to show the media
status of the TAP-Win32 adapter at the moment that the batch file is run.
Also, try putting an
arp -d *
at the beginning of your --up batch file to clear out the MAC cache prior to
establishing routes.
James
Tom Bin <s1curity@xxxxxxxxxxxx> said:
> Dear Dave and R. Latimer,
>
>
> I did try the delay batch file at my "up" script.
> I am not sure if I did anything wrong with it.
>
> According to the order of execution of VPN starting process,
> it always run the batch file before trying to make a TCP connection to the
> server.
>
> However, it won't run the batch file at background.
> So it always wait for the batch file to complete then start to connect TCP
> server
> whether I add a delay or not.
> The following is what I saw in the VPN console screen.
>
>
> Tom
>
> Sat Aug 23 09:41:17 2003 0: OpenVPN 1.5-beta5 Win32-MinGW [SSL] [LZO]
> [MTU-DYNAMIC] built on Aug 14 2003
> Sat Aug 23 09:41:17 2003 1: Static Encrypt: Cipher 'BF-CBC' initialized with
> 128 bit key
> Sat Aug 23 09:41:17 2003 2: Static Encrypt: Using 160 bit message digest
> 'SHA1' for HMAC authentication
> Sat Aug 23 09:41:17 2003 3: Static Decrypt: Cipher 'BF-CBC' initialized with
> 128 bit key
> Sat Aug 23 09:41:17 2003 4: Static Decrypt: Using 160 bit message digest
> 'SHA1' for HMAC authentication
> Sat Aug 23 09:41:17 2003 5: LZO compression initialized
> Sat Aug 23 09:41:17 2003 6: Data Channel MTU parms [ link_mtu=1611
> extra_frame=47 extra_buffer=19 extra_tun=64 ]
> Sat Aug 23 09:41:17 2003 7: TAP-WIN32 device [OpenVPN] opened:
> \\.\{69F775DC-8B5E-47C0-8BE9-414222CAC91A}.tap
> Sat Aug 23 09:41:17 2003 8: test.bat OpenVPN 1500 1611 init
>
> C:\Program Files\OpenVPN\config>ping -n 6 127.0.0.1
>
> Pinging 127.0.0.1 with 32 bytes of data:
>
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
> Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
>
> Ping statistics for 127.0.0.1:
> Packets: Sent = 6, Received = 6, Lost = 0 (0% loss),
> Approximate round trip times in milli-seconds:
> Minimum = 0ms, Maximum = 0ms, Average = 0ms
>
> C:\Program Files\OpenVPN\config>route add 207.46.0.0 mask 255.255.0.0
> 192.168.1.1
> The route addition failed: Either the interface index is wrong or the
> gateway do
> es not lie on the same network as the interface. Check the IP Address Table
> for
> the machine.
>
>
> C:\Program Files\OpenVPN\config>route add 207.68.128.0 mask 255.255.192.0
> 192.168.1.1
> 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.
>
> Sat Aug 23 09:41:23 2003 9: Attempting to establish TCP connection with
> 210.xxx.xxx.xxx:5000
> Sat Aug 23 09:41:23 2003 10: TCP connection established with
> 210.xxx.xxx.xxx:5000
> Sat Aug 23 09:41:23 2003 11: TCPv4_CLIENT link local: [undef]
> Sat Aug 23 09:41:23 2003 12: TCPv4_CLIENT link remote: 210.xxx.xxx.xxx:5000
> Sat Aug 23 09:41:23 2003 13: Peer Connection Initiated with
> 210.xxx.xxx.xxx:5000
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
> at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> Openvpn-users mailing list
> Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/openvpn-users
>
--
____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users
|