I have an externally hosted CentOS 5 server (external.example.com) that I want to use as a relay/proxy for my local web requests. So basically, if I load google.com on my local computer I'd like for the request to appear to Google as if it was coming from external.example.com instead of local.example.com.

I believe what I need is to setup the external server as a proxy and then configure my browser to use it as a such when browsing. Is this correct? If not what is the solution I should aim for?

I've been looking at applications like Squid, Tor or HAProxy. Would any of these work for this task?

Edit: I followed these tutorials to install Squid on CentOS 5:

2 Answers 2


Squid is what you want. Configure it to allow requests from whatever IP address you're using, and just configure your local machine to use it as it's HTTP proxy.

For added security (both from abuse and transport layer observation), install OpenVPN at both ends and configure squid to only allow requests from the VPN IP. That's how I do it.


There are many proxy servers you could choose from, but for simplicity, I would suggest enabling mod_proxy on Apache, as you most probably already have it installed on that CentOS and it works great. Just uncomment these lines on /etc/httpd/conf/httpd.conf

<IfModule mod_proxy.c>
ProxyRequests On

<Proxy *>
    Order deny,allow
    Deny from all

and restart httpd.

You can skip the <Proxy>..</Proxy> part, but I recommend enabling some sort of access control (IP based on the example).

Then configure your browser to use the proxy server on port 80.

  • I think I would follow this route, except I haven't gotten around to properly configuring and enabling Apache, though it is installed. Maybe I should do that next. Commented May 2, 2009 at 5:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .