我正在通过命令行使用 OpenVPN 连接到我当前 Linux 发行版上的 VPN,因为没有可用的 GUI(它有一个 killswitch 复选框)。
我的问题是,当 VPN 失效时,我找不到任何方法来添加终止开关或防止回退到我的默认连接。
这是我目前用于连接的命令:
openvpn --config /etc/openvpn/gateway.conf
Run Code Online (Sandbox Code Playgroud)
基本上,我想找到一种简单的方法来防止我的 VPN 在它断开时回退到默认连接。我只希望我的连接在 VPN 连接恢复之前停止。
网关配置文件
client
dev tun
proto udp
remote us-california.privateinternetaccess.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /etc/openvpn/login.conf
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/crl.pem
auth-nocache
script-security 2
up /etc/openvpn/update-resolv-conf.sh
down /etc/openvpn/update-resolv-conf.sh
Run Code Online (Sandbox Code Playgroud)
源文件:https : //aur.archlinux.org/packages/private-internet-access-vpn