O caminho certo para o encaminhamento dinâmico de porta ssh

3

Desejo que meu Firefox use o proxy localhost: 9099 encaminhado do servidor vps, por que ele não funciona dessa maneira? Eu sempre recebo 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

Eu adiciono o próximo passo na minha solução do problema. A ligação duplicada é resolvida Era uma questão de firewall na máquina local, agora eu posso ficar conectado ao meu servidor vps. Mas proxy no navegador ainda não funciona quando eu abro um http no navegador eu recebo

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.

e na máquina remota (VPS) eu recebo o próximo

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

na máquina remota

# 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      
    
por Yurij73 24.01.2013 / 14:59

0 respostas