4smarkov
By:
4smarkov

Why did my ssh tunnel stopped working?

November 20, 2015 2k views
Getting Started Debian

I had successfully setup and used ssh tunneling through socks proxy right after creating droplet first time. It worked with both windows and linux. After a break i tried using my setup again and it didn't work. I rebuilt droplet to start fresh and tried connecting from both win and linux, home and work with no success. I am using NYC server. Any ideas?

1 Answer

@4smarkov

Have you verified that AllowTcpForwarding is set to yes instead of no in your SSH configuration? If so, what are you using to connect and what command(s) did you use for setup?

  • I added following to /etc/ssh/sshd_config as those were not originally
    present:
    AllowTcpForwarding yes
    GatewayPorts yes

    To connect from linux i used following:
    ssh -D 8888 myuser@45.55.78.99
    or
    ssh myuser@45.55.78.99 -D 8888
    then i changed browser's proxy settings to localhost:8888 and apply for all
    protocols.

    • @4smarkov

      I just spun up a test Droplet and was able to connect after configuring Chrome & FireFox to accept the SOCKS 5 connection using 127.0.0.1 and port 8888 (tested with localhost as well, both worked).

      I'm actually posting this message through the SOCKS 5 connection :-).

      --

      PuTTy was setup like so: http://imgur.com/ufuaKdP

      --

      The only thing I added to the SSH configuration file, however, was:

      AllowTcpForwarding yes
      

      --

      Which browser are you using? I don't have Debian installed local right now, otherwise I'd test it on my Linux box too, though short of a potential issue with the Firewall (if enabled), or port 8888 being blocked locally (on your end), all should work :-).

      --

      On Windows, only PuTTY was used. I connected to the Droplet via PuTTY and minimized the window (keeping it active), though no other commands were issued.

Have another answer? Share your knowledge.