| Linode Forum https://forum.linode.com/ |
|
| Using Squid as a transparent *outgoing* proxy https://forum.linode.com/viewtopic.php?f=19&t=8920 |
Page 1 of 1 |
| Author: | mattb [ Sun May 27, 2012 6:18 pm ] |
| Post subject: | Using Squid as a transparent *outgoing* proxy |
Hey guys, I'm fairly new to the world of proxies, and I've tried to follow a guide but ended up with a (not working) reversely configured proxy to the solution I want. My web server is going to be making lots of API calls to several websites and so I'd like for it to cache those calls locally. I don't want incoming user traffic to go through the proxy. I'm running Ubuntu 10.04LTS, with the latest version of Squid installed from apt. I followed this: http://www.ubuntugeek.com/how-to-setup- ... buntu.html But of course this ended in my requests to myserver.com hitting a squid error page. Could anyone assist me configuring squid for my needs? |
|
| Author: | AGWA [ Mon May 28, 2012 9:22 am ] |
| Post subject: | |
You want iptables to affect only outgoing traffic, so the ONLY iptables rule you should use is: Code: iptables -t nat -A OUTPUT -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 I'm no Squid expert so you may need to tweak the Squid settings as well, but this rule will at least get outbound HTTP traffic (and only outbound HTTP traffic) redirected towards Squid. (Make sure you remember to remove the old iptables rules.) |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|