Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to set up the simplest system to be able to proxy from my Firefox via one of our Ubuntu servers.

Initially http/s ports would be enough and it would only happen from 2 concrete IPs (office and home). The server already has a complex IPTables firewall configuration so I really don't want to go via the Squid or Shorewall routes that I've seen published here. I do not need that many features, ACL, cache, etc... just sufficient IPTables rules (or alternative software) so I can set up a proxy on my Firefox and connect via that server. I know an SSH tunnel can be done but no idea how to make Firefox speak with my local SSH and use it as a proxy.

Any help or links would be appreciated.

share|improve this question
    
I don't understand why you need to do this. Do you need to setup a proxy server? –  Khaled Oct 31 '10 at 11:00

1 Answer 1

up vote 1 down vote accepted

EDIT: For windows, you can try

http://blogs.techrepublic.com.com/security/?p=421

Below instructions for Linux :)

Set up a dynamic proxy using ssh:

ssh -D 8080 yourserver

Update the proxy settings in firefox. Look under Preferences, Advanced icon, Network tab, then the Settings button under connection. Change your proxy connection to manual, then put 127.0.0.1 as your SOCKS host and the port as whatever you used in the ssh -D command.

You can script it all up by creating a second Firefox profile, let's say it's called "proxy". Then set up a script to handle it all:

#!/bin/bash
ssh -N -D 8080 yourserver &
firefox -no-remote -P proxy
kill %1

I'll leave it up to you to decide if this is all within the bounds of your local security policy.

share|improve this answer
1  
+1, but I have 2 notes: (1) Although the particular port number used doesn't really matter, the canonical SOCKS proxy port is 1080, not 8080. (2) Go into Firefox's about:config and set network.proxy.socks_remote_dns to true. This will force DNS queries to resolve from the remote side of the proxy (so that DNS query traffic appears to come from the same place as the browser requests). –  Steven Monday Oct 31 '10 at 15:43
    
Thanks. This works (I was not using before the SOCKS proxy option when setting up Firefox). Just clarify that you need to make sure TCP forwarding is enabled on the remote server. –  luison Nov 1 '10 at 0:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.