客户端配置文件

客户端配置文件

我已经在 Ubuntu 18.04 上安装了 OpenVPN 社区版。连接 OpenVPN 后,我无法连接互联网和其他网站。请检查我的Client.confServer.conf下面的内容,并告知我是否有任何问题。

客户端配置文件

client
dev tap
#dev tun
#proto tcp
proto udp
remote 52.19.26.62 1194
remote-random-hostname
#remote 52.19.26.62 443
resolv-retry infinite
nobind
ca ca.crt
cert client1.crt
key client1.key
tls-version-min 1.2
tls-cipher TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
cipher AES-256-CBC
auth SHA512
#auth-retry none
persist-key
persist-tun
remote-cert-tls server
comp-lzo
verb 3
tls-client
tls-auth pfs.key
auth-user-pass
auth-nocache
#redirect-gateway def1
reneg-sec 0
script-security 2
up /etc/openvpn/scripts/update-systemd-resolved
down /etc/openvpn/scripts/update-systemd-resolved
down-pre

服务器配置文件

port 1194
#port 443
proto udp
dev tap
#proto tcp
#dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh2048.pem
cipher AES-256-CBC
auth SHA512
server 10.8.0.0 255.255.255.0
#push "redirect-gateway local def1"
push "redirect-gateway local def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 3
tls-server
tls-auth /etc/openvpn/pfs.key

此外,当添加up/down update-systemd-resolved并尝试连接 OpenVPN Connect 时,即使脚本存在于相应的文件夹中(/etc/openvpn/scripts)错误,也会出现以下错误:

Options error: --up script fails with '/etc/openvpn/scripts/update-systemd-resolved': No such process (errno=3)
Options error: Please correct this error.
Use --help for more information.

您能指导我如何修复此问题吗?使用 OpenVPN 和互联网连接。

相关内容