<!doctypehtml><html dir=ltr lang=en-gb><meta charset=utf-8><meta content=IE=edge http-equiv=X-UA-Compatible><meta content=width=device-width,initial-scale=1 name=viewport><title>
   TLS handshake failed - OpenVPN Support Forum
  </title><link title="Feed - OpenVPN Support Forum"href=/app.php/feed?sid=b790d3387d657fba143349c94495aedc rel=alternate type=application/atom+xml><link title="Feed - All forums"href=/app.php/feed/forums?sid=b790d3387d657fba143349c94495aedc rel=alternate type=application/atom+xml><link title="Feed - Forum - Server Administration"href=/app.php/feed/forum/4?sid=b790d3387d657fba143349c94495aedc rel=alternate type=application/atom+xml><link title="Feed - Topic - TLS handshake failed"href=/app.php/feed/topic/19553?sid=b790d3387d657fba143349c94495aedc rel=alternate type=application/atom+xml><link href=https://forums.openvpn.net/viewtopic.php?t=19553 rel=canonical><link href=./assets/css/font-awesome.min.css?assets_version=52 rel=stylesheet><link href=./styles/openvpn/theme/stylesheet.css?assets_version=52 rel=stylesheet><link href=./styles/openvpn/theme/en/stylesheet.css?assets_version=52 rel=stylesheet><body class="nojs notouch section-viewtopic ltr"id=phpbb><div class=wrap id=wrap><a accesskey=t class=top-anchor id=top> </a><div id=page-header><div class=headerbar role=banner><div class=inner><div class=site-description id=site-description><a class=logo href=https://openvpn.net/index.php/open-source.html id=logo title=Home> <img src=./styles/openvpn/theme/images/ovpnlogo.png> </a><h1>OpenVPN Support Forum</h1><p>Community Support Forum<p class=skiplink><a href=#start_here> Skip to content </a></div></div></div><div class=navbar role=navigation><div class=inner><ul class="nav-main linklist"id=nav-main role=menubar><li class="quick-links dropdown-container responsive-menu hidden"data-skip-responsive=true id=quick-links><a class=dropdown-trigger href=#> <i class="icon fa-bars fa-fw"aria-hidden=true> </i> <span> Quick links </span> </a> <div class=dropdown><div class=pointer><div class=pointer-inner></div></div><ul class=dropdown-contents role=menu><li class=separator></ul></div><li data-skip-responsive=true><a title="Frequently Asked Questions"href=/app.php/help/faq?sid=b790d3387d657fba143349c94495aedc rel=help role=menuitem> <i class="icon fa-question-circle fa-fw"aria-hidden=true> </i> <span> FAQ </span> </a><li class=rightside data-skip-responsive=true><a accesskey=x href=./ucp.php?mode=login&sid=b790d3387d657fba143349c94495aedc role=menuitem title=Login> <i class="icon fa-power-off fa-fw"aria-hidden=true> </i> <span> Login </span> </a><li class=rightside data-skip-responsive=true><a accesskey=R href=https://community.openvpn.net/register role=menuitem title=Register> <i class="icon fa-coffee fa-fw"aria-hidden=true> </i> <span> Register </span> </a></ul><ul class="nav-breadcrumbs linklist navlinks"id=nav-breadcrumbs role=menubar><li class=breadcrumbs><span class=crumb itemscope itemtype=http://data-vocabulary.org/Breadcrumb> <a data-navbar-reference=home href=https://openvpn.net/index.php/open-source.html itemprop=url> <i class="icon fa-home fa-fw"aria-hidden=true> </i> <span itemprop=title> Home </span> </a> </span> <span class=crumb itemscope itemtype=http://data-vocabulary.org/Breadcrumb> <a accesskey=h data-navbar-reference=index href=./index.php?sid=b790d3387d657fba143349c94495aedc itemprop=url> <span itemprop=title> Board index </span> </a> </span> <span class=crumb data-forum-id=35 itemscope itemtype=http://data-vocabulary.org/Breadcrumb> <a href=./viewforum.php?f=35&sid=b790d3387d657fba143349c94495aedc itemprop=url> <span itemprop=title> Community Project </span> </a> </span> <span class=crumb data-forum-id=4 itemscope itemtype=http://data-vocabulary.org/Breadcrumb> <a href=./viewforum.php?f=4&sid=b790d3387d657fba143349c94495aedc itemprop=url> <span itemprop=title> Server Administration </span> </a> </span></ul></div></div></div><a class=anchor id=start_here> </a><div class=page-body id=page-body role=main><h2 class=topic-title><a href=./viewtopic.php?f=4&t=19553&sid=b790d3387d657fba143349c94495aedc> TLS handshake failed </a></h2><div style="display: none !important;">This forum is for admins who are looking to build or expand their OpenVPN setup. <br></div><div class=rules><div class=inner><strong> Forum rules </strong><br> Please use the [oconf] BB tag for openvpn Configurations. See <a class=postlink href=https://forums.openvpn.net/viewtopic.php?f=30&t=21589> viewtopic.php?f=30&t=21589 </a> for an example.</div></div><div class="action-bar bar-top"><a title="Post a reply"class=button href=./posting.php?mode=reply&f=4&t=19553&sid=b790d3387d657fba143349c94495aedc> <span> Post Reply </span> <i class="icon fa-reply fa-fw"aria-hidden=true> </i> </a><div class="dropdown-container dropdown-button-control topic-tools"><span class="button button-secondary dropdown-trigger dropdown-select"title="Topic tools"> <i class="icon fa-wrench fa-fw"aria-hidden=true> </i> <span class=caret> <i class="icon fa-sort-down fa-fw"aria-hidden=true> </i> </span> </span><div class=dropdown><div class=pointer><div class=pointer-inner></div></div><ul class=dropdown-contents><li><a title="Print view"accesskey=p href=./viewtopic.php?f=4&t=19553&sid=b790d3387d657fba143349c94495aedc&view=print> <i class="icon fa-print fa-fw"aria-hidden=true> </i> <span> Print view </span> </a></ul></div></div><div class=pagination>12 posts • Page <strong> 1 </strong> of <strong> 1 </strong></div></div><div class="post has-profile bg2"id=p54313><div class=inner><dl class=postprofile id=profile54313><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54313><h3 class=first><a href=#p54313> TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54313&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54313&sid=b790d3387d657fba143349c94495aedc#p54313 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Mon Aug 24, 2015 4:04 pm<div class=content>Hi everyone, <br><br> I'm getting TLS errors in windows when I run the configuration on Linux it works fine so unsure what's occurring! <br><br> The error I'm getting: <br><br> Mon Aug 24 16:48:35 2015 VERIFY OK: <br> Mon Aug 24 16:48:35 2015 VERIFY OK: nsCertType=SERVER <br> Mon Aug 24 16:48:35 2015 TLS_ERROR: BIO read tls_read_plaintext error: error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small <br> Mon Aug 24 16:48:35 2015 TLS Error: TLS object -> incoming plaintext read error <br> Mon Aug 24 16:48:35 2015 TLS Error: TLS handshake failed <br> Mon Aug 24 16:48:35 2015 Fatal TLS error (check_tls_errors_co), restarting <br><br> It connects fine with a Linux OS but when you try to connect via Windows it just keeps repeating the error <br><br> Client config <br><br> client <br> dev tun <br> proto tcp <br> remote (obscured) 1194 <br> resolv-retry infinite <br> nobind <br> persist-key <br> persist-tun <br> ca ca.crt <br> cert tadrim.crt <br> key tadrim.key <br> auth-nocache <br> ns-cert-type server <br> comp-lzo <br> verb 3 <br><br> I have tried putting in the full path for the certs etc and still get the same error</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg1"id=p54330><div class=inner><dl class=postprofile id=profile54330><dt class="has-profile-rank has-avatar"><div class=avatar-container><a class=avatar href=./memberlist.php?mode=viewprofile&u=14271&sid=b790d3387d657fba143349c94495aedc> <img alt="User avatar"class=avatar height=141 src=./download/file.php?avatar=14271_1310036417.jpg width=142> </a></div> <a style="color: #00AA00;"class=username-coloured href=./memberlist.php?mode=viewprofile&u=14271&sid=b790d3387d657fba143349c94495aedc> maikcat </a><dd class=profile-rank>Forum Team<dd class=profile-posts><strong> Posts: </strong> 4202<dd class=profile-joined><strong> Joined: </strong> Wed Jan 12, 2011 9:23 am<dd class="profile-custom-field profile-phpbb_location"><strong> Location: </strong> Athens,Greece<dd class=profile-contact><strong> Contact: </strong> <div class="dropdown-container dropdown-left"><a title="Contact maikcat"class=dropdown-trigger href=#> <i class="icon fa-commenting-o fa-fw icon-lg"aria-hidden=true> </i> <span class=sr-only> Contact maikcat </span> </a><div class=dropdown><div class=pointer><div class=pointer-inner></div></div><div class="dropdown-contents contact-icons"><div><a class=last-cell href=http://www.motec.com.au title=Website> <span class="contact-icon phpbb_website-icon"> Website </span> </a></div></div></div></div></dl><div class=postbody><div id=post_content54330><h3><a href=#p54330> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54330&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54330&sid=b790d3387d657fba143349c94495aedc#p54330 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a style="color: #00AA00;"class=username-coloured href=./memberlist.php?mode=viewprofile&u=14271&sid=b790d3387d657fba143349c94495aedc> maikcat </a> </strong> » </span> Tue Aug 25, 2015 8:26 am<div class=content>are you using the SAME configs/certs/openvpn ver? <br><br> Michael.</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg2"id=p54334><div class=inner><dl class=postprofile id=profile54334><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54334><h3><a href=#p54334> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54334&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54334&sid=b790d3387d657fba143349c94495aedc#p54334 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Tue Aug 25, 2015 8:35 am<div class=content>Hi There, <br><br> Yes I have also generated new configs/certs to see if that is the issue but still get the same error on windows - works okay on Linux, the client is using the latest openvpn ver.</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg1"id=p54337><div class=inner><dl class=postprofile id=profile54337><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54337><h3><a href=#p54337> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54337&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54337&sid=b790d3387d657fba143349c94495aedc#p54337 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Tue Aug 25, 2015 10:21 am<div class=content>Hi Maikcat, <br><br><br> Yes I am using the same configs/certs and openvpn version - apart from changing the directory of the cert files.</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg2"id=p54343><div class=inner><dl class=postprofile id=profile54343><dt class="has-profile-rank has-avatar"><div class=avatar-container><a class=avatar href=./memberlist.php?mode=viewprofile&u=14271&sid=b790d3387d657fba143349c94495aedc> <img alt="User avatar"class=avatar height=141 src=./download/file.php?avatar=14271_1310036417.jpg width=142> </a></div> <a style="color: #00AA00;"class=username-coloured href=./memberlist.php?mode=viewprofile&u=14271&sid=b790d3387d657fba143349c94495aedc> maikcat </a><dd class=profile-rank>Forum Team<dd class=profile-posts><strong> Posts: </strong> 4202<dd class=profile-joined><strong> Joined: </strong> Wed Jan 12, 2011 9:23 am<dd class="profile-custom-field profile-phpbb_location"><strong> Location: </strong> Athens,Greece<dd class=profile-contact><strong> Contact: </strong> <div class="dropdown-container dropdown-left"><a title="Contact maikcat"class=dropdown-trigger href=#> <i class="icon fa-commenting-o fa-fw icon-lg"aria-hidden=true> </i> <span class=sr-only> Contact maikcat </span> </a><div class=dropdown><div class=pointer><div class=pointer-inner></div></div><div class="dropdown-contents contact-icons"><div><a class=last-cell href=http://www.motec.com.au title=Website> <span class="contact-icon phpbb_website-icon"> Website </span> </a></div></div></div></div></dl><div class=postbody><div id=post_content54343><h3><a href=#p54343> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54343&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54343&sid=b790d3387d657fba143349c94495aedc#p54343 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a style="color: #00AA00;"class=username-coloured href=./memberlist.php?mode=viewprofile&u=14271&sid=b790d3387d657fba143349c94495aedc> maikcat </a> </strong> » </span> Tue Aug 25, 2015 11:02 am<div class=content>which windows version do you have? <br> which openvpn version do you use on win? <br><br> please post complete server/client logs. <br><br> Michael.</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg1"id=p54426><div class=inner><dl class=postprofile id=profile54426><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54426><h3><a href=#p54426> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54426&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54426&sid=b790d3387d657fba143349c94495aedc#p54426 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Thu Aug 27, 2015 12:16 pm<div class=content>Hi There, <br><br> the version is: <br> OpenVPN 2.3.7 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Jul 9 2015 <br> Thu Aug 27 12:58:02 2015 library versions: OpenSSL 1.0.1p 9 Jul 2015, LZO 2.08 <br><br> Here is the server log: <br><br> TLS: Initial packet from xxxx <br> VERIFY OK: details <br> VERIFY OK: nsCertType=SERVER <br> VERIFY OK: details <br> TLS_ERROR: BIO read tls_read_plaintext error: error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small <br> TLS Error: TLS object -> incoming plaintext read error <br> TLS Error: TLS handshake failed <br> Fatal TLS error (check_tls_errors_co), restarting <br> SIGUSR1[soft,tls-error] received, process restarting <br> MANAGEMENT: >STATE:1440677050,RECONNECTING,tls-error,, <br> Restart pause, 5 second(s) <br><br> and here is the client log: <br><br> MULTI: multi_create_instance called <br> Re-using SSL/TLS context <br> LZO compression initialized <br> Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ] <br> Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] <br> Local Options hash (VER=V4): 'c0103fa8' <br> Expected Remote Options hash (VER=V4): '69109d17' <br> TCP connection established with (ipaddress):64448 <br> TCPv4_SERVER link local: [undef] <br> TCPv4_SERVER link remote: (ipaddress):64448 <br> (ipaddress):64448 TLS: Initial packet from (ipaddress):64448, sid=b991999d 259a72c5 <br> (ipaddress):64448 Connection reset, restarting [0] <br> (ipaddress):64448 SIGUSR1[soft,connection-reset] received, client-instance restarting <br> TCP/UDP: Closing socket</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg2"id=p54427><div class=inner><dl class=postprofile id=profile54427><dt class="has-profile-rank has-avatar"><div class=avatar-container><a class=avatar href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> <img alt="User avatar"class=avatar height=150 src=./download/file.php?avatar=28659_1407595372.jpg width=150> </a></div> <a class=username href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> Traffic </a><dd class=profile-rank>OpenVPN Protagonist<dd class=profile-posts><strong> Posts: </strong> 4081<dd class=profile-joined><strong> Joined: </strong> Sat Aug 09, 2014 11:24 am</dl><div class=postbody><div id=post_content54427><h3><a href=#p54427> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54427&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54427&sid=b790d3387d657fba143349c94495aedc#p54427 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> Traffic </a> </strong> » </span> Thu Aug 27, 2015 12:19 pm<div class=content><blockquote><div><cite> tadrim wrote: </cite> Here is the server log: <br><br> TLS_ERROR: BIO read tls_read_plaintext error: error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM: <span style=text-decoration:underline> dh key too small </span></div></blockquote> Please see this: <br><a class=postlink href=https://forums.openvpn.net/topic19384-15.html#p53874> topic19384-15.html#p53874 </a></div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg1"id=p54434><div class=inner><dl class=postprofile id=profile54434><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54434><h3><a href=#p54434> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54434&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54434&sid=b790d3387d657fba143349c94495aedc#p54434 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Thu Aug 27, 2015 2:43 pm<div class=content>Hi, <br><br> Thanks for the reply, unfortunately i'm not using one of the routers mentioned, it is also strange how i am able to connect with a Linux machine but not a windows 8</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg2"id=p54441><div class=inner><dl class=postprofile id=profile54441><dt class="has-profile-rank has-avatar"><div class=avatar-container><a class=avatar href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> <img alt="User avatar"class=avatar height=150 src=./download/file.php?avatar=28659_1407595372.jpg width=150> </a></div> <a class=username href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> Traffic </a><dd class=profile-rank>OpenVPN Protagonist<dd class=profile-posts><strong> Posts: </strong> 4081<dd class=profile-joined><strong> Joined: </strong> Sat Aug 09, 2014 11:24 am</dl><div class=postbody><div id=post_content54441><h3><a href=#p54441> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54441&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54441&sid=b790d3387d657fba143349c94495aedc#p54441 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> Traffic </a> </strong> » </span> Thu Aug 27, 2015 8:06 pm<div class=content>I believe you have your logs back to front: <blockquote><div><cite> tadrim wrote: </cite> here is the client log: <br><br> MULTI: <span style=text-decoration:underline> multi_create_instance </span> called</div></blockquote> This indicates it is a <strong class=text-strong> server </strong> log not client log. <br><blockquote><div><cite> tadrim wrote: </cite> the server log: <br><br> TLS: Initial packet from xxxx <br> VERIFY OK: details <br> VERIFY OK: <span style=text-decoration:underline> nsCertType=SERVER </span></div></blockquote> This indicates it is a <strong class=text-strong> client </strong> log not server log. <br><br> What is your server and what version of openvpn do you use on the server ? <br><br> Did you create your own DH file (server: /etc/openvpn/dh.pem) ?</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg1"id=p54544><div class=inner><dl class=postprofile id=profile54544><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54544><h3><a href=#p54544> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54544&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54544&sid=b790d3387d657fba143349c94495aedc#p54544 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Tue Sep 01, 2015 9:26 am<div class=content>Hi There, <br><br> Yes I'm using my own DH file and the server is Centos 5.11, could you guide me on how to establish the openVPN version? <br> Another side question do you have to reload the configuration file after you update it? - tempted to create another dh key. <br><br> The windows client is OpenVPN 2.3.7</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg2"id=p54550><div class=inner><dl class=postprofile id=profile54550><dt class="has-profile-rank has-avatar"><div class=avatar-container><a class=avatar href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> <img alt="User avatar"class=avatar height=150 src=./download/file.php?avatar=28659_1407595372.jpg width=150> </a></div> <a class=username href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> Traffic </a><dd class=profile-rank>OpenVPN Protagonist<dd class=profile-posts><strong> Posts: </strong> 4081<dd class=profile-joined><strong> Joined: </strong> Sat Aug 09, 2014 11:24 am</dl><div class=postbody><div id=post_content54550><h3><a href=#p54550> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54550&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54550&sid=b790d3387d657fba143349c94495aedc#p54550 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=28659&sid=b790d3387d657fba143349c94495aedc> Traffic </a> </strong> » </span> Tue Sep 01, 2015 2:17 pm<div class=content><blockquote><div><cite> tadrim wrote: </cite> server is Centos 5.11, could you guide me on how to establish the openVPN version?</div></blockquote><div class=codebox><p>Code: <a onclick="selectCode(this); return false;"href=#> Select all </a><pre><code>$ openvpn --version</code></pre></div><blockquote><div><cite> tadrim wrote: </cite> do you have to reload the configuration file after you update it?</div></blockquote> Yes .. best to stop & start openvpn completely. <br><blockquote><div><cite> tadrim wrote: </cite> Yes I'm using my own DH file</div></blockquote> Did you edit vars file for correct parameters and source the file ? <br><blockquote><div><cite> tadrim wrote: </cite> tempted to create another dh key.</div></blockquote> If you do I recommend using this EASY-RSA: <br><a class=postlink href=https://github.com/OpenVPN/easy-rsa/releases> https://github.com/OpenVPN/easy-rsa/releases </a></div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="post has-profile bg1"id=p54568><div class=inner><dl class=postprofile id=profile54568><dt class="has-profile-rank no-avatar"><div class=avatar-container></div> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a><dd class=profile-rank>OpenVpn Newbie<dd class=profile-posts><strong> Posts: </strong> 11<dd class=profile-joined><strong> Joined: </strong> Mon Aug 24, 2015 3:57 pm</dl><div class=postbody><div id=post_content54568><h3><a href=#p54568> Re: TLS handshake failed </a></h3><ul class=post-buttons><li><a class="button button-icon-only"title="Reply with quote"href=./posting.php?mode=quote&f=4&p=54568&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-quote-left fa-fw"aria-hidden=true> </i> <span class=sr-only> Quote </span> </a></ul><p class=author><a class=unread href=./viewtopic.php?p=54568&sid=b790d3387d657fba143349c94495aedc#p54568 title=Post> <i class="icon fa-file fa-fw icon-lightgray icon-md"aria-hidden=true> </i> <span class=sr-only> Post </span> </a> <span class=responsive-hide> by <strong> <a class=username href=./memberlist.php?mode=viewprofile&u=33339&sid=b790d3387d657fba143349c94495aedc> tadrim </a> </strong> » </span> Wed Sep 02, 2015 8:42 am<div class=content>Hi there, <br><br> Unfortunately the command doesn't appear to give anything back : <br><br> openvpn --version <br> -bash: openvpn: command not found <br><br><br> yes I edited vars and updated the .conf file with the new DH key, going to restart later at some point hopefully it goes well.</div></div></div><div class=back2top><a class=top href=#top title=Top> <i class="icon fa-chevron-circle-up fa-fw icon-gray"aria-hidden=true> </i> <span class=sr-only> Top </span> </a></div></div></div><hr class=divider><div class="action-bar bar-bottom"><a title="Post a reply"class=button href=./posting.php?mode=reply&f=4&t=19553&sid=b790d3387d657fba143349c94495aedc> <span> Post Reply </span> <i class="icon fa-reply fa-fw"aria-hidden=true> </i> </a><div class="dropdown-container dropdown-button-control topic-tools"><span class="button button-secondary dropdown-trigger dropdown-select"title="Topic tools"> <i class="icon fa-wrench fa-fw"aria-hidden=true> </i> <span class=caret> <i class="icon fa-sort-down fa-fw"aria-hidden=true> </i> </span> </span><div class=dropdown><div class=pointer><div class=pointer-inner></div></div><ul class=dropdown-contents><li><a title="Print view"accesskey=p href=./viewtopic.php?f=4&t=19553&sid=b790d3387d657fba143349c94495aedc&view=print> <i class="icon fa-print fa-fw"aria-hidden=true> </i> <span> Print view </span> </a></ul></div></div><form action=./viewtopic.php?f=4&t=19553&sid=b790d3387d657fba143349c94495aedc method=post><div class="dropdown-container dropdown-container-left dropdown-button-control sort-tools"><span class="button button-secondary dropdown-trigger dropdown-select"title="Display and sorting options"> <i class="icon fa-sort-amount-asc fa-fw"aria-hidden=true> </i> <span class=caret> <i class="icon fa-sort-down fa-fw"aria-hidden=true> </i> </span> </span><div class="dropdown hidden"><div class=pointer><div class=pointer-inner></div></div><div class=dropdown-contents><fieldset class=display-options><label>Display: <select id=st name=st><option selected value=0>All posts<option value=1>1 day<option value=7>7 days<option value=14>2 weeks<option value=30>1 month<option value=90>3 months<option value=180>6 months<option value=365>1 year</select></label><label>Sort by: <select id=sk name=sk><option value=a>Author<option selected value=t>Post time<option value=s>Subject</select></label><label>Direction: <select id=sd name=sd><option selected value=a>Ascending<option value=d>Descending</select></label><hr class=dashed><input class=button2 name=sort type=submit value=Go></fieldset></div></div></div></form><div class=pagination>12 posts • Page <strong> 1 </strong> of <strong> 1 </strong></div></div><div class="action-bar actions-jump"><p class=jumpbox-return><a class="left-box arrow-left"accesskey=r href=./viewforum.php?f=4&sid=b790d3387d657fba143349c94495aedc> <i class="icon fa-angle-left fa-fw icon-black"aria-hidden=true> </i> <span> Return to “Server Administration” </span> </a><div class="jumpbox dropdown-container dropdown-container-right dropdown-up dropdown-left dropdown-button-control"id=jumpbox><span class="button button-secondary dropdown-trigger dropdown-select"title="Jump to"> <span> Jump to </span> <span class=caret> <i class="icon fa-sort-down fa-fw"aria-hidden=true> </i> </span> </span><div class=dropdown><div class=pointer><div class=pointer-inner></div></div><ul class=dropdown-contents><li><a class=jumpbox-forum-link href=./viewforum.php?f=20&sid=b790d3387d657fba143349c94495aedc> <span> Announcements </span> </a><li><a class=jumpbox-forum-link href=./viewforum.php?f=30&sid=b790d3387d657fba143349c94495aedc> <span> Forum & Website Support </span> </a><li><a class=jumpbox-cat-link href=./viewforum.php?f=35&sid=b790d3387d657fba143349c94495aedc> <span> Community Project </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=4&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   Server Administration </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=6&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Configuration </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=7&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Examples </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=19&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Routed Example </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=5&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Installation Help </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=8&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Tutorials </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=23&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   Testing branch </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=15&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   Scripting and Customizations </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=16&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Authentication Scripts </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=17&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Routing and Firewall Scripts </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=18&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Rolling Your Own Installer </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=10&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   Wishlist </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=22&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   Cert / Config management </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=31&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span class=spacer> </span> <span> ↳   Easy-RSA </span> </a><li><a class=jumpbox-cat-link href=./viewforum.php?f=32&sid=b790d3387d657fba143349c94495aedc> <span> OpenVPN Inc. enterprise business solutions </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=24&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   The OpenVPN Access Server </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=39&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   The OpenVPN Cloud </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=37&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   OpenVPN Connect (Windows) </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=38&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   OpenVPN Connect (macOS) </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=33&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   OpenVPN Connect (Android) </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=36&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   OpenVPN Connect (iOS) </span> </a><li><a class=jumpbox-forum-link href=./viewforum.php?f=1&sid=b790d3387d657fba143349c94495aedc> <span> Off Topic, Related </span> </a><li><a class=jumpbox-forum-link href=./viewforum.php?f=12&sid=b790d3387d657fba143349c94495aedc> <span> Braggin' Rights </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=13&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   My VPN </span> </a><li><a class=jumpbox-sub-link href=./viewforum.php?f=14&sid=b790d3387d657fba143349c94495aedc> <span class=spacer> </span> <span> ↳   Doh! </span> </a><li><a class=jumpbox-forum-link href=./viewforum.php?f=21&sid=b790d3387d657fba143349c94495aedc> <span> Pay OpenVPN Service Provider Reviews/Comments </span> </a></ul></div></div></div><script>var ct_cookie_name = "ct_checkjs",
				ct_cookie_value = "1218746327";</script></div><div class=page-footer id=page-footer role=contentinfo><div class=navbar role=navigation><div class=inner><ul class="nav-footer linklist"id=nav-footer role=menubar><li class=breadcrumbs><span class=crumb> <a data-navbar-reference=home href=https://openvpn.net/index.php/open-source.html> <i class="icon fa-home fa-fw"aria-hidden=true> </i> <span> Home </span> </a> </span> <span class=crumb> <a data-navbar-reference=index href=./index.php?sid=b790d3387d657fba143349c94495aedc> <span> Board index </span> </a> </span><li class=rightside>All times are <span title=UTC> UTC </span><li class=rightside><a data-ajax=true data-refresh=true href=./ucp.php?mode=delete_cookies&sid=b790d3387d657fba143349c94495aedc role=menuitem> <i class="icon fa-trash fa-fw"aria-hidden=true> </i> <span> Delete cookies </span> </a></ul></div></div><div class=copyright>Powered by <a href=https://www.phpbb.com/> phpBB </a> ® Forum Software © phpBB Limited</div><div data-ajax-error-text="Something went wrong when processing your request."data-ajax-error-text-abort="User aborted request."data-ajax-error-text-parsererror="Something went wrong with the request and the server returned an invalid reply."data-ajax-error-text-timeout="Your request timed out; please try again."data-ajax-error-title="AJAX error"class=darkenwrapper id=darkenwrapper><div class=darken id=darken> </div></div><div data-l-timeout-processing-req="Request timed out."class=phpbb_alert data-l-err=Error id=phpbb_alert><a class=alert_close href=#> <i class="icon fa-times-circle fa-fw"aria-hidden=true> </i> </a><h3 class=alert_title> </h3><p class=alert_text></div><div class=phpbb_alert id=phpbb_confirm><a class=alert_close href=#> <i class="icon fa-times-circle fa-fw"aria-hidden=true> </i> </a><div class=alert_text></div></div></div></div><div><a accesskey=z class=anchor id=bottom> </a></div><script src=./assets/javascript/jquery.min.js?assets_version=52></script><script src=./assets/javascript/core.js?assets_version=52></script><script src=./ext/cleantalk/antispam/styles/all/template/cleantalk.js?assets_version=52></script><script src=./styles/openvpn/template/forum_fn.js?assets_version=52></script><script src=./styles/openvpn/template/ajax.js?assets_version=52></script><style>.ovpn_cont {
                border: 1px solid darkgrey;
		position: relative;
        }
        .ovpn_title {
                border-bottom: 2px solid darkgrey;
                padding: 3px;
                background: linear-gradient(rgb(163,182,200),rgb(123,150,176));
                position: relative;
        }
        .ovpn_config {
                font-family: monospace;
                background: #FFF;
        	position: relative;
	}
        .ovpn_line, .linnum, .lincont {
                display: inline-block;
        }
        .ovpn_line:hover {
                background: lightgrey;
        }
        .linnum {
                min-width: 3em;
                text-align: right;
                padding-right: 7px;
                border-right: 1px solid darkgrey;
                -moz-user-select: none;
                -khtml-user-select: none;
                -webkit-user-select: none;
                -o-user-select: none;
                user-select: none;
        }
        .lincont {
                padding-left: 7px;
        }
        .ovpn_line {
                width: 100%;
        }
        .conf_swap {
                float: right;
        }</style><script>var configs = document.getElementsByClassName("ovpn_config");
    var arr = [].slice.call(configs);
    arr.forEach(function(config) {
        console.log(config);
        var pretty = config.getElementsByClassName("ovpn_pretty").item(0);
        var post = config.getElementsByClassName("ovpn_post").item(0);
        var out = post.innerHTML;
	console.log(out);
	// strip out inline certificates and keys
        out=out.replace(/<br\/?>/gm, "\n");
	out=out.replace(/(<|\&lt;)cert(>|\&gt;)[\s\S]*(<|\&lt;)\/cert(>|\&gt;)/gm, "&lt;cert&gt;\n--STRIPPED INLINE CERT--\n&lt;/cert&gt;");
	out=out.replace(/(<|&lt;)ca(>|&gt;)[\s\S]*(<|&lt;)\/ca(>|&gt;)/gm, "&lt;ca&gt;\n--STRIPPED INLINE CA CERT--\n&lt;/ca&gt;");
	out=out.replace(/(<|&lt;)key(>|&gt;)[\s\S]*(<|&lt;)\/key(>|&gt;)/gm, "&lt;key&gt;\n--STRIPPED INLINE KEY--\n&lt;/key&gt;");
	out=out.replace(/(<|&lt;)tls\-auth(>|&gt;)[\s\S]*(<|&lt;)\/tls\-auth(>|&gt;)/gm, "&lt;tls-auth&gt;\n--STRIPPED INLINE TLS-AUTH KEY--\n&lt;/tls-auth&gt;");
        lin_num(post);
        out=out.replace(/<(?:.|\n)*?>/gm, "");
        // strip out comment lines
	out=out.replace(/(#.*)|(\s+;.*)/gm, "");
	// remove empty lines
        out=out.replace(/^[\s]*[\r\n]|^#.*|^;.*/gm, "");
        pretty.innerHTML=out;
        console.log(lin_num(pretty));
        pretty.innerHTML=lin_num(pretty);
        post.style.display="none";
        pretty.style.display="block";
	post.innerHTML=post.innerHTML.replace(/<br>/gm, "\n");
	post.innerHTML=post.innerHTML.replace(/(<|\&lt;)cert(>|\&gt;)[\s\S]*(<|\&lt;)\/cert(>|\&gt;)/gm, "&lt;cert&gt;\n--STRIPPED INLINE CERT--\n&lt;/cert&gt;");
	post.innerHTML=post.innerHTML.replace(/(<|&lt;)ca(>|&gt;)[\s\S]*(<|&lt;)\/ca(>|&gt;)/gm, "&lt;ca&gt;\n--STRIPPED INLINE CA CERT--\n&lt;/ca&gt;");
	post.innerHTML=post.innerHTML.replace(/(<|&lt;)key(>|&gt;)[\s\S]*(<|&lt;)\/key(>|&gt;)/gm, "&lt;key&gt;\n--STRIPPED INLINE KEY--\n&lt;/key&gt;");
	post.innerHTML=post.innerHTML.replace(/(<|&lt;)tls\-auth(>|&gt;)[\s\S]*(<|&lt;)\/tls\-auth(>|&gt;)/gm, "&lt;tls-auth&gt;\n--STRIPPED INLINE TLS-AUTH KEY--\n&lt;/tls-auth&gt;");
	post.innerHTML=lin_num(post);
    });
    function makeid(){
        var text = "";
        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
            for( var i=0; i < 5; i++ ){
                text += possible.charAt(Math.floor(Math.random() * possible.length));
            }
        return text;
    }
    function lin_num(text){
        var id = makeid();    
        console.log(text);
	    var text_ar = text.innerHTML.split("\n");
        console.log("Total Lines: " + text_ar.length);
        console.log(text_ar);
        var out = "";
        var linnum = 1;
        text_ar.forEach(function(line){
            if (linnum < text_ar.length){
                out+="<div id=\""+id+linnum+"\" class=\"ovpn_line\"><div class=\"linnum\">"+linnum+"</div><div class=\"lincont\">"+line+"</div></div>\n";
                linnum++;
            }
        });
        return out;
    }
    function swap_conf(button){
        var p = button.parentNode.parentNode;
        var pretty = p.getElementsByClassName("ovpn_pretty").item(0);
        var post = p.getElementsByClassName("ovpn_post").item(0);

        console.log(p);
        if (button.innerHTML == "View Original"){
                pretty.style.display="none";
                post.style.display="block";
                button.innerHTML = "View Formatted";
        } else {
                pretty.style.display="block";
                post.style.display="none";
                button.innerHTML = "View Original";
        }
    }</script>