EDIT: verifique o udp
netstat -upnl
Eu tentei seguir estes dois guias link e link usando o debian 8 e 9.
Eu posso iniciar o serviço openvpn e de acordo com o comando status que está sendo executado, mas o openvpn não está escutando.
# 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
De acordo com os logs, parece haver alguns erros. O que estou fazendo errado?
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