希望我的 Firefox 可以使用从 vps 服务器转发的 localhost:9099 代理,为什么它不能这样工作?我总是得到bind: Address already in use
$ ssh -vfND 127.0.0.2:9099 vpn
OpenSSH_5.9p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Connection established.
debug1: Host is known and matches the RSA host key.
debug1: Next authentication method: publickey
debug1: Authentication succeeded (publickey).
debug1: Local connections to 127.0.0.2:9099 forwarded to remote address socks:0
debug1: Local forwarding listening on 127.0.0.2 port 9099.
bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 9099
debug1: Local connections to 127.1:8080 forwarded to remote address socks:0
debug1: Local forwarding listening on 127.0.0.1 port 8080.
debug1: channel 0: new [port listener]
debug1: Requesting [email protected]
debug1: forking to background
我在问题解决方案中添加了下一步。重复绑定已解决,这是本地计算机上的防火墙问题,现在我可以连接到我的 vps 服务器。但是当我在浏览器中打开 http 时,浏览器中的代理仍然无法工作
The connection was reset The connection to the server was reset while the page was loading. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
在远程机器(VPS)上我得到下一个
debug1: Connection to port 9099 forwarding to socks port 0 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [dynamic-tcpip]
debug2: channel 2: pre_dynamic: have 0
debug2: channel 2: pre_dynamic: have 837
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: dynamic-tcpip, nchannels 3
在远程机器上
# iptables -L -n -v
state NEW tcp dpt:9099
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 122 19030 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:17500 0.0.0.0:* LISTEN 1283/dropbox
tcp 0 0 0.0.0.0:55964 0.0.0.0:* LISTEN 848/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 837/rpcbind
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 5750/ssh
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN 5750/ssh
tcp 0 0 0.0.0.0:46165 0.0.0.0:* LISTEN 1568/skype
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 853/cupsd
tcp6 0 0 :::445 :::* LISTEN