편집 : UDP 확인
netstat -upnl
나는이 두 가이드를 따르려고 노력했습니다https://linuxconfig.org/how-to-setup-a-vpn-with-openvpn-on-debian-9-stretch-linux그리고https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-8데비안 8과 9를 사용합니다.
openvpn 서비스를 시작하고 실행 상태에 따라 명령을 실행할 수 있지만 openvpn이 수신 대기하지 않습니다.
# 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
로그에 따르면 몇 가지 오류가 있는 것 같습니다. 내가 뭘 잘못했나요?
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