我的服务器上有两个以太网eth0和eth1。默认网关设置为eth0。我需要在php中使用fsockopen连接ip 10.10.6.2。ip 10.10.6.2是通过eth1路由的(我在路由-eth1上设置了一个规则)。当我试图从系统中切换那个ip时,我能够得到响应。但是,当我试图从php打开那个IP时,我会得到超时错误。我还启用了来自php.ini的php.ini
Warning: fsockopen() [function.fsockopen]: unable to connect to 10.10.6.2:5016 (Connection timed out) in /home/xxxxx/public_html/test.php on line 2
Connection timed out (110)有人能帮我解决这个问题吗?
发布于 2011-06-15 10:21:20
检查防火墙以允许10.10.6.2端口5016 (或任何需要连接的端口),您可以从web服务器telnet 10.6.25016尝试telnet,以确保它能够连接。
https://serverfault.com/questions/280610
复制相似问题