christopherrowson at gmail.com
Tue Nov 27 20:18:45 GMT 2007
> So if squid is running on a server which is connected to the internet and
> all the computers connect to squid proxy on (for example)port 8000, is squid
> sharing the internet connection or not?
Lets assume for the moment, that you have an office with a 12 port
router which is in turn connected to a modem. The router has 6 PCs and
1 server patched into it.
Internet ---> Modem ---> Router ---> 6x PCs 1x Server
In this case it's the router that's doing the internet connection
sharing. If we disable the proxy settings on a PC, it should still be
able to get to the Internet because the router is doing the connection
You could have a setup like this instead.
Internet ---> Modem ---> Server ---> Router ---> 6x PCs
In this case the server has 2 network interface cards (NIC). One card
connects exclusively to the Ethernet (out) port on your modem device,
and one connects to the router.
In this case you need a script which sets up some iptables rules to
divert all of the traffic coming in on the network facing NIC and
divert all traffic *other than port 80* to the Internet facing NIC.
The script sends all port 80 traffic to port 3128 (or whatever) on the
squid server (which does what it has to do with the traffic then
returns cached data or sends the request on it's merry way to the
All you now have to do is set the ip address of your server as the
gateway address for your PCs.
You now have a transparent proxy server. You don't have to set proxy
settings in your PC anymore as all traffic goes through the server. In
a way, I guess you could say that your PC is now 'sharing your
If you want to implement a transparent proxy server, luckily enough I
documented what I did the last time I needed to do it. It's here:
Does that clear things up any for you?
More information about the ubuntu-uk