我刚刚build立了一个新的10.04服务器,不能让隧道工作。
本地机器
> ssh -L 9090:localhost:9090 [email protected]
login成功,但之后从本地浏览器( http://127.0.0.1:9090)尝试隧道
在服务器terminal回显:
channel 3: open failed: connect failed: Connection refused
auth.log sshd [24502]:error:connect_to localhost port 9090:failed。
iptables -L链INPUT(策略ACCEPT)目标protselect源目的地
链FORWARD(政策接受)目标保护select源的目的地
链OUTPUT(策略ACCEPT)目标protselect源目的地
在服务器尝试9090(链接http://xx.xxx.xx.xx:9090作品)
sshd_config与以前的8.04服务器是一样的,工作正常。
这是怎么回事? 感谢任何input。
问候,
//Ť
详细输出(-vvv)。
login成功。 根据本地浏览器的隧道请求,在服务器端:
ebug1: Connection to port 9090 forwarding to localhost port 9090 requested. debug2: fd 9 setting TCP_NODELAY debug3: fd 9 is O_NONBLOCK debug3: fd 9 is O_NONBLOCK debug1: channel 3: new [direct-tcpip] channel 3: open failed: connect failed: Connection refused debug2: channel 3: zombie debug2: channel 3: garbage collecting debug1: channel 3: free: direct-tcpip: listening port 9090 for localhost port 9090, connect from 127.0.0.1 port 57884, nchannels 4 debug3: channel 3: status: The following connections are open: #2 client-session (t4 r0 i0/0 o0/0 fd 6/7 cfd -1) debug3: channel 3: close_fds r 9 w 9 e -1 c -1
请注意,9090港口回复
# links 127.0.0.1:9090
在工作机器上:(8.04)
要求:
debug1: Connection to port 9090 forwarding to localhost port 9090 requested. debug2: fd 10 setting TCP_NODELAY debug3: fd 10 is O_NONBLOCK debug3: fd 10 is O_NONBLOCK debug1: channel 3: new [direct-tcpip] debug2: channel 3: open confirm rwindow 2097152 rmax 32768 debug2: channel 3: rcvd eof debug2: channel 3: output open -> drain debug2: channel 3: obuf empty debug2: channel 3: close_write debug2: channel 3: output drain -> closed
认为// t
基于这个线程,我认为你的问题的原因可能是Apache,而不是sshd。
尝试将您的httpd.conf文件中的Listen指令更改为
听127.0.0.1:9090
之后重新启动httpd,看看是否有任何区别。
解决了:
这是一个政策问题。 在服务器端,在9090请求的服务没有响应
telnet localhost 9090
只在:
telnet 127.0.0.1 9090
解决scheme是将其添加到/etc/hosts 。
127.0.0.1 localhost localhost.localdomain