日度归档:2022年3月8日

Debian / Ubuntu 的Linux安装使用openvpn3客户端 2022-03-08

段落1、需求

本地的环境是Debian / Ubuntu的Linux环境,需要安装openvpn3客户端,并连接到已有的服务端上。

客户端项目地址 https://github.com/OpenVPN/openvpn3-linux

段落2、openvpn3客户端安装

参考 https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux

登录本地的Debian / Ubuntu客户端的Linux环境,编辑文件 /etc/apt/sources.list.d/openvpn3.list

添加内容

# OpenVPN3 Official Apt Repository for openvpn3.
deb https://swupdate.openvpn.net/community/openvpn3/repos stretch main
// 执行更新
root@client:~# apt-get update

// 安装必要的组件
root@client:~# apt install apt-transport-https build-essential libssl-dev

// 添加密钥
root@client:~# wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub

root@client:~# apt-key add openvpn-repo-pkg-key.pub

// 再次更新
root@client:~# apt-get update
root@client:~# apt-get upgrade

// 安装客户端
root@client:~# apt install openvpn3

// 正常安装的提示信息
Setting up libjsoncpp1:amd64 (1.7.4-3) ...
Setting up python3-dbus (1.2.4-1+b1) ...
Setting up python3-gi (3.22.0-2) ...
Setting up openvpn3 (16~beta+stretch) ...
openvpn3-autoload.service is a disabled or a static unit, not starting it.

段落3、欢快使用openvpn3客户端

附录、报错记录1,如果,安装时候的报错信息如下

The following packages have unmet dependencies:
openvpn3 : Depends: libcap-ng0 (>= 0.7.9) but 0.7.7-3+b1 is to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libprotobuf17 but it is not installable
Depends: libssl1.1 (>= 1.1.1) but 1.1.0l-1~deb9u4 is to be installed
Depends: libstdc++6 (>= 9) but 6.3.0-18+deb9u1 is to be installed
Depends: libtinyxml2-6a (>= 6.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

此报错,大概率,是你编辑文件 /etc/apt/sources.list.d/openvpn3.list 文件中,你当前的Debian/Ubuntu发型版本的名称写错了。