Server Fault is a question and answer site for system and network administrators. 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 want to be able to access a website that is IP restricted outside the UK from my cable DSL in Germany.

A friend of mine set up a proxy server in the UK that whitelists my dedicated Debian server at a German hosting company. Since my cable DSL IP changes everyday this was the simplest setup for him.

Now, on my side I would like to set up a proxy frowarder on my dedicated Debian server to his UK proxy, in order to be able to whitelist my cable DSL IP when I need to access the particular website. I have no access to the proxy itself, apart from my Germand dedicated server's IP being whitelisted for it.

A graphic illustrates the setup:

DSL at home <------> German dedicated server <--[permitted to access]--> UK proxy <-----> UK restricted website

What tools would you recommend to set up a proxy forwarding of the UK proxy at my German dedicated server, so that my German dedicated server becomes a transparent proxy that forwards to the UK proxy? As said it is a full blown Debian system. I tried netcat port forwarding, but that didn't work.

share|improve this question
up vote 1 down vote accepted

Maybe I don't understand your question here, but how about squid that you already tagged?

client -> transparent proxy GER -> transparent proxy UK -> some site that only work for UK clients

share|improve this answer
I'm just wondering if there are other options, squid sounds fine, but probably there is something simpler? – garbeam May 19 '11 at 10:29
I found this working well: sudo sysctl net.ipv4.conf.all.forwarding=1 sudo iptables -t nat -A PREROUTING -j DNAT -i eth0 -p tcp --dport 3128 --to-destination a.b.c.d:3128 sudo iptables -t nat -A POSTROUTING -p tcp -d a.b.c.d --dport 3128 -j SNAT --to-source w.x.y.z a.b.c.d is the proxy, w.x.y.z is the whitelisted host – garbeam May 19 '11 at 15:02

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.