[Solved] Could Not Connect OpenVPN Portforward

Samples of working configurations.
Locked
rlinux57
OpenVpn Newbie
Posts: 3
Joined: Sat May 16, 2015 6:48 am

[Solved] Could Not Connect OpenVPN Portforward

Post by rlinux57 » Wed Dec 30, 2015 9:49 am

I have configured it manually. Kindly help me in this regard.
#openvpn vpn.ovpn

Code: Select all

Wed Dec 30 14:24:41 2015 OpenVPN 2.3.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jul  8 2015
Wed Dec 30 14:24:41 2015 library versions: OpenSSL 1.0.2d 9 Jul 2015, LZO 2.08
Enter Auth Username: *******
Enter Auth Password: *************
Wed Dec 30 14:24:57 2015 Socket Buffers: R=[212992->131072] S=[212992->131072]
Wed Dec 30 14:24:57 2015 UDPv4 link local: [undef]
Wed Dec 30 14:24:57 2015 UDPv4 link remote: [AF_INET]x.x.70.236:1194
Wed Dec 30 14:25:57 2015 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Dec 30 14:25:57 2015 TLS Error: TLS handshake failed
Wed Dec 30 14:25:57 2015 SIGUSR1[soft,tls-error] received, process restarting
Wed Dec 30 14:25:57 2015 Restart pause, 2 second(s)
#server.conf

Code: Select all

# cat /etc/openvpn/server.conf 
port 1194 #- port
proto udp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login #- Comment this line if you are using FreeRADIUS
#plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment this line if you are using FreeRADIUS
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3
#vpn.ovpn

Code: Select all

client
dev tun
proto udp
remote x.x.70.236 1194 # - Your server IP and OpenVPN Port
remote x.x.70.237 1194 udp
remote x.x.70.237 1194 udp
remote x.x.70.237 443 tcp
remote x.x.70.237 1194 udp
remote x.x.70.237 1194 udp
remote x.x.70.237 1194 udp
remote x.x.70.237 1194 udp
remote x.x.70.237 1194 udp
remote-cert-tls server
ns-cert-type server
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca server.crt
auth-user-pass
comp-lzo
reneg-sec 0
verb 3
<ca>
-----BEGIN CERTIFICATE-----
<>
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
<>
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
<>
-----END PRIVATE KEY-----
</key>
Last edited by debbie10t on Fri Jan 01, 2016 1:02 pm, edited 3 times in total.
Reason: Redact Cert/key & public IP

User avatar
Traffic
OpenVPN Protagonist
Posts: 4081
Joined: Sat Aug 09, 2014 11:24 am

Re: Could Not Connect OpenVPN

Post by Traffic » Wed Dec 30, 2015 4:43 pm

Common causes of TLS handshake errors are Firewall blocking and Port Forwarding not enabled.

rlinux57
OpenVpn Newbie
Posts: 3
Joined: Sat May 16, 2015 6:48 am

Re: Could Not Connect OpenVPN

Post by rlinux57 » Fri Jan 01, 2016 7:04 am

It was an issue of port forwarding i have fixed it at my own.
Thanks for your reply.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4081
Joined: Sat Aug 09, 2014 11:24 am

Re: [Solved] Could Not Connect OpenVPN Portforward

Post by Traffic » Wed Jan 06, 2016 3:10 pm

Thanks for letting us know your solution 8-)

Locked