# [Solved] How do i tunnel my browser via ssh

## mtascii

Hello

i was wondering if it is possible to tunnel my browser via ssh.

i have a root server and want so surf over it.

and is it possible to implement an exeption somehow?

for the local network.Last edited by mtascii on Thu Aug 17, 2006 9:40 pm; edited 1 time in total

----------

## jk3us

ssh to the remote host specifying a "Gateway" port, this creates a secure Socks4 interface to the other end of the ssh connection.

```
ssh -D 9999 remote.host
```

And tell your browser to use a socks4 proxy of localhost:9999.  For firefox, this is in edit -> preferences -> General -> Connection Settings.  You can specify exceptions to the proxy there.

----------

## mtascii

thx

----------

## gustafson

Is there a way I can automatically set the firefox proxy via script or text file?  When browsing over wireless, I want to go through my wired machine as proxy... but not otherwise.  It is a drag to have to click around in firefox to set the proxy... it would be better if firefox would check the connection and set the proxy automatically.

Thanks,

----------

## jk3us

 *gustafson wrote:*   

> Is there a way I can automatically set the firefox proxy via script or text file?  When browsing over wireless, I want to go through my wired machine as proxy... but not otherwise.  It is a drag to have to click around in firefox to set the proxy... it would be better if firefox would check the connection and set the proxy automatically.
> 
> Thanks,

 

Maybe this will do what you want: https://addons.mozilla.org/firefox/125/

----------

## gustafson

Thanks

----------

