0

So I a using the ssh installed with git on Windows.
I am trying to forward a port on my internal network server which is also my ssh server. I have exposed my network server on a forwarded port on my router. When I try to forward using this command I get a connection reset on my web service on my server.

ssh -nNT -p <port on router> -L 8000:192.168.0.22:8000 <sshuser@router>

I can log into ssh normally. So I am really confused. the 192.x.x.x address is the internal ip of the server. On a browser I try to connect to the 127.0.0.1:8000. It says the connection is reset. I assume it is being refused. So it tries to connect to something, but it fails.

I can connect to the web server from within the internal network via 192.168.0.22:8000. Really confused as to what is failing here.

Comments
  • 1
    I see words and numbers but I’m much too burned out to make any sense of them.
  • 1
    Don't use nNt when it doesn't work.

    You cannot see what is happening....

    And SSH in background needs to be killed.

    Check with ps -Af or sth. like that if there you've spawned several SSH processes.

    To debug stuff like that, as it can be cumbersome, use ssh with at least 2 V's (ssh -vv ... ).

    It will print out a lot...

    It's hard to tell from the post alone, but connection reset could e.g. mean that the webserver has an IP filter (or the web framework used).

    Do you have checked the webservers logs for access?

    It's most likely sth. very trivial...
  • 0
    @theKarlisK

    > are you trying to reach the server from outside your local network?

    I am trying to forward a web server that is not very secure over my ssh. I only want to expose the ssh. ssh is forwarded via the router to the outside. Now I want to forward the web server behind the router so I can see if with a browser.

    @IntrusionCM -vv helped see what was happening. It doesn't fail anywhere. Its is a custom minecraft management web system. I am unsure if it has filtering.
  • 0
    So according to this answer ssh "might" be using UDP during tunneling:

    https://superuser.com/questions/...

    So that might explain some things. I only have tcp open for my ssh port.

    Also, I tried redhats solution to do a proxy and it fails:

    https://redhat.com/sysadmin/...
  • 1
    Sounds fishy.

    Never heard of SSH using UDP, only alternative solutions like mosh.

    You can try starting iperf server with TCP and see if you can reach that via tunnel.
Add Comment