I have a shell account (Debian) and I want all my localhost browser internet traffic to go through that shell account.

I know how to configure the internet browser and how to configure Putty for port forwarding, what I do not know is what I need to do on the server for this to happen.

Anyone knows what I should do on the server so that it will accept port forwarding? It does not seem to work with the default configuration.

link|improve this question
Are you using something like: ssh -l username -L localport:server:port sshserver? – l0c0b0x Jun 11 '09 at 21:22
That is local port forwarding it will not allow the OP to tunnel all internet traffic, just the specified server will be browseable thru the tunnel created this way. The OP is probably looking for a SOCKS proxy which is perfectly doable with SSH – Server Horror Jun 11 '09 at 22:11
feedback

3 Answers

Inside the sshd_config file just change the #PermitTunnel setting from no to yes.

from

#PermitTunnel no

to

PermitTunnel yes
link|improve this answer
1  
...and recycle sshd. – David Mackintosh Jun 11 '09 at 22:04
feedback

I want all my localhost browser internet traffic to go through that shell account.

ssh -D 8080 -T -f -l username proxy_host
  • Will create a dynamic port forwarding (SOCKS proxy).
  • -T will not allocate a tty
  • -f will make SSH to go immediately into background
    • For this to work you need to use public key authentication
    • at least on debian have a look at ssh-copy-id
  • Now you just need to configure your browser to go thru the specified port

Leave out -Tand -f while testing the setup. The local port forwarding (-L [listenaddress]:localport:remotehost:remoteport ssh_host) will only work for the remotehost (e.g. ssh -L 8080:google.com:80 ssh_host will only forward traffic to google.com over the ssh_host not all web traffic)

If that doesn't work please update your question with the output of the SSH command with the -vvv switch added.

link|improve this answer
feedback

This article seems to have a lot of detail and should answer your question:

http://polishlinux.org/apps/ssh-tunneling-to-bypass-corporate-firewalls/

or there is always Wikipedia: http://en.wikipedia.org/wiki/Tunneling_protocol

link|improve this answer
feedback

Your Answer

 
or
required, but never shown