[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh tunnelling testing



On 2020-12-07 13:55, der.hans wrote:
Am 07. Dec, 2020 schwätzte Gary Dale so:

moin moin,

First off, try one or more -v to your ssh command to get more verbosity.

The -v will show you the step in building the connection that failed.

Also, try -G to see what configuration will be used without actually
opening a connection.

I'm running Debian/Buster on various servers, including my home server. I'm trying to set up an ssh tunnel that I can use post-pandemic in case I need to access my home network remotely. I'm already doing this to various remote servers so I thought this should just work, since I can already access my home server locally using its 192.168... address (actually through the /etc/hosts file using the server's name).

You can access it locally, so the ssh daemon is listening to the external
IP on your system rather than just localhost and basic authentication is
working.

Do you have a firewall on the ssh server? If so, does it allow ssh
connections from your internal router?

I've set up port forwarding on both my routers (I have an inner network and an outer one, using the outer network for devices I don't really control). I can access my Apache2 server on the inner network by forwarding port 80 on the outer network to the WAN address of the inner router and forwarding that to my server. Pointing my browser to the external IP address of the outer router brings up the default page - which I can change so I know it's the actual local page.

However, when I try to ssh to the same address, it just times out.

Internet <--> Outer Router <--> Inner Router <--> ssh/apache server

That's what you have?

You have port forwarding from 80 and 22 on the Outer Router going to the
Inner Router and from the Inner Router to your server?

Can you see the connection transverse your routers?

Also, if you have a reliable shell at a provider that allows incoming SSH
connections and SSH tunnels, you could setup an autossh connection to that
that builds a reverse tunnel to your internal server without needing to
open any firewall ports.

ciao,

der.hans

I've compared the sshd.conf file on my local server to one on a remote server and they are identical. The only uncommented lines are:

PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem       sftp    /usr/lib/openssh/sftp-server


Any ideas on what's going wrong?

All good advice - just a little late. Thanks.


Reply to: