2022.07.01 | vance | 992次围观
服务端配置参考 https://www.cyberciti.biz/faq/howto-setup-openvpn-server-on-ubuntu-linux-14-04-or-16-04-lts/
客户端配置参考 https://azetinetworks.atlassian.net/wiki/spaces/SC13/pages/106496011/OpenVPN+Client+on+Ubuntu+16.04
遇到问题:
● openvpn@client.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: exit-code) since Fri 2022-07-01 01:59:22 CST; 5min ago Jul 01 01:59:22 ecs-6132 systemd[1]: Starting OpenVPN connection to client... Jul 01 01:59:22 ecs-6132 ovpn-client[847]: Unrecognized option or missing parameter(s) in /etc/openvpn/client.conf:13: block-outside-dns (2.3.10) Jul 01 01:59:22 ecs-6132 ovpn-client[847]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/client.conf:18: tls-crypt (2.3.10) Jul 01 01:59:22 ecs-6132 ovpn-client[847]: Use --help for more information. Jul 01 01:59:22 ecs-6132 systemd[1]: openvpn@client.service: Control process exited, code=exited status=1 Jul 01 01:59:22 ecs-6132 systemd[1]: Failed to start OpenVPN connection to client. Jul 01 01:59:22 ecs-6132 systemd[1]: openvpn@client.service: Unit entered failed state. Jul 01 01:59:22 ecs-6132 systemd[1]: openvpn@client.service: Failed with result 'exit-code'.
原因: openvpn的服务器端版本与客户端版本不一致。
解决方案: 客户端也安装openvpn v2.4 + 版本。
curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list apt update apt install -y openvpn
参考 https://gist.github.com/tienthanh2509/50094f55439e19af3a09911aa5c48852
发表评论