linux - openvpn 客户端可以ping通、可以建立连接,但不能得到回复

 手机用户2502878261 发布于 2022-11-02 23:29

我使用openvpn连接后,出现如题的情况,client 和 server都是centos 6.5。
在client上curl -v http://www.github.com可以看到:

* About to connect() to www.github.com port 80 (#0)
*   Trying 192.30.252.130... connected
* Connected to www.github.com (192.30.252.130) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: www.github.com
> Accept: */*
>
* Empty reply from server
* Connection #0 to host www.github.com left intact
curl: (52) Empty reply from server
* Closing connection #0

在server上通过tcpdump看到:

在正常通过server的IP与github建立连接后,确换成了用vpn client的IP来请求数据,这样服务端的返回不能正常接收导致了这种情况,求解决方案

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有