After reading this:
I immediately removed the portforwarding in my router. I would like to access the webui from my Windows laptop when I am not at home, using an SSH tunnel.
The Windows laptop has Putty.
I tried so many different guides, but still cannot get it to work.
- Cubox-i (similar to a Raspberry Pi2) running OpenElec with Syncthing installed. At home I can easily reach the webUI via 192.168.x.x:8384.
- In my home router, Wan port 2211 is forwarded to the server port 22
- I have a dynamic dns forwarding, myname.cjell.dk automatically forwards to the IP address of my home.
Outside of the network on Windows:
- Using Putty I can SSH into my server simply by connecting to email@example.com with port 2211
Now I want to set up the SSH tunnel to access the Syncthing webUI:
and next I go to sessions, hit the save button and then open the connection to my server as usual:
I get to see the terminal window, fill in my password.
But when I go to my browser
localhost:80 or 127.0.0.1:80 do not respond. So the tunnel is not setup!
What am I doing wrong and/or how can I investigate what is going wrong?
You may not be able to bind to port 80 locally depending on whether you’re an administrator and so on. Try a port number over 1023 (like the default 8384) and see if that helps.
I only try port 80 because all other attempts did not work with other ports like 9000, 9999. I also tried 1023, same thing
edit: I also tried doing it all again but connecting my laptop to my phone’s Wifi hotspot, using 4G. This way I am sure there are no funky firewalls in between. But unfortunately, same result.
Can you get verbose output from ssh?
Not sure how to do that? I can run putty from Windows cmd using:
putty -v -load mysavedsession
but there is no difference in behavior.
I just rebooted the server and now I notice different behavior (using port 1029):
after I open the SSH connection and fill in the password, it seems the tunnel is working for a few seconds. It takes some time, but the browser then does ask for a login (I activated login in Syncthing). Unfortunately after 10-30sec, the Putty/SSH window shows a popup: fatal error. It looks like this happens when I try to access the webUI.
EDIT: the SSH tunnel works fine (127.0.0.1:1029 in my browser) when I am at home connected via wifi to the same router as the server! when I connect my laptop to my phone wifispot, it I get the above described behavior.
I don’t have a windows machine to test this, but it looks like you can run putty’s ssh client from the console, and switch on verbose output in the command invocation.
I found some information here:
The example given on that page:
putty -L 5110:popserver.example.com:110 -load mysession
So, try adding
-v like this
putty -v -L 5110:popserver.example.com:110 -load mysession
via windows CMD with admin rights, ran the command, but there is no verbose output at all.
Same thing happens: Firefox seems to connect:
- I get a HTTPS security warning and have to add an exception which
makes total sense
- then I have to fill in my Syncthing user/pw
- then it loads forever
- after a minute or so, the SSH window gives the error message.