通过命令行运行 openvpn 配置时,出现以下错误,导致我无法正确设置 dns:
Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:4: register-dns (2.4.4)
从我目前发现的情况来看,这种错误通常是由于使用了过时版本的 openvpn 造成的。但我已经安装了最新版本的 openvpn 可用 atm (2.4.4)。
这是我的 openvpn 配置文件:
dev tun
persist-tun
persist-key
cipher XXX
auth XXX
tls-client
client
resolv-retry infinite
remote vpn.com xxxx udp
auth-user-pass
remote-cert-tls server
comp-lzo yes
auth-nocache
<ca>
</ca>
setenv CLIENT_CERT 0
<tls-auth>
</tls-auth>
key-direction 1
我没有看到哪个指令返回此错误,也没有看到为什么它没有修复,因为我已经更新了我的 openvpn 软件包。
最佳答案
我通过添加在另一个旧配置文件中找到的以下行来解决此问题:
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
关于dns - 尽管使用最新版本,OpenVPN 注册 dns 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47397568/