1

EDIT: check for udp

netstat -upnl

I have tried to follow these two guides https://linuxconfig.org/how-to-setup-a-vpn-with-openvpn-on-debian-9-stretch-linux and https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-8 using debian 8 and 9.

I can start the openvpn service and according to the status command it is running, but openvpn is not listening.

# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3768/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      3768/sshd

According to the logs is looks there is a couple of errors. What am I doing wrong?

Dec  7 12:49:06 localhost systemd[1]: Stopping OpenVPN connection to server...
Dec  7 12:49:06 localhost ovpn-server[6608]: event_wait : Interrupted system call (code=4)
Dec  7 12:49:06 localhost ovpn-server[6608]: /sbin/ip route del 10.8.0.0/24
Dec  7 12:49:06 localhost systemd[1]: Stopping OpenVPN service...
Dec  7 12:49:06 localhost systemd[1]: Starting OpenVPN service...
Dec  7 12:49:06 localhost ovpn-server[6608]: ERROR: Linux route delete command failed: external program exited with error status: 2
Dec  7 12:49:06 localhost ovpn-server[6608]: Closing TUN/TAP interface
Dec  7 12:49:06 localhost ovpn-server[6608]: /sbin/ip addr del dev tun0 local 10.8.0.1 peer 10.8.0.2
Dec  7 12:49:06 localhost systemd[1]: Started OpenVPN service.
Dec  7 12:49:06 localhost ovpn-server[6608]: Linux ip addr del failed: external program exited with error status: 2
Dec  7 12:49:06 localhost ovpn-server[6608]: SIGTERM[hard,] received, process exiting
Dec  7 12:49:06 localhost systemd[1]: Starting OpenVPN connection to server...
Dec  7 12:49:06 localhost ovpn-server[6730]: OpenVPN 2.3.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 26 2017
Dec  7 12:49:06 localhost ovpn-server[6730]: library versions: OpenSSL 1.0.1t  3 May 2016, LZO 2.08
Dec  7 12:49:06 localhost ovpn-server[6730]: Diffie-Hellman initialized with 2048 bit key
Dec  7 12:49:06 localhost ovpn-server[6730]: Socket Buffers: R=[212992->131072] S=[212992->131072]
Dec  7 12:49:06 localhost ovpn-server[6730]: ROUTE_GATEWAY 172.104.18.1/255.255.255.0 IFACE=eth0 HWADDR=f2:3c:91:86:f3:d4
Dec  7 12:49:06 localhost ovpn-server[6730]: TUN/TAP device tun0 opened
Dec  7 12:49:06 localhost ovpn-server[6730]: TUN/TAP TX queue length set to 100
Dec  7 12:49:06 localhost ovpn-server[6730]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Dec  7 12:49:06 localhost ovpn-server[6730]: /sbin/ip link set dev tun0 up mtu 1500
Dec  7 12:49:06 localhost ovpn-server[6730]: /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Dec  7 12:49:06 localhost ovpn-server[6730]: /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
Dec  7 12:49:06 localhost systemd[1]: Started OpenVPN connection to server.
Dec  7 12:49:06 localhost ovpn-server[6746]: GID set to nogroup
Dec  7 12:49:06 localhost ovpn-server[6746]: UID set to nobody
Dec  7 12:49:06 localhost ovpn-server[6746]: UDPv4 link local (bound): [undef]
Dec  7 12:49:06 localhost ovpn-server[6746]: UDPv4 link remote: [undef]
Dec  7 12:49:06 localhost ovpn-server[6746]: MULTI: multi_init called, r=256 v=256
Dec  7 12:49:06 localhost ovpn-server[6746]: IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Dec  7 12:49:06 localhost ovpn-server[6746]: IFCONFIG POOL LIST
Dec  7 12:49:06 localhost ovpn-server[6746]: Initialization Sequence Completed
  • Openvpn is listening on udp. – Ipor Sircer Dec 7 '17 at 13:12
  • duh.... brain not working... thx – lallepot Dec 7 '17 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.