We run a few society websites behind a University firewall that mandates that all traffic goes through an internal squid cache / proxy.
While export http_proxy= works perfectly in the shell I'm wondering if there's a similarly easy way to force PHP applications, such as MediaWiki and Wordpress to use and recognise that environment variable. We're running Debian 5.
I found a way to do it once without having to use a local transparent proxy... I just can't remember how.
-
This could be achieved through using iptables / netfilter http://www.netfilter.org/
oliland : I've gotten this far: iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination ###.###.###.###:3128 However as soon as that rule is added, the web site falls over as it forwards *inbound* traffic to the cache. Is there a way to modify that rule so that it only applies to outbound traffic?From Keiran Holloway -
On the router, only allow outgoing port 80 connections (or possibly *all ports) from the squid box (and other whitelisted servers). For preference you might want to think about how to prevent address spoofing (e.g. using IPSEC or a VPN between the whitelisted machines and the router).
C.
From symcbean
0 comments:
Post a Comment