我在 ping 和文件和打印机共享方面遇到问题。唯一的办法是禁用服务器中的防火墙。这是我的 openvpn 服务器配置:
port 1194
proto udp
dev tun
dev-node VPNserver
server 10.8.0.0 255.255.255.0
keepalive 10 120
max-clients 3
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 3
explicit-exit-notify 1
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
push "route 192.168.0.0 255.255.255.0"
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
route-delay 5
route-method exe
我现在可以 ping 接下来在防火墙中插入此规则:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
但看不到文件和打印机共享。
答案1
删除此项并添加一条到 TAP (服务器端)的路由
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
route -p add 0.0.0.0 mask 0.0.0.0 10.8.0.1 metric 50 if [number of tap device in route print]
5...ff ff ff ff ff ff ......TAP-Windows 适配器 V9
route -p add 0.0.0.0 mask 0.0.0.0 10.8.0.1 metric 50 if 5
但服务器无法 ping 通客户端。这是否是正确的解决方案?
答案2
结束解决方案在服务器配置中添加防火墙 openvpn.exe udp open 和
route 0.0.0.0 0.0.0.0 10.8.0.1