Angepinnt How To: OpenVPN

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Das kommt dabei raus:

      Quellcode

      1. Thu Oct 29 16:02:59 2015 OpenVPN 2.1.3 mipsel-oe-linux [SSL] [LZO2] [EPOLL] built on Mar 12 2015
      2. Thu Oct 29 16:02:59 2015 WARNING: Make sure you understand the semantics of --tls-remote before using it (see the man page).
      3. Thu Oct 29 16:02:59 2015 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
      4. Thu Oct 29 16:02:59 2015 LZO compression initialized
      5. Thu Oct 29 16:02:59 2015 Control Channel MTU parms [ L:1570 D:138 EF:38 EB:0 ET:0 EL:0 ]
      6. Thu Oct 29 16:02:59 2015 Socket Buffers: R=[163840->131072] S=[163840->131072]
      7. Thu Oct 29 16:02:59 2015 Data Channel MTU parms [ L:1570 D:1450 EF:70 EB:135 ET:0 EL:0 AF:3/1 ]
      8. Thu Oct 29 16:02:59 2015 Local Options hash (VER=V4): 'fc8ba345'
      9. Thu Oct 29 16:02:59 2015 Expected Remote Options hash (VER=V4): '79a26cd9'
      10. Thu Oct 29 16:02:59 2015 UDPv4 link local: [undef]
      11. Thu Oct 29 16:02:59 2015 UDPv4 link remote: ***.***.***.***:443
      12. Thu Oct 29 16:02:59 2015 TLS: Initial packet from ***.***.***.***:443, sid=c3096d5d c92b9fd4
      13. Thu Oct 29 16:02:59 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
      14. Thu Oct 29 16:02:59 2015 VERIFY OK: depth=1, /C=US/ST=FL/L=Winter_Park/O=IPVanish/OU=IPVanish_VPN/CN=IPVanish_CA/emailAddress=support@ipvanish.com
      15. Thu Oct 29 16:02:59 2015 VERIFY X509NAME OK: /C=US/ST=FL/L=Winter_Park/O=IPVanish/OU=IPVanish_VPN/CN=prg-c01.ipvanish.com/emailAddress=support@ipvanish.com
      16. Thu Oct 29 16:02:59 2015 VERIFY OK: depth=0, /C=US/ST=FL/L=Winter_Park/O=IPVanish/OU=IPVanish_VPN/CN=prg-c01.ipvanish.com/emailAddress=support@ipvanish.com
      17. Thu Oct 29 16:03:00 2015 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
      18. Thu Oct 29 16:03:00 2015 Data Channel Encrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
      19. Thu Oct 29 16:03:00 2015 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
      20. Thu Oct 29 16:03:00 2015 Data Channel Decrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
      21. Thu Oct 29 16:03:00 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
      22. Thu Oct 29 16:03:00 2015 [***.ipvanish.com] Peer Connection Initiated with ***.***.***.***:443
      23. Thu Oct 29 16:03:03 2015 SENT CONTROL [***.ipvanish.com]: 'PUSH_REQUEST' (status=1)
      24. Thu Oct 29 16:03:03 2015 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS ***.***.***.***,dhcp-option DNS ***.***.***.***,rcvbuf 262144,explicit-exit-notify 5,route-gateway ***.***.***.***,topology subnet,ping 20,ping-restart 40,ifconfig ***.***.***.*** 255.255.252.0'
      25. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: timers and/or timeouts modified
      26. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: explicit notify parm(s) modified
      27. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
      28. Thu Oct 29 16:03:03 2015 Socket Buffers: R=[131072->327680] S=[131072->131072]
      29. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: --ifconfig/up options modified
      30. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: route options modified
      31. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: route-related options modified
      32. Thu Oct 29 16:03:03 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
      33. Thu Oct 29 16:03:03 2015 ROUTE default_gateway=***.***.***.***
      34. Thu Oct 29 16:03:03 2015 TUN/TAP device tun1 opened
      35. Thu Oct 29 16:03:03 2015 TUN/TAP TX queue length set to 100
      36. Thu Oct 29 16:03:03 2015 /sbin/ifconfig tun1 ***.***.***.*** netmask 255.255.252.0 mtu 1500 broadcast ***.***.***.***
      37. Thu Oct 29 16:03:03 2015 /sbin/route add -net ***.***.***.*** netmask 255.255.255.255 gw ***.***.***.***
      38. Thu Oct 29 16:03:03 2015 ERROR: Linux route add command failed: external program exited with error status: 1
      39. Thu Oct 29 16:03:03 2015 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw ***.***.***.***
      40. Thu Oct 29 16:03:03 2015 ERROR: Linux route add command failed: external program exited with error status: 1
      41. Thu Oct 29 16:03:03 2015 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw ***.***.***.***
      42. Thu Oct 29 16:03:03 2015 ERROR: Linux route add command failed: external program exited with error status: 1
      43. Thu Oct 29 16:03:03 2015 Initialization Sequence Completed
      44. Thu Oct 29 16:03:49 2015 event_wait : Interrupted system call (code=4)
      45. Thu Oct 29 16:03:49 2015 TCP/UDP: Closing socket
      46. Thu Oct 29 16:03:49 2015 /sbin/route del -net ***.***.***.*** netmask 255.255.255.255
      47. Thu Oct 29 16:03:49 2015 ERROR: Linux route delete command failed: external program exited with error status: 1
      48. Thu Oct 29 16:03:49 2015 /sbin/route del -net 0.0.0.0 netmask 128.0.0.0
      49. Thu Oct 29 16:03:49 2015 ERROR: Linux route delete command failed: external program exited with error status: 1
      50. Thu Oct 29 16:03:49 2015 /sbin/route del -net 128.0.0.0 netmask 128.0.0.0
      51. Thu Oct 29 16:03:49 2015 ERROR: Linux route delete command failed: external program exited with error status: 1
      52. Thu Oct 29 16:03:49 2015 Closing TUN/TAP interface
      53. Thu Oct 29 16:03:49 2015 /sbin/ifconfig tun1 0.0.0.0
      54. Thu Oct 29 16:03:49 2015 SIGHUP[hard,] received, process restarting
      55. Thu Oct 29 16:03:49 2015 OpenVPN 2.1.3 mipsel-oe-linux [SSL] [LZO2] [EPOLL] built on Mar 12 2015
      56. Thu Oct 29 16:03:49 2015 Restart pause, 2 second(s)
      57. Thu Oct 29 16:03:51 2015 WARNING: Make sure you understand the semantics of --tls-remote before using it (see the man page).
      58. Thu Oct 29 16:03:51 2015 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
      59. Thu Oct 29 16:03:51 2015 LZO compression initialized
      60. Thu Oct 29 16:03:51 2015 Control Channel MTU parms [ L:1570 D:138 EF:38 EB:0 ET:0 EL:0 ]
      61. Thu Oct 29 16:03:51 2015 Socket Buffers: R=[163840->131072] S=[163840->131072]
      62. Thu Oct 29 16:03:51 2015 Data Channel MTU parms [ L:1570 D:1450 EF:70 EB:135 ET:0 EL:0 AF:3/1 ]
      63. Thu Oct 29 16:03:51 2015 Local Options hash (VER=V4): 'fc8ba345'
      64. Thu Oct 29 16:03:51 2015 Expected Remote Options hash (VER=V4): '79a26cd9'
      65. Thu Oct 29 16:03:51 2015 UDPv4 link local: [undef]
      66. Thu Oct 29 16:03:51 2015 UDPv4 link remote: ***.***.***.***:443
      67. Thu Oct 29 16:03:51 2015 TLS: Initial packet from ***.***.***.***:443, sid=7f49400f b5d4d7ea
      68. Thu Oct 29 16:03:51 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
      69. Thu Oct 29 16:03:51 2015 VERIFY OK: depth=1, /C=US/ST=FL/L=Winter_Park/O=IPVanish/OU=IPVanish_VPN/CN=IPVanish_CA/emailAddress=support@ipvanish.com
      70. Thu Oct 29 16:03:51 2015 VERIFY X509NAME OK: /C=US/ST=FL/L=Winter_Park/O=IPVanish/OU=IPVanish_VPN/CN=prg-c01.ipvanish.com/emailAddress=support@ipvanish.com
      71. Thu Oct 29 16:03:51 2015 VERIFY OK: depth=0, /C=US/ST=FL/L=Winter_Park/O=IPVanish/OU=IPVanish_VPN/CN=prg-c01.ipvanish.com/emailAddress=support@ipvanish.com
      72. Thu Oct 29 16:03:53 2015 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
      73. Thu Oct 29 16:03:53 2015 Data Channel Encrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
      74. Thu Oct 29 16:03:53 2015 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
      75. Thu Oct 29 16:03:53 2015 Data Channel Decrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
      76. Thu Oct 29 16:03:53 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
      77. Thu Oct 29 16:03:53 2015 [***.ipvanish.com] Peer Connection Initiated with ***.***.***.***:443
      78. Thu Oct 29 16:03:55 2015 SENT CONTROL [***.ipvanish.com]: 'PUSH_REQUEST' (status=1)
      79. Thu Oct 29 16:03:55 2015 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS ***.***.***.***,dhcp-option DNS ***.***.***.***,rcvbuf 262144,explicit-exit-notify 5,route-gateway ***.***.***.***,topology subnet,ping 20,ping-restart 40,ifconfig ***.***.***.*** 255.255.252.0'
      80. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: timers and/or timeouts modified
      81. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: explicit notify parm(s) modified
      82. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
      83. Thu Oct 29 16:03:55 2015 Socket Buffers: R=[131072->327680] S=[131072->131072]
      84. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: --ifconfig/up options modified
      85. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: route options modified
      86. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: route-related options modified
      87. Thu Oct 29 16:03:55 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
      88. Thu Oct 29 16:03:55 2015 ROUTE default_gateway=***.***.***.***
      89. Thu Oct 29 16:03:55 2015 TUN/TAP device tun0 opened
      90. Thu Oct 29 16:03:55 2015 TUN/TAP TX queue length set to 100
      91. Thu Oct 29 16:03:55 2015 /sbin/ifconfig tun0 ***.***.***.*** netmask 255.255.252.0 mtu 1500 broadcast ***.***.***.***
      92. Thu Oct 29 16:03:55 2015 /sbin/route add -net ***.***.***.*** netmask 255.255.255.255 gw ***.***.***.***
      93. Thu Oct 29 16:03:55 2015 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw ***.***.***.***
      94. Thu Oct 29 16:03:55 2015 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw ***.***.***.***
      95. Thu Oct 29 16:03:55 2015 Initialization Sequence Completed
      Alles anzeigen


      Meine openvpnvti.conf sieht so aus:

      Quellcode

      1. client
      2. dev tun
      3. proto udp
      4. remote ***.ipvanish.com 443
      5. resolv-retry infinite
      6. nobind
      7. persist-key
      8. persist-tun
      9. persist-remote-ip
      10. ca /etc/openvpn/ca.ipvanish.com.crt
      11. tls-remote ***.ipvanish.com
      12. auth-user-pass /etc/openvpn/auth.txt
      13. comp-lzo
      14. verb 3
      15. auth SHA256
      16. cipher AES-256-CBC
      17. keysize 256
      18. tls-cipher DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA
      Alles anzeigen
    • Per Hand, über den entsprechenen Menüentrag zum Beispiel. Meines Wissens wird openvpn automatisch beim booten gestartet.

      Oder du hast zufällig zwei Konfigurationsdateien in /etc/openvpn liegen? Evtl. eine Sicherungskopie o.ä.? Dann werden beide gestartet.
    • Nein, manuell habe ich da nichts gestartet. Da ich autostart für openvpn nicht aktiviert habe, wird beim booten auch kein Start ausgeführt.

      In /etc/opemvpn liegt nur eine openvpnvti.config, die auth- und die ca-datei.
    • Ja, sicher - Box wurde mehrfach neu gestartet...

      Über den Menu-Eintrag openvpn zu beenden, komme ich nicht weiter. Wenn ich aber, bei laufendem openvpn, den Menueintrag auswähle, Autostart zu beenden, wird auch openvpn beendet...
    • Hallo,

      Ich habe im Forum jetzt ein bisschen gestoebert, da ich auf der Suche bin nach einem Tutorial zur Einrichtung einer VPN Verbindung auf meine VU+ Solo2 Box.
      Leider habe ich diesbezueglich nichts gutes gefunden, das ich mir zutrauen wuerde umzusetzen.

      Mein Plan waere meine VU+, die hinter einem Huawei B593 Router steht, aus dem Internet ueber VPN erreichbar zu machen. Vorallem angriffssicher erreichbar.
      Derzeit arbeite ich nur mit einer Port Freigabe und Forwarding am B593 Router.

      gibt es dazu Erfahrungen bei Euch?

      Vielen Dank!

      Liebe Gruesse, Robert
    • Gute Tutorials gibts haufenweise, z.B. hier: wiki.ubuntuusers.de/openvpn

      Das Problem dabei: fast alle verwenden die easy-rsa Tools für die Schlüsselerzeugung, das sind ein paar Skripte, die leider nicht beim VTI Image dabei sind.

      Entweder per Hand nachinstallieren (siehe hier: Klick
      oder die Schlüssel auf einem Linux/Win-Rechner erzeugen und dann umkopieren.

      Es gibt keine einfacheren Anleitung, dazu ist openvpn zu umfangreich.
    • zip in /home/root/ entpacken
      /home/root/openvpn-scripts/certs.sh ausführbar machen

      starten mit i.e.
      /home/root/certs.sh noobnet vpn.noobnet.de 8888 1024

      param1: name der certs
      param2: deine adresse von aussen
      param3: port
      param4: die zusatzzahl würde ich auf 1024 lassen.

      die zertifkate werden alle erzeugt und der server auf der vu automatisch gestartet. in deiner moviefreigabe hast du dann einen ordner mit dem namen openvpn. da liegen die client-certs drinne. die müssen auf den client. und am router einfach ne portfreigabe auf den vpn-port.
      Dateien
    • Servus Pillepallus!

      Vielen Dank fuer die Anleitung!

      Ich hab noch ein paar kleine Fragen dazu, bevor ich damit anfange.

      - Die Skripte mache ich mit chmod 777 ausfuehrbar - oder reichen weniger Rechte als alle auf 7 zu setzen?

      - Was bedeutet "starten mit i.e." ?


      Zu den Parametern:


      param1: wird denke ich gleich bleiben, wie in deinem Beispiel, wenn ich das certs.sh nicht umbenenne und auf einen anderen Ordner lege, oder?


      param2: Ich habe einen dynamischen DNS Dienst konfiguriert, mit dem ich derzeit auf meine Box zugreife. (afraid.org) Kann ich diese Adresse nehmen?


      param3: Kann ich auf Port 8888 bleiben, oder wodurch bestimmt sich dieser?


      param4: Wofuer stehen die 1024?


      Vielen Dank!


      Liebe Gruesse, Robert
    • ausführbar machen mit chmod +x /home/root/openvpn-scripts/certs.sh.... 777 erfüllt den zweck aber auch. i.e. steht für z.b. (in example)

      1024 ist die schlüssellänge

      deine startparameter wären:
      bertl %adresse%.afraid.org %port% 1024

      %adresse% ist deine genaue adresse in dem laden
      %port% den wählst du selbst und sagst uns nix

      edith:
      habs mal in ein ipk gepackt. das ist einfacher.
      "menu --> vti --> vti panel --> vti systemwerkzeuge --> befehl ausführen" --> dort ein script names "/home/root/openvpn-scripts/certs.sh"
      die parameter kannst du dort editieren und dann ausführen.
      Dateien

      Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von pillepallus ()

    • pillepallus schrieb:

      zip in /home/root/ entpacken
      /home/root/openvpn-scripts/certs.sh ausführbar machen

      starten mit i.e.
      /home/root/certs.sh noobnet vpn.noobnet.de 8888 1024

      param1: name der certs
      param2: deine adresse von aussen
      param3: port
      param4: die zusatzzahl würde ich auf 1024 lassen.

      die zertifkate werden alle erzeugt und der server auf der vu automatisch gestartet. in deiner moviefreigabe hast du dann einen ordner mit dem namen openvpn. da liegen die client-certs drinne. die müssen auf den client. und am router einfach ne portfreigabe auf den vpn-port.
      hallo pillepallus,

      eine frage noch zum server:

      startet sich dieser automatisch, wenn die box neugestartet wird, oder muss man das noch irgendwo konfigurieren?

      Liebe Gruesse, Bertl
    • Hallo,

      noch ein paar Fragen zu den Clients mit denen ich mich auf meinen VPN Server verbinden will.

      Welche Software (freeware) ausser openvpn (https://openvpn.net/) koennt ihr mir fuer den PC (Win7) empfehlen?
      Openvpn nutze ich bereits fuer die Firma und daher moechte ich das Programm nicht zusaetzlich privaten Schluesselfiles konfigurieren - da ist zoof mit unserer internen EDV vorprogrammiert.

      Welche VPN clients koennnt Ihr mir fuer Android und Iphone handys empfehlen?

      Vielen Dank!

      Liebe Gruesse, Bertl

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von vu+solo2_Bertl ()

    • ja sollte automatisch starten.
      hmm probier halt mal openvpn portable, vlt klappts ja... brauchst halt noch ein tap device. für iphone nehme ich den normalen openvpn client ausm store. die zertifikate müssen über itunes eingespielt werden und da in den speicher der app. starten kann man es dann auch in den einstellungen.
    • Hallo nochmals!

      Danke fuer die SW Tipps - werd die dann mal testen.
      Was ist denn ein tap device? Noch nie davon gehoert!

      Noch eine Frage,

      Wenn ich dann das openvpn eingerichtet habe, dann habe ich ja eine abhoersichere Leitung zwischen verbundenen Clients zur Box.
      Aber was ist in die andere Richtung, wenn ich von der Box aus ins Internet gehe, aber nicht auf die verbundenen Clients, sondern andere Ziele.
      Dann ist die Verbindung nicht sicher, oder?
      Gibt es dafuer auch Loesungen?

      Vielen Dank!

      Liebe Gruesse, Robert