Date: Wed, 19 May 2004 11:41:39 +0900 From: Rob <stopspam@users.sourceforge.net> To: freebsd-questions@freebsd.org Subject: Q: ifconfig alias vs. ssh tunnel doesn't work. Message-ID: <40AAC963.7020306@users.sourceforge.net>
next in thread | raw e-mail | index | archive | help
Hi, I use an ssh-tunnel from a PC on a local network behind a gateway to another PC on the internet. Say the PC behind the gateway is LOCAL and the other internet PC is REMOTE. On LOCAL I do as a regular user: $ ssh -2 -N -f -R 2201:127.0.0.1:22 REMOTE Then on REMOTE I can then do: $ ssh -p 2201 127.0.0.1 All this works fine for login from REMOTE to LOCAL, bypassing the gateway. ------------------------------ I then want the following to work. On REMOTE I do, as root: # ifconfig lo0 alias 127.0.0.2 # ifconfig lo0 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 inet 127.0.0.2 netmask 0xff000000 To double check, I verified that I can login to myself on REMOTE: $ ssh REMOTE On REMOTE I then want to login to LOCAL, as regular user: $ ssh -p 2201 127.0.0.2 ssh: connect to host 127.0.0.2 port 2201: Connection refused Can somebody explain to me why the ssh-tunnel does not work this way? Thanks, Rob.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40AAC963.7020306>