port forwarding with ssh on linux

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

Threaded View

Hey all.  I'm sort of a linux and ssh newbie.  I've been using
anonymizer.com's secure tunneling
service on windows.  On windows I use the teraterm pro ssh client.  
But I'm having trouble getting port forwaring to work on linux.

Here's what I'm doing:
$ ssh -l username -p 22 -L 80:cyberpass.net:80 cyberpass.net
$ [ prompt for password ] [ enter password ]

I'm logged in with the greeting message.

Ok, now with mozilla I have manually configured the http proxy field
to listen
to localhost on port 80.

Now when I go surfing I'm able to download from the web perfectly.  
Except that the traffic doesn't
seem to be going through the remote server.  It seems that the
requests to web pages
are being made directly with my ip address.  

Now if I kill the ssh process I'll get an error in my browser and am
not able to
download anything(until I change the mozilla configuration to work
without a proxy).

This is strange, it seems it's using the ssh client in one way, but
not fully in the
way that it's supposed to.

Apache and an sshd process start by default on my Suse system so I
kill them
before I login to the remote ssh server.
I've also deactived my Suse personal firewall.  
It still doesn't work right.

I've also tried doing it as root and regular user.

I'm using Suse 7.3 if that matters.

Any help appreciated.


Re: port forwarding with ssh on linux

Try using the -D portnumber option to do dynamic port forwarding emulating
Socks proxy.
Then just point your web browser at the port declaring it a socks proxy

ssh -l username -D 8000 cyberpass.net

Quoted text here. Click to load it

Site Timeline