SSH Portforward?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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 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!

Re: SSH Portforward?

Quoted text here. Click to load it

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

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:

good luck


Site Timeline