Q: ifconfig alias vs. ssh tunnel doesn't work.

From: Rob (stopspam_at_users.sourceforge.net)
Date: 05/19/04

  • Next message: Rob: "Re: Q: ifconfig alias vs. ssh tunnel doesn't work."
    Date: Wed, 19 May 2004 11:41:39 +0900
    To: freebsd-questions@freebsd.org
    
    

    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.

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Rob: "Re: Q: ifconfig alias vs. ssh tunnel doesn't work."

    Relevant Pages

    • Joining Networks over the Internet with a Gateway to Gateway VPN - Loose Internet Browsing
      ... remote VPN clients. ... Gateway properly (all you know is that they can't use the ... >My Configuration: ... >can navigate in the Internet without problems. ...
      (microsoft.public.isa)
    • Re: Can I run an Internet web server from a Win2K computer?
      ... internet and then back in on your static IP address. ... but the remote IP is usable only remotely. ... So if the packet sets off from your PC it either a) goes straight to the destination machine, or b) goes to the default gateway if the address is NOT a local one. ...
      (microsoft.public.win2000.general)
    • Re: VPN and remote gateway
      ... 317025, we could know that if you use local gateway, your internet connection will not be a problem, but, you could not access your ... remote network since there is no route between you computer and your remote company network. ...
      (microsoft.public.windows.server.sbs)
    • Re: rras routing gateway of last resort
      ... For the remotes to get to the Internet, ... > I understand the use gateway on remote option. ... > internet interface to recieve VPN traffic. ... >> the gateway on the remote system or you don't. ...
      (microsoft.public.win2000.ras_routing)
    • Re: rras routing gateway of last resort
      ... I understand the use gateway on remote option. ... When I do that then no one can connect to the internet address ... gateway of last resort is removed you can connect again but the client ...
      (microsoft.public.win2000.ras_routing)