I have install openVPN server on my Ubuntu 15.04 VPS.
Important
I'm study in a university in China which don't provide network to new student.But I find that ShadowSocks can solve this problem.I install ShadowSocks on this server, and configure IPV6 connection.So i'm using IPV6 networking through ShadowSocks and IPV4 still disconnected.
What I want to say is I can only use IPV6 through ShadowSocks and I want to connect openVPN through ShadowSocks(IPV6).
Now openVPN and ShadowSocks server software installed on one VPS.
I want to use openVPN over ShadowSocks create a global proxy environment to let soft AP connect network through ShadowSocks and I can link this WIFI AP to let my other device link to Internet.
Here is my server.conf
# Which local IP address should OpenVPN
port 59336
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 223.5.5.5"
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
I have already disable SELinux, iptables.When I using nc -z -w 10 -u MY_SERVER_IP 59336, I can get a succeeded information.
Here is my client config on a windows10 device.
[code]
client
dev tun
proto udp
remote MY_SERVER_IP 59336
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
comp-lzo
verb 3
I have put my ca.crt client.key client.crt in the config folder(windows client) and ca.crt server.crt server.key dh2048.pem in the /etc/openvpn/keys path.
Here is my client log
[code]Wed Oct 07 11:05:30 2015 Warning: cannot open --log file: C:\Program Files\OpenVPN\log\client.log: áí???ìDò?y?ú?ó??????ì??????£ (errno=32)
Wed Oct 07 11:05:30 2015 OpenVPN 2.3.8 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 4 2015
Wed Oct 07 11:05:30 2015 library versions: OpenSSL 1.0.1p 9 Jul 2015, LZO 2.08
Wed Oct 07 11:05:30 2015 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Wed Oct 07 11:05:30 2015 Need hold release from management interface, waiting...
Wed Oct 07 11:05:31 2015 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Wed Oct 07 11:05:31 2015 MANAGEMENT: CMD 'state on'
Wed Oct 07 11:05:31 2015 MANAGEMENT: CMD 'log all on'
Wed Oct 07 11:05:31 2015 MANAGEMENT: CMD 'hold off'
Wed Oct 07 11:05:31 2015 MANAGEMENT: CMD 'hold release'
Wed Oct 07 11:05:31 2015 MANAGEMENT: CMD 'proxy SOCKS 127.0.0.1 1080'
Wed Oct 07 11:05:33 2015 Socket Buffers: R=[65536->65536] S=[65536->65536]
Wed Oct 07 11:05:33 2015 Attempting to establish TCP connection with [AF_INET]127.0.0.1:1080 [nonblock]
Wed Oct 07 11:05:33 2015 MANAGEMENT: >STATE:1444187133,TCP_CONNECT,,,
Wed Oct 07 11:05:33 2015 TCP connection established with [AF_INET]127.0.0.1:1080
Wed Oct 07 11:05:33 2015 UDPv4 link local: [undef]
Wed Oct 07 11:05:33 2015 UDPv4 link remote: [AF_INET]127.0.0.1:59336
Wed Oct 07 11:05:33 2015 MANAGEMENT: >STATE:1444187133,WAIT,,,
Wed Oct 07 11:06:33 2015 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Oct 07 11:06:33 2015 TLS Error: TLS handshake failed
Wed Oct 07 11:06:33 2015 SIGUSR1[soft,tls-error] received, process restarting
Wed Oct 07 11:06:33 2015 MANAGEMENT: >STATE:1444187193,RECONNECTING,tls-error,,
Wed Oct 07 11:06:33 2015 Restart pause, 5 second(s)
and my server log
Oct 07 09:06:13 XDUfucker ovpn-server[21418]: MY_SERVER_IP:38292 TLS: Initial packet from [AF_INET]MY_SERVER_IP:38292, sid=f0345f34 dd3fc482
Oct 07 09:07:13 XDUfucker ovpn-server[21418]: MY_SERVER_IP:38292 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Oct 07 09:07:13 XDUfucker ovpn-server[21418]: MY_SERVER_IP:38292 TLS Error: TLS handshake failed
I also have tried to connect to openVPN through other IPV4 networking, but still TLS Error(I have forgot details).