我的服务器 Ubuntu 16.04 上运行着 OpenVPN 2.3.10,它启动正常并且客户端连接正常,但我似乎无法让我的客户端 ping 服务器或其他客户端 IP。
客户端正在使用 Viscocity 1.7.6。
这是我的服务器配置:
# Port Number.
port 1194
# TCP or UDP server.
proto udp
# Interface type, TUN or TAP.
dev tun
# Certificates.
ca ca.crt
cert SERVERNAME.crt
key SERVERNAME.key # This file should be kept secret
# Diffie hellman parameters.
dh dh2048.pem
# Subnet to use for OpenVPN Connections.
server 10.8.0.0 255.255.255.0
# Keepalive: send ping every 10 seconds, tunnel down after 120 seconds no response.
keepalive 10 120
# LZO Compression for the tunnel.
comp-lzo
# Drop privileges to user/group nobody.
user root
group root
# Makes the link more resistant to connection failures.
persist-key
persist-tun
# Username and Password authentication.
client-cert-not-required
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so login
# OpenVPN Status Log files.
status openvpn-status.log
# LOG FILE VERBOSITY:
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 6
#log-append /var/log/openvpn.log
push "redirect-gateway def1"
push "route 10.8.0.0 255.255.255.0"
client-to-client
username-as-common-name
client-config-dir /etc/openvpn/ccd
这是我的 Viscocity 客户端配置:
我尝试过 TAP 和 TUN。使用 TAP,我现在可以 ping 通本地其他 VPN 设备,但无法再访问互联网。
我想要实现的是通过客户端本地网络访问互联网,因此互联网不需要 VPN 路由,但我希望所有客户端都能够进行 Windows 网络通信。
我也尝试过这个:
这没有任何作用。tun 设备在那里,我有一个 IP: