SSH Portforward? - SSH

This is a discussion on SSH Portforward? - SSH ; Hi guys, I have a problem with SSH and a remote shell. My internet provider doesn't allow any Public IP address : I have a lan ip address ...so all my traffic goes through nat....and I can't in anyway establish ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: SSH Portforward?

  1. SSH Portforward?

    Hi guys,
    I have a problem with SSH and a remote shell.
    My internet provider doesn't allow any Public IP address : I have a
    lan ip address ...so all my traffic goes through nat....and I can't in
    anyway establish a visible public webserver on my Ubuntu pc.
    I found that it should be possible using SSH and a remote shell (I
    have an account in a free one..whic allows using ssh for those
    things)... but how? I can't understand ...
    Thanks a lot in Advance!
    Bye


  2. Re: SSH Portforward?

    andrezz wrote:
    > Hi guys,
    > I have a problem with SSH and a remote shell.
    > My internet provider doesn't allow any Public IP address : I have a
    > lan ip address ...so all my traffic goes through nat....and I can't in
    > anyway establish a visible public webserver on my Ubuntu pc.
    > I found that it should be possible using SSH and a remote shell (I
    > have an account in a free one..whic allows using ssh for those
    > things)... but how? I can't understand ...
    > Thanks a lot in Advance!
    > Bye
    >


    If I understand you question, you want to do port forwading from the
    server to your webserver that run in your computer ?

    If you want that *everybody* can acess you website
    --------------------------------------------------
    Like someone that access: "http://the_server:8080" will really access
    "http://your_computer:80". If so.. it's better to use the firewall on
    the server (where the NAT is running). But with ssh, you can always do
    something like:

    ssh -g -R 8080:you_computer_lan_ip:80 user@nat_server

    When the ssh server must have "GatewayPorts" option enable.

    The port forward will work as long your ssh session is active. You can
    put it in background if you want, but it's harder to track if there's a
    session active of not. If you want enable this forward in time to time
    when you need and if the Administrator of the NAT computer want to
    enable the "GatewayPorts" options on the ssh daemon, it can work for
    you.

    Or in another case:

    If you want to access your website yourself from anywhere:
    ----------------------------------------------------------

    You can do _local_ port forwarding from some computer in the internet:

    ssh -L 8080:your_computer_lan_ip:80 user@nat_server

    And access your website via: http://127.0.0.1:8080

    good luck

    --
    Martin

+ Reply to Thread