2

So I wrote a java app that connects to a server in a reverse way (-R) and creates a ssh server where it is executed so the server can execute commands in the client that executed my app. That part work perfectly. The problem is that I want to create a SOCKS proxy in the server and tunnelize the traffic through the client. The command I am using is:

ssh -vvv -f -D 0.0.0.0:8080 localhost -p 11707 -N

I am receiving this error:

debug1: Connection to port 8080 forwarding to socks port 0 requested.
debug2: fd 5 setting TCP_NODELAY
debug2: fd 5 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 1: new [dynamic-tcpip]
debug2: channel 1: pre_dynamic: have 0
debug2: channel 1: pre_dynamic: have 4
debug2: channel 1: decode socks5
debug2: channel 1: socks5 auth done
debug2: channel 1: pre_dynamic: need more
debug2: channel 1: pre_dynamic: have 0
debug2: channel 1: pre_dynamic: have 25
debug2: channel 1: decode socks5
debug2: channel 1: socks5 post auth
debug2: channel 1: dynamic request: socks5 host www.cualesmiip.com port 80 command 1
channel 1: open failed: administratively prohibited: Connection denied
debug2: channel 1: zombie
debug2: channel 1: garbage collecting
debug1: channel 1: free: direct-tcpip: listening port 8080 for www.cualesmiip.com port 80, connect from 4.174.29.15 port 50879, nchannels 2
debug3: channel 1: status: The following connections are open:

I have AllowTcpForwarding set to yes in the ssh server that is receiving the connections.

Where can be the error?? Thank you

Reaces
  • 5,597
  • 4
  • 38
  • 46
Alberto
  • 121
  • 2

1 Answers1

-2

Set the GatewayPorts option to yes within the sshd_config.

GatewayPorts yes

Anon
  • 1