{"id":2276,"date":"2011-08-31T06:22:36","date_gmt":"2011-08-31T05:22:36","guid":{"rendered":"http:\/\/www.bdjl.de\/localhost\/?p=2276"},"modified":"2017-03-01T12:03:53","modified_gmt":"2017-03-01T11:03:53","slug":"openvpn-p12-konvertierung","status":"publish","type":"post","link":"https:\/\/www.bdjl.de\/localhost\/?p=2276","title":{"rendered":"OpenVPN P12 Konvertierung"},"content":{"rendered":"<p>Um mit dem LFB Verbindung \u00fcber FTP oder SSH aufnehmen zu k\u00f6nnen, ben\u00f6tige ich einen OpenVPN Tunnel. Mein Admin schickt mir hierzu regelm\u00e4\u00dfig eine P12 Datei (im Folgenden: domain-cert.p12) zu, die ich erst einmal zerlegen muss, damit mein Verbindungsskript reibungslos funktioniert. Da dies nur alle Monate passiert, vergesse ich in der Zwischenzeit leider immer wieder, wie ich vorgehen muss &#8211; deshalb mal f\u00fcr mich selbst als Ged\u00e4chtnisst\u00fctze dieses Memo.<\/p>\n<p>Es klappt mit den folgenden drei Schritten:<\/p>\n<blockquote><p>openssl pkcs12 -in domain-cert.p12 -out domain-ca.pem<\/p>\n<p>openssl pkcs12 -in domain-cert.p12 -out domain-cert.pem -clcerts -nokeys<\/p>\n<p>openssl pkcs12 -in domain-cert.p12 -out domain-key.pem -nocerts<\/p><\/blockquote>\n<p>Ohne Vergabe eines Passworts will die Konvertierung bei mir nicht funktionieren, was aber auch OK ist.<\/p>\n<p>Ein Startskript auf dem Desktop<\/p>\n<blockquote><p>#!\/bin\/bash<br \/>\ncd \/home\/dirk\/openvpn ; sudo openvpn domain.ovpn<\/p><\/blockquote>\n<p>l\u00e4dt mir dann die OpenVPN Verbindung, die in der Datei <em>domain.ovpn<\/em> definiert ist:<\/p>\n<blockquote><p>client<br \/>\nproto udp<br \/>\nremote domain.topleveldomain<br \/>\nns-cert-type server<br \/>\ndev tun<br \/>\nca Interne-Domain-CA-cacert.pem<br \/>\ncert domain-cert.pem<br \/>\nkey domain-key.pem<\/p>\n<p># Windows needs the TAP-Win32 adapter name<br \/>\n# from the Network Connections panel<br \/>\n# if you have more than one.\u00a0 On XP SP2,<br \/>\n# you may need to disable the firewall<br \/>\n# for the TAP adapter.<br \/>\n;dev-node MyTap<\/p>\n<p># Most clients don&#8217;t need to bind to<br \/>\n# a specific local port number.<br \/>\nnobind<\/p>\n<p># Try to preserve some state across restarts.<br \/>\npersist-key<br \/>\npersist-tun<\/p>\n<p># If a tls-auth key is used on the server<br \/>\n# then every client must also have the key.<br \/>\ntls-auth tls-auth-domain.key 1<\/p>\n<p># Select a cryptographic cipher.<br \/>\n# If the cipher option is used on the server<br \/>\n# then you must also specify it here.<br \/>\n;cipher x<\/p>\n<p># Enable compression on the VPN link.<br \/>\n# Don&#8217;t enable this unless it is also<br \/>\n# enabled in the server config file.<br \/>\ncomp-lzo<\/p>\n<p># Set log file verbosity.<br \/>\nverb 3<\/p>\n<p># Silence repeating messages<br \/>\n;mute 20<\/p><\/blockquote>\n<p>Abgesehen von den hier genannten Skripten und Prozessen liegen im Ordner ~\/openvpn noch die Interne-Domain-CA-cacert.pem und der tls-auth-domain.key zur Domain, die im Skript oben referenziert sind.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Um mit dem LFB Verbindung \u00fcber FTP oder SSH aufnehmen zu k\u00f6nnen, ben\u00f6tige ich einen OpenVPN Tunnel. Mein Admin schickt mir hierzu regelm\u00e4\u00dfig eine P12 Datei (im Folgenden: domain-cert.p12) zu, die ich erst einmal zerlegen muss, damit mein Verbindungsskript reibungslos funktioniert. Da dies nur alle Monate passiert, vergesse ich in der Zwischenzeit leider immer wieder, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,5],"tags":[205,206],"class_list":["post-2276","post","type-post","status-publish","format-standard","hentry","category-lfb","category-linux","tag-openvpn","tag-p12"],"_links":{"self":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/2276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2276"}],"version-history":[{"count":7,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/2276\/revisions"}],"predecessor-version":[{"id":4953,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/2276\/revisions\/4953"}],"wp:attachment":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}