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

I have an externally hosted CentOS 5 server (external.host.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.host.com instead of local.host.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:

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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
    Allow from YOUR.IP.ADDRESS.HERE
</Proxy>

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.

share|improve this answer
    
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. –  Esteban Brenes May 2 '09 at 5:07

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.