windows ping不通V_P_N侧

问题遇到的现象和发生背景

CentOS7.5配置了OpenV_P_N,Mac可以正常使用,Windows可以连上,就是ping不通VPN网关

问题相关代码,请勿粘贴截图

  • server.conf

    port 11195
    proto tcp
    dev tun # TUN/TAP virtual network device
    user openvpn
    group openvpn
    ca /etc/openv_p_n/server/easy-rsa/pki/ca.crt
    cert /etc/openv_p_n/server/easy-rsa/pki/issued/server.crt
    key /etc/openv_p_n/server/easy-rsa/pki/private/server.key
    dh /etc/openv_p_n/server/easy-rsa/pki/dh.pem
    tls-auth /etc/openv_p_n/server/easy-rsa/ta.key 0
    
    auth-user-pass-verify /etc/openv_p_n/server/user/checkpsw.sh via-env
    script-security 3
    
    verify-client-cert
    #username-as-common-name
    #client-to-client
    duplicate-cn
    ifconfig-pool-persist ipp.txt
    compress lzo
    #ncp-ciphers "AES-256-GCM:AES-128-GCM"
    keepalive 10 120
    persist-key
    persist-tun
    verb 6
    
    log /var/log/openv_p_n/server.log
    log-append /var/log/openv_p_n/server.log
    status /var/log/openv_p_n/status.log
    
    server 10.8.0.0 255.255.255.0
    push "route 172.16.100.0 255.255.255.0"
    push "route 192.168.1.0 255.255.255.0"
    push "route 192.168.3.0 255.255.255.0"
  • client.ovpn

    client
    proto tcp-client
    dev tun
    auth-user-pass
    remote x.x.x 11195
    ca ca.crt
    cert chad_vpn.crt
    key chad_vpn.key
    tls-auth ta.key 1
    remote-cert-tls server
    persist-tun
    persist-key
    verb 6
    compress lzo
    mute 10
    auth-nocache
    resolv-retry infinite
    nobind
    #cipher AES-256-GCM

运行结果及报错内容

  • windows执行 netstat -nr 结果:

    活动路由:^M
    16 网络目标 网络掩码 网关 接口 跃点数^M
    17 0.0.0.0 0.0.0.0 10.0.2.2 10.0.2.15 1034^M
    18 10.0.2.0 255.255.255.0 在链路上 10.0.2.15 266^M
    19 10.0.2.15 255.255.255.255 在链路上 10.0.2.15 266^M
    20 10.0.2.255 255.255.255.255 在链路上 10.0.2.15 266^M
    21 10.8.0.0 255.255.255.0 10.8.0.5 10.8.0.6 257^M
    22 10.8.0.4 255.255.255.252 在链路上 10.8.0.6 257^M
    23 10.8.0.6 255.255.255.255 在链路上 10.8.0.6 257^M
    24 10.8.0.7 255.255.255.255 在链路上 10.8.0.6 257^M
    26 127.0.0.0 255.0.0.0 在链路上 127.0.0.1 306^M
    27 127.0.0.1 255.255.255.255 在链路上 127.0.0.1 306^M
    28 127.255.255.255 255.255.255.255 在链路上 127.0.0.1 306^M
    29 172.16.100.0 255.255.255.0 10.8.0.5 10.8.0.6 257^M
    30 192.168.1.0 255.255.255.0 10.8.0.5 10.8.0.6 257^M
    31 192.168.3.0 255.255.255.0 10.8.0.5 10.8.0.6 257^M
    32 224.0.0.0 240.0.0.0 在链路上 127.0.0.1 306^M
    33 224.0.0.0 240.0.0.0 在链路上 10.0.2.15 266^M
    34 224.0.0.0 240.0.0.0 在链路上 10.8.0.6 257^M
    35 255.255.255.255 255.255.255.255 在链路上 127.0.0.1 306^M
    36 255.255.255.255 255.255.255.255 在链路上 10.0.2.15 266^M
    37 255.255.255.255 255.255.255.255 在链路上 10.8.0.6 257^M
    
    39 永久路由:^M
    40 网络地址 网络掩码 网关地址 跃点数^M
    42 0.0.0.0 0.0.0.0 10.0.2.2 1024
  • ping 10.8.0.6

    PS C:\Windows\system32> ping 10.8.0.6
    
    正在 Ping 10.8.0.6 具有 32 字节的数据:
    来自 10.8.0.6 的回复: 字节=32 时间<1ms TTL=128
    来自 10.8.0.6 的回复: 字节=32 时间<1ms TTL=128
    来自 10.8.0.6 的回复: 字节=32 时间<1ms TTL=128
    来自 10.8.0.6 的回复: 字节=32 时间<1ms TTL=128
    
    10.8.0.6 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 0ms,最长 = 0ms,平均 = 0ms
    PS C:\Windows\system32>
    PS C:\Windows\system32> ping 10.8.0.5
    
    正在 Ping 10.8.0.5 具有 32 字节的数据:
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    
    10.8.0.5 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 0,丢失 = 4 (100% 丢失),
    PS C:\Windows\system32> tracert 172.16.100.1
    
    通过最多 30 个跃点跟踪到 172.16.100.1 的路由
    
    1 * * * 请求超时。
    2 * * * 请求超时。
    3 * * * 请求超时。
    4 * * * 请求超时。
    5 * * * 请求超时。
    6 * * * 请求超时。
    7 * * * 请求超时。
    8 * * * 请求超时。
    9 * * * 请求超时。
    10 * * * 请求超时。
    11 * * * 请求超时。
    12 * * * 请求超时。
    13 * * * 请求超时。
    14 * * * 请求超时。
    15 * * * 请求超时。
    16 * * * 请求超时。
    17 * * 传输错误: 代码为 1232。
    
    跟踪完成。

    我的解答思路和尝试过的方法

    • 网络没有问题
    • Mac能正常使用
    • Windows防火墙已关闭
阅读 1.8k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题