Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am on a network where outgoing port 8080 is blocked on most machines (i.e. I cannot access services on port 8080).

Some of the machines on the network however do not have this restriction.

I would like to run a proxy on an unrestricted machine and forward outgoing requests to 8080 via that proxy.

I do not have root access on any of these machines.

I have looked at squid, which compiles fine on the machine I want to run the proxy on, but as it is a service I do not think I can run it effectively without root access.

I have also experimented with ssh port forwarding, but as there is no service running on the unrestricted machine I don't think ssh will solve my problem.

If there is some other way to achieve this objective I am open to that too.

share|improve this question
up vote 3 down vote accepted

Not having root privileges prevents you from listening on ports below 1024 on typical Linux systems.

Thus, Squid should work OK as non-root listening on 8080 as long as the system you are on hasn't blocked incoming traffic on that port via a firewall or iptables.

Not sure how many file descriptors Squid uses typically but if your admin has set a limit for that, that could be an issue, as well as other things. If you are using Squid's filtering feature (such as the adzapper script, for example) - be aware Squid spawns a process for each incoming HTTP request and if your account has a process limit you may hit it. (It might do the Apache pre-fork thing as well, it's been awhile since I played with squid.)

To port-forward in the manner you are describing, you need some type of forwarder, tunneler or proxy running on the first machine forwarding to the second machine. So you would "SSH tunnel" into the unrestricted machine, and you need a program running on the unrestricted machine that accepts traffic on a port and then "reforwards" it to another host. Your tunnel then has 2 hops. Possibly rinetd could do this for you easily.

share|improve this answer
Okay I will keep playing with squid and see if I can get it working – jsj Sep 9 '12 at 12:52

Your Answer


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.