trok79200foe 0 Posted ... Trying to setup my diskstation to use SSL with AirVPN as it seems like my ISP is heavily throttling VPN traffic. I successfully got VPN working by following these directions: https://airvpn.org/topic/2487-how-to-configure-a-synology-device/ I then tried to setup ssl by following these directions: https://airvpn.org/ssl/Installed stunnel and generated the certificate but ran into the following error when trying to start stunnel: > stunnel /volume1/files/AirVPN/AirVPN_443_SSL/AirVPN__SSL-443.ssl: RAND_status claims sufficient entropy for the PRNG2015.12.26 18:22:19 LOG7[]: PRNG seeded successfully2015.12.26 18:22:19 LOG7[]: Configuration SSL options: 0x010000002015.12.26 18:22:19 LOG7[]: SSL options set: 0x010000042015.12.26 18:22:19 LOG3[]: Error loading verify certificates from stunnel.crt2015.12.26 18:22:19 LOG3[]: error stack: B084002 : error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib2015.12.26 18:22:19 LOG3[]: error stack: 2006D080 : error:2006D080:BIO routines:BIO_new_file:no such file2015.12.26 18:22:19 LOG3[]: SSL_CTX_load_verify_locations: 2001002: error:02001002:system library:fopen:No such file or directory To be honest I don't really know what is needed here or how to get ssl working. I googled around and found this link: http://nas.deadcode.net/2015/05/20/avoid-deep-packet-inspection-for-openvpn-with-stunnel/ although im not sure if i need to follow all the steps outlined in his post? Any ideas? Has anyone been able to get this working? Thx Quote Share this post Link to post
trok79200foe 0 Posted ... Ok so it turns out i wasn't running the command from the same dir so it couldnt find the stunnel.crt file Still having issues running both commands however. Running the first command seems fine but when i run the second one (openvpn) it seems like the two are causing issues with each other. Should i be disabling the VPN connection in the Synology interface i setup using the link above or does stunnel & openvpn run on top of the VPN connection? LogsRan the first command: > stunnel AirVPN_US-_SSL-443.ssl2015.12.28 06:18:39 LOG5[9553:4147721920]: stunnel 4.26 on i686-pc-linux-gnu with OpenSSL 0.9.8v 19 Apr 20122015.12.28 06:18:39 LOG5[9553:4147721920]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP2015.12.28 06:18:39 LOG6[9553:4147721920]: file ulimit = 1024 (can be changed with 'ulimit -n')2015.12.28 06:18:39 LOG6[9553:4147721920]: poll() used - no FD_SETSIZE limit for file descriptors2015.12.28 06:18:39 LOG5[9553:4147721920]: 500 clients allowed then ran the second:> openvpn AirVPN_US-_SSL-443.ovpnMon Dec 28 06:20:52 2015 OpenVPN 2.3.6 i686-pc-linux-gnu [sSL (OpenSSL)] [LZO] [EPOLL] [MH] [iPv6] built on Nov 11 2015Mon Dec 28 06:20:52 2015 library versions: OpenSSL 1.0.1p-fips 9 Jul 2015, LZO 2.08Mon Dec 28 06:20:52 2015 Control Channel Authentication: tls-auth using INLINE static key fileMon Dec 28 06:20:52 2015 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authenticationMon Dec 28 06:20:52 2015 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authenticationMon Dec 28 06:20:52 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]Mon Dec 28 06:20:52 2015 Attempting to establish TCP connection with [AF_INET]127.0.0.1:1413 [nonblock]Mon Dec 28 06:20:52 2015 TCP connection established with [AF_INET]127.0.0.1:1413Mon Dec 28 06:20:52 2015 TCPv4_CLIENT link local: [undef]Mon Dec 28 06:20:52 2015 TCPv4_CLIENT link remote: [AF_INET]127.0.0.1:1413Mon Dec 28 06:20:53 2015 Connection reset, restarting [-1]Mon Dec 28 06:20:53 2015 SIGUSR1[soft,connection-reset] received, process restartingMon Dec 28 06:20:53 2015 Restart pause, 5 second(s)Mon Dec 28 06:20:58 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]Mon Dec 28 06:20:58 2015 Attempting to establish TCP connection with [AF_INET]127.0.0.1:1413 [nonblock]Mon Dec 28 06:20:58 2015 TCP connection established with [AF_INET]127.0.0.1:1413Mon Dec 28 06:20:58 2015 TCPv4_CLIENT link local: [undef]Mon Dec 28 06:20:58 2015 TCPv4_CLIENT link remote: [AF_INET]127.0.0.1:1413Mon Dec 28 06:20:58 2015 Connection reset, restarting [-1]Mon Dec 28 06:20:58 2015 SIGUSR1[soft,connection-reset] received, process restartingMon Dec 28 06:20:58 2015 Restart pause, 5 second(s)Mon Dec 28 06:21:03 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]Mon Dec 28 06:21:03 2015 Attempting to establish TCP connection with [AF_INET]127.0.0.1:1413 [nonblock]Mon Dec 28 06:21:03 2015 TCP connection established with [AF_INET]127.0.0.1:1413Mon Dec 28 06:21:03 2015 TCPv4_CLIENT link local: [undef]Mon Dec 28 06:21:03 2015 TCPv4_CLIENT link remote: [AF_INET]127.0.0.1:1413Mon Dec 28 06:21:03 2015 Connection reset, restarting [-1]Mon Dec 28 06:21:03 2015 SIGUSR1[soft,connection-reset] received, process restartingMon Dec 28 06:21:03 2015 Restart pause, 5 second(s) First command output after starting openvpn:2015.12.28 06:20:52 LOG5[9553:4147719024]: openvpn accepted connection from 127.0.0.1:334652015.12.28 06:20:53 LOG5[9553:4147719024]: openvpn connected remote server from 10.8.0.76:521592015.12.28 06:20:53 LOG3[9553:4147719024]: SSL_connect: 14094410: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure2015.12.28 06:20:53 LOG5[9553:4147719024]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket2015.12.28 06:20:58 LOG5[9553:4147719024]: openvpn accepted connection from 127.0.0.1:334682015.12.28 06:20:58 LOG5[9553:4147719024]: openvpn connected remote server from 10.8.0.76:521622015.12.28 06:20:58 LOG3[9553:4147719024]: SSL_connect: 14094410: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure2015.12.28 06:20:58 LOG5[9553:4147719024]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket2015.12.28 06:21:03 LOG5[9553:4147719024]: openvpn accepted connection from 127.0.0.1:334712015.12.28 06:21:03 LOG5[9553:4147719024]: openvpn connected remote server from 10.8.0.76:521652015.12.28 06:21:03 LOG3[9553:4147719024]: SSL_connect: 14094410: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure2015.12.28 06:21:03 LOG5[9553:4147719024]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket2015.12.28 06:21:08 LOG5[9553:4147719024]: openvpn accepted connection from 127.0.0.1:334752015.12.28 06:21:08 LOG5[9553:4147719024]: openvpn connected remote server from 10.8.0.76:521692015.12.28 06:21:08 LOG3[9553:4147719024]: SSL_connect: 14094410: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure2015.12.28 06:21:08 LOG5[9553:4147719024]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket2015.12.28 06:21:12 LOG5[9553:4147719024]: openvpn accepted connection from 127.0.0.1:334802015.12.28 06:21:12 LOG5[9553:4147719024]: openvpn connected remote server from 10.8.0.76:521742015.12.28 06:21:12 LOG3[9553:4147719024]: SSL_connect: 14094410: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure2015.12.28 06:21:12 LOG5[9553:4147719024]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket2015.12.28 06:21:17 LOG5[9553:4147719024]: openvpn accepted connection from 127.0.0.1:334862015.12.28 06:21:17 LOG5[9553:4147719024]: openvpn connected remote server from 10.8.0.76:521802015.12.28 06:21:17 LOG3[9553:4147719024]: SSL_connect: 14094410: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure2015.12.28 06:21:17 LOG5[9553:4147719024]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket^C2015.12.28 06:21:26 LOG3[9553:4147721920]: Received signal 2; terminating Quote Share this post Link to post
Anonymous_13 31 Posted ... I had issues with my synology NAS and VPN too. Then I've started to enable VPN on my router instead of on every device. If thats a solution you can think of, go for it. Quote Share this post Link to post
trok79200foe 0 Posted ... Thx for the response. I actually started off with using the VPN client of my router however my ISP heavily throttles VPN traffic which is why i am trying to add SSL which dramatically improves my speeds. Problem is a) my router is much slower than my synology diskstation and it seems even more difficult to setup VPN with SSL on my router although if i cant get this going I will give that a try. Quote Share this post Link to post
rango 0 Posted ... Did you get this to work? Going through the same process as you and not sure how to proceed. Quote Share this post Link to post
trok79200foe 0 Posted ... Not yet unfortunately, still working on it. Will post back if I do, please do the same Quote Share this post Link to post
TeranFethril 0 Posted ... Hello all, You need sslVersion = all in your config file. (16:17:03)-(root)-(108)-> cat AirVPN_NL-Alblasserdam_Zibal_SSL-443.ssl # -------------------------------------------------------- # Air VPN | https://airvpn.org | Monday 18th of January 2016 11:09:50 AM # STunnel Client Configuration # AirVPN_NL-Alblasserdam_Zibal_SSL-443 # -------------------------------------------------------- options = NO_SSLv2 sslVersion = all client = yes debug = 7 output = /var/log/stunnel.log [openvpn] accept = 127.0.0.1:1413 connect = 213.152.161.150:443 TIMEOUTclose = 0 verify = 3 CAfile = stunnel.crt Then you will get this output: 2016.01.18 16:03:19 LOG7[11903:4147873472]: PRNG seeded successfully2016.01.18 16:03:19 LOG7[11903:4147873472]: Configuration SSL options: 0x010000002016.01.18 16:03:19 LOG7[11903:4147873472]: SSL options set: 0x010000042016.01.18 16:03:19 LOG7[11903:4147873472]: Loaded verify certificates from stunnel.crt2016.01.18 16:03:19 LOG7[11903:4147873472]: Loaded stunnel.crt revocation lookup file2016.01.18 16:03:19 LOG7[11903:4147873472]: SSL context initialized for service openvpn2016.01.18 16:03:19 LOG5[11903:4147873472]: stunnel 4.26 on i686-pc-linux-gnu with OpenSSL 0.9.8v 19 Apr 20122016.01.18 16:03:19 LOG5[11903:4147873472]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP2016.01.18 16:03:19 LOG6[11903:4147873472]: file ulimit = 1024 (can be changed with 'ulimit -n')2016.01.18 16:03:19 LOG6[11903:4147873472]: poll() used - no FD_SETSIZE limit for file descriptors2016.01.18 16:03:19 LOG5[11903:4147873472]: 500 clients allowed2016.01.18 16:03:19 LOG7[11903:4147873472]: FD 10 in non-blocking mode2016.01.18 16:03:19 LOG7[11903:4147873472]: FD 11 in non-blocking mode2016.01.18 16:03:19 LOG7[11903:4147873472]: FD 12 in non-blocking mode2016.01.18 16:03:19 LOG7[11903:4147873472]: SO_REUSEADDR option set on accept socket2016.01.18 16:03:19 LOG7[11903:4147873472]: openvpn bound to 127.0.0.1:14132016.01.18 16:03:19 LOG7[11909:4147873472]: Created pid file /opt/var/run/stunnel/stunnel.pid2016.01.18 16:03:57 LOG7[11909:4147873472]: openvpn accepted FD=13 from 127.0.0.1:458092016.01.18 16:03:57 LOG7[11909:4147870576]: openvpn started2016.01.18 16:03:57 LOG7[11909:4147870576]: FD 13 in non-blocking mode2016.01.18 16:03:57 LOG7[11909:4147870576]: Waiting for a libwrap process2016.01.18 16:03:57 LOG7[11909:4147870576]: Acquired libwrap process #02016.01.18 16:03:57 LOG7[11909:4147870576]: Releasing libwrap process #02016.01.18 16:03:57 LOG7[11909:4147870576]: Released libwrap process #02016.01.18 16:03:57 LOG7[11909:4147870576]: openvpn permitted by libwrap from 127.0.0.1:458092016.01.18 16:03:57 LOG5[11909:4147870576]: openvpn accepted connection from 127.0.0.1:458092016.01.18 16:03:57 LOG7[11909:4147870576]: FD 14 in non-blocking mode2016.01.18 16:03:57 LOG7[11909:4147870576]: openvpn connecting 213.152.161.150:4432016.01.18 16:03:57 LOG7[11909:4147870576]: connect_wait: waiting 10 seconds2016.01.18 16:03:57 LOG7[11909:4147870576]: connect_wait: connected2016.01.18 16:03:57 LOG5[11909:4147870576]: openvpn connected remote server from 192.168.2.6:335722016.01.18 16:03:57 LOG7[11909:4147870576]: Remote FD=14 initialized2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): before/connect initialization2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv2/v3 write client hello A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 read server hello A2016.01.18 16:03:57 LOG5[11909:4147870576]: CRL: verification passed2016.01.18 16:03:57 LOG5[11909:4147870576]: VERIFY OK: depth=0, /C=IT/ST=Italy/L=Perugia/O=AirVPN/OU=stunnel/CN=stunnel.airvpn.org/emailAddress=info@airvpn.org2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 read server certificate A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 read server key exchange A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 read server done A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 write client key exchange A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 write change cipher spec A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 write finished A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 flush data2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 read server session ticket A2016.01.18 16:03:57 LOG7[11909:4147870576]: SSL state (connect): SSLv3 read finished A2016.01.18 16:03:57 LOG7[11909:4147870576]: 1 items in the session cache2016.01.18 16:03:57 LOG7[11909:4147870576]: 1 client connects (SSL_connect())2016.01.18 16:03:57 LOG7[11909:4147870576]: 1 client connects that finished2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 client renegotiations requested2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 server connects (SSL_accept())2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 server connects that finished2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 server renegotiations requested2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 session cache hits2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 session cache misses2016.01.18 16:03:57 LOG7[11909:4147870576]: 0 session cache timeouts2016.01.18 16:03:57 LOG6[11909:4147870576]: SSL connected: new session negotiated2016.01.18 16:03:57 LOG6[11909:4147870576]: Negotiated ciphers: DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1 Quote Share this post Link to post