3

I'm trying to setup a OpenVPN server on Ubuntu , but everytime I'm trying to connect to the server it stuck at

...TLS: Initial packet from [AF_INET]...

here is the logs and the conf I'm using:

[email protected] - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-09-19 22:12:53 EET; 1h 50min ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 5730 ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/%i.conf --writepid /run/openvpn/%i.pid (code=exited, status=0/SUCCESS)
Main PID: 5735 (openvpn)
CGroup: /system.slice/system-openvpn.slice/[email protected]
`-5735 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid
Sep 19 22:15:29 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx TLS Error: TLS handshake failed
Sep 19 22:15:29 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx SIGUSR1[soft,tls-error] received, client-instance restarting
Sep 19 23:57:50 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx TLS: Initial packet from [AF_INET6]::ffff:xx.xxx.xxx.xxx:25213, sid=7a7bb80e 6f956981
Sep 19 23:58:50 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx TLS: Initial packet from [AF_INET6]::ffff:xx.xxx.xxx.xxx:25296, sid=4f196da9 f6415403
Sep 19 23:58:50 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sep 19 23:58:50 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx TLS Error: TLS handshake failed
Sep 19 23:58:50 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx SIGUSR1[soft,tls-error] received, client-instance restarting
Sep 19 23:59:50 vmi89168.host ovpn-server[5735]: ::ffff:xx.xxx.xxx.xxx TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)

xx.xxx.xxx.xxx is my laptop ip trying to connect

Can you ping the server? Yes

Is openvpn running on the server? (ps faux | grep openvpn)

root@vmi89168:~# ps faux | grep openvpn
root      5471  0.0  0.3 538924 38072 tty1     Sl   Sep19   0:04 mousepad /etc/openvpn/server.conf
root      7304  0.0  0.0  16664  2100 pts/8    S+   10:14   0:00      \_ grep --color=auto openvpn
nobody    5735  0.0  0.0  43880  5548 ?        Ss   Sep19   0:01 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid

Is there some kind of firewall or NAT on the server?

NOPE

Can you do a nmap? (sudo nmap -sU -p 1194 )

Host is up.
PORT     STATE         SERVICE
1194/udp open|filtered openvpn

Nmap done: 1 IP address (1 host up) scanned in 2.24 seconds

cat /etc/openvpn/server.conf

port 1194
proto udp6
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /etc/openvpn/ipp.txt
push "dhcp-option DNS 9.9.9.9"
push "dhcp-option DNS 149.112.112.112"
push "redirect-gateway def bypass-dhcp" 
server-ipv6 fd42:42:42:42::/112
tun-ipv6
push tun-ipv6
push "route-ipv6 2000::/3"
push "redirect-gateway ipv6"
crl-verify /etc/openvpn/crl.pem
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server_dxay7Ay5T2qC2jkP.crt
key /etc/openvpn/server_dxay7Ay5T2qC2jkP.key
tls-auth /etc/openvpn/tls-auth.key 0
dh /etc/openvpn/dh.pem
auth SHA256
cipher AES-128-CBC
tls-server
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
status /var/log/openvpn/status.log
verb 3

iptables -nvL

Chain INPUT (policy ACCEPT 2121K packets, 175M bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  tun0   *       0.0.0.0/0            0.0.0.0/0           
   46  4067 ACCEPT     udp  --  eth0   *       0.0.0.0/0            0.0.0.0/0            udp dpt:1194

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  eth0   tun0    0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  tun0   eth0    0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 2061K packets, 1841M bytes)
 pkts bytes target     prot opt in     out     source               destination         

I have searched a lot tried all possible solutions , but nothing works , can someone point me where would be the issue here!?

0

You must log in to answer this question.

Browse other questions tagged .