Ubuntu
Strato vServer 內的 VPN 伺服器
我有一個執行 Ubuntu 18 作業系統的Strato vServer,我嘗試使用本指南在此伺服器上安裝 VPN 伺服器。但是執行後我收到以下錯誤消息
service openvpn@server restart
:Aug 6 23:39:19 systemd[1]: Started OpenVPN connection to server. Aug 6 23:39:19 ovpn-server[31964]: Diffie-Hellman initialized with 2048 bit key Aug 6 23:39:19 ovpn-server[31964]: Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication Aug 6 23:39:19 ovpn-server[31964]: Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication Aug 6 23:39:19 ovpn-server[31964]: TUN/TAP device tap0 opened Aug 6 23:39:19 ovpn-server[31964]: Note: Cannot set tx queue length on tap0: Operation not permitted (errno=1) Aug 6 23:39:19 ovpn-server[31964]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0 Aug 6 23:39:19 ovpn-server[31964]: /sbin/ip link set dev tap0 up mtu 1500 Aug 6 23:39:19 ovpn-server[31964]: openvpn_execve: unable to fork: Resource temporarily unavailable (errno=11) Aug 6 23:39:19 ovpn-server[31964]: Exiting due to fatal error Aug 6 23:39:19 systemd-udevd[31965]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. Aug 6 23:39:19 systemd-udevd[31965]: link_config: could not get ethtool features for tap0 Aug 6 23:39:19 systemd-udevd[31965]: Could not set offload features of tap0: No such device Aug 6 23:39:19 systemd[1]: openvpn@server.service: Main process exited, code=exited, status=1/FAILURE Aug 6 23:39:19 systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
所以它似乎
tap0
不存在。但是為什麼它失去了,我該如何添加它?
這是關於
LimitNPROC
設置的。你得到目前值systemctl show openvpn@server --property=LimitNPROC
您可以通過將其添加到單元文件來解決問題
[Service] LimitNPROC=infinity
然後
systemctl daemon-reload
在重啟 OpenVPN 服務之前執行。