locked
csatlakozás open vpn-hez RRS feed

  • Question

  • Bocs, ha nem teljesen idev aló:
    Egy xp-n kifogástalanul működő open vpn kliens konfigot átraktam a teszt 2k3 szerveremre.
    Azt a hibajelenséget tapasztalom, hogy felépül a vpn, de a route beállítások nem hajtódnak végre, mert a TAP adapter nem kapja meg az ip címet.
    A config fájlba beírt up-delay 2, route-delay 4, route-method exe, és ezek (talán) értelmes  kombinációi nem segítettek.
    Ha közben egy parancssorban kiadok egy ipconfig -renew -t, azonnal kap ip-t és létrejönnek a routeok.
    Minden általam használt ovpn szerverrel ez van.
    (Nagyon meg kéne oldanom, mert igy nem tudom szolgáltatásként futtatni az ovpn kliensemet.)
    Köszönettel: Lajos
    Saturday, August 18, 2007 12:00 PM

Answers

  • Akkor is ezt a hibát írja ki, ha nem fut a dhcp szerver. Big Smile Na, de mivel mindenre ezt írja ki, találtam pár tippet guglival.

     

    Code Snippet
    Basically what appears to be occurring is that the Windows DHCP client is not
    initiating a DHCP handshake with the TAP-Win32 adapter within 30 seconds. 
    The TAP-Win32 adapter masquerades as a DHCP server.  This is the mechanism
    OpenVPN uses to programatically assign TCP/IP properties to the adapter.

    A few things to try:

    * Add "show-net-up" flag for more debugging info in the log file.

    * Add "route-delay 0 120" -- this will wait 120 seconds instead of 30 seconds
    for the DHCP negotiation to complete.

    * Try adding "dhcp-renew" flag -- this will explicitly tell the client to
    begin the DHCP handshake.

    * Install the debug version of the TAP-Win32 driver from
    http://openvpn.sourceforge.net/beta/tapwin32-debug.zip" rel=nofollow>http://openvpn.sourceforge.net/beta/tapwin32-debug.zip and run OpenVPN
    at "verb 6" or higher.  See the readme file for more info on producing
    extended debug information.  This will help us to determine if there is a
    problem with the DHCP handshake.

    * Go to the TAP-Win32 adapter advanced properties and set Media Status to
    "Always Connected".  Then add "dhcp-renew" and "dhcp-release" flags to
    config.

     

     


    Sunday, August 19, 2007 10:59 AM

All replies

  • Ha a log fájlt megnéznéd az sokat segítene. Véletlenül nem ez a hibaüzenet a logban?

     

    "NOTE: FlushIpNetTable failed on interface"

    Saturday, August 18, 2007 1:37 PM
  • Ilyet nem látok.
    Ez az idevágó log-részlet:

    Sat Aug 18 13:14:20 2007 TAP-Win32 Driver Version 8.4
    Sat Aug 18 13:14:20 2007 TAP-Win32 MTU=1500
    Sat Aug 18 13:14:20 2007 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.67.2.26/255.255.255.252 on interface {1A2BA3B7-6427-481B-A601-EC89BFB6E12B} [DHCP-serv: 10.67.2.25, lease-time: 31536000]
    Sat Aug 18 13:14:20 2007 Successful ARP Flush on interface [5] {1A2BA3B7-6427-481B-A601-EC89BFB6E12B}
    Sat Aug 18 13:14:20 2007 TEST ROUTES: 0/0 succeeded len=9 ret=0 a=0 u/d=down
    Sat Aug 18 13:14:20 2007 Route: Waiting for TUN/TAP interface to come up...

    aztán ez ismétlődik, gyakorlatilag végtelenül:

    Sat Aug 18 13:14:21 2007 TEST ROUTES: 0/0 succeeded len=9 ret=0 a=0 u/d=down
    Sat Aug 18 13:14:21 2007 Route: Waiting for TUN/TAP interface to come up...
    Sat Aug 18 13:14:22 2007 TEST ROUTES: 0/0 succeeded len=9 ret=0 a=0 u/d=down
    Sat Aug 18 13:14:22 2007 Route: Waiting for TUN/TAP interface to come up...
    .
    .
    .
    Sat Aug 18 13:14:42 2007 TEST ROUTES: 0/0 succeeded len=9 ret=0 a=0 u/d=down
    Sat Aug 18 13:14:42 2007 Route: Waiting for TUN/TAP interface to come up...

    Itt adtam ki a release-t, és innen már jó.:

    Sat Aug 18 13:14:43 2007 TEST ROUTES: 9/9 succeeded len=9 ret=1 a=0 u/d=up
    Sat Aug 18 13:14:43 2007 route ADD 10.0.0.0 MASK 255.0.0.0 10.67.2.25
    Sat Aug 18 13:14:43 2007 Route addition via IPAPI succeeded
    Saturday, August 18, 2007 2:13 PM
  • Ami még érdekes lehet:
    1.: XP-n szétkapcsolt állapotban nincs ip címe az ovpn adapternek. 2k3-on kapcsolat bontás után megmarad az előzőleg kiosztott ip, és az ujrakapcsolódás már pikk-pakk megy, nem kell trükközni.
    2.: Néha (10-ből 1x) kapcsolódik release nélkül is.
    Saturday, August 18, 2007 2:21 PM
  • Mi történik ha az openvpn-nek azt mondod, hogy kelljen neki a dhcp szolgáltatás?

     

    HKLM\SYSTEM\CurrentControlSet\Services\OpenVPNService\DependOnService

    Ide írd be a dhcp-t a TAPxxxx alá.
    Saturday, August 18, 2007 2:40 PM
  • Megprobáltam, de nincs változás.
    Maga a TAP adapter elindul, már a gép indításakor. Erre lenne hatásal a fenti reg módosítás.

    Sunday, August 19, 2007 6:55 AM
  • Akkor is ezt a hibát írja ki, ha nem fut a dhcp szerver. Big Smile Na, de mivel mindenre ezt írja ki, találtam pár tippet guglival.

     

    Code Snippet
    Basically what appears to be occurring is that the Windows DHCP client is not
    initiating a DHCP handshake with the TAP-Win32 adapter within 30 seconds. 
    The TAP-Win32 adapter masquerades as a DHCP server.  This is the mechanism
    OpenVPN uses to programatically assign TCP/IP properties to the adapter.

    A few things to try:

    * Add "show-net-up" flag for more debugging info in the log file.

    * Add "route-delay 0 120" -- this will wait 120 seconds instead of 30 seconds
    for the DHCP negotiation to complete.

    * Try adding "dhcp-renew" flag -- this will explicitly tell the client to
    begin the DHCP handshake.

    * Install the debug version of the TAP-Win32 driver from
    http://openvpn.sourceforge.net/beta/tapwin32-debug.zip" rel=nofollow>http://openvpn.sourceforge.net/beta/tapwin32-debug.zip and run OpenVPN
    at "verb 6" or higher.  See the readme file for more info on producing
    extended debug information.  This will help us to determine if there is a
    problem with the DHCP handshake.

    * Go to the TAP-Win32 adapter advanced properties and set Media Status to
    "Always Connected".  Then add "dhcp-renew" and "dhcp-release" flags to
    config.

     

     


    Sunday, August 19, 2007 10:59 AM
  • * Try adding "dhcp-renew" flag -- this will explicitly tell the client to
    begin the DHCP handshake.

    Ez megoldotta.
    Gugli a mi barátunk, csak én nem értek eléggé a nyelvén! :-)
    Köszi a segítséget.

    Tuesday, August 21, 2007 7:15 PM
  • Sziasztok!

    openvpn-t próbálok beállitani win 2003-as szerverre.

    Kliens -   OPENVPN - Szerver(2003) - belső LAN

    a szerver openvpn oldali lábát megtudom pingetni, a belső LAN felőli lábát is, de bármely más gépet már nem ami a 2003 mögött van.

    kell állitani valamit?
    de hol ?
    openvpn konfigba, vagy statikus route kell, vagy a 2003utvonalválasztóját kell heggeszteni ?

    valami olyasmit kell beállitanom, hogy a 2003-as szerver routolja a vpn eflől jövő csomagokat a LAN felé.

    (a IPEnableRouting - registry kulcsot 1-re vettem és restartoltam is)

    tudtok segiteni ?
    üdv
    Szabi

    Thursday, August 23, 2007 10:49 PM