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've set up a proxy server on AWS in the US in order to allow me to browse the american internet from the UK, however I would like to hide this so that the reverse end cannot detect I am using squid. Is this possible, and if so, how?

share|improve this question
BTW - the fact you're using squid shouldn't matter. Lots of offices will have traffic routes through a squid server where ever they are in the world. I can't think of a site which has ever blocked me due to using a proxy. Perhaps your guilty conscience is making you feel a little paranoid :-) – Coops Mar 1 '11 at 21:54
This is good to know! The main purpose is to get websites that are showing content based on geolocation to show me American content (rather than UK content, where I am based). So far though, with these settings, it appears to be working! – chrism2671 Mar 3 '11 at 13:25
up vote 11 down vote accepted

You can inhibit X-Forwarded-For with

header_access X-Forwarded-For deny all

in squid.conf

this is all I've required but further headers you may wish to deny are at

share|improve this answer
and also it's good to add "via off" – luchaninov Dec 19 '14 at 12:42
Since squid3 you need to use request_header_access instead of header_access (it's deprecated) – kazy Aug 18 '15 at 15:56

This is straight from my squid.conf:

#Privacy Things
via off
forwarded_for off
follow_x_forwarded_for deny all

Since version 3.0 you need to build squid from source for these limitations to work with some special flag for './configure'. This is how I build mine:

./configure --enable-http-violations --prefix=/usr --includedir=/usr/include \
  --datadir=/usr/share --bindir=/usr/sbin --libexecdir=/usr/lib/squid        \
  --localstatedir=/var --sysconfdir=/etc/squid --enable-auth="ntlm,basic"    \

(CentOS 5.5)

share|improve this answer
(note from Seanp2k: on my system, Ubuntu 11.04, Squid3 was able to do this without recompiling) – Iain Jul 30 '11 at 19:55
Possible. Depends on the version in the repositories. – Bart De Vos Jul 30 '11 at 21:53
I prefer "forwarded_for delete" instead of "off" – dustmachine Mar 1 '13 at 17:47

Have you considered setting up a VPN to the AWS instance instead of setting up Squid? Then route traffic through the AWS instance, which would avoid squid and be undetectable. Just throwing it out there. That's exactly how a friend of mine set up a VPS in the UK to access the BBC.

share|improve this answer

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.