I realy hope that some of you can be so kind to use some time to help me.

We are bunch of people (110-170) who share a low bandwidht satellite connection to the internet. To optimize the user experience I have desided to make a web caching proxy. I am not interrested in making any sort of filtering/restrictions with the proxy, I only want to use it for caching web sites, windows updates etc. I have decided to use squid as our proxy server but I am having some problems.

Here is our setup/configuration:

First of I installet ebtables and bridge-utils with apt-get

I then edited the /etc/network/interfaces file to look like this:

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

Then i created a rc.local file in /etc/rc.local, in order to make a transparent bridged configuration and route trafic to squid.

My rc.local file:

#!/bin/sh -e

brctl addbr br
ifconfig eno1 promisc up
ifconfig enp1s10 promisc up
brctl addif br0 eno1
brctl addif br0 enp1s10
ip link set br0 up
ip addr add brd + dev br0
route add default gw dev br0

ebtables -t broute -A BROUTING -p IPv4 --ip-protocol 6 --ip-destination-port 80 -j redirect --redirect-target ACCEPT
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 8080

Then i installed squid3. Here is where hell broke loose! after a lot of testing i ended up with this squid.conf file:

cache allow all
maximum_object_size 6 GB
cache_dir ufs /media/squid/cache 180000 16 256
cache_mem 2 GB
http_port 8080 transparent
http_access allow all

The result is that a few http sites loads fine and are shown correct on client pc's. I can see in /var/log/squid/access.log that squid are trying to cache the web site, but im not sure if the sites get cached. Others http sites like cnn.com and a lot of other sites just keep loading, and never show the site.

Here is an example from /var/log/squid/access.log on two sites that wont load:

1480732656.840   2142 TCP_MISS/301 326 GET http://apple.com/ - ORIGINAL_DST/ text/html
1480706099.842   1973 TCP_MISS/301 550 GET http://cnn.com/ - ORIGINAL_DST/ -

And here is an example on a site that loads fine (rejseplanen.dk):

1480733410.130   4287 TCP_MISS/200 28485 GET http://www.rejseplanen.dk/bin/query.exe/mn - ORIGINAL_DST/ text/html
1480733412.222   1765 TCP_MISS/200 713 GET http://eas8.emediate.eu/eas? - ORIGINAL_DST/ application/x-javascript
1480733412.222   1763 TCP_MISS/200 713 GET http://eas8.emediate.eu/eas? - ORIGINAL_DST/ application/x-javascript
1480733414.456   1826 TCP_MISS/200 1058 GET http://gadk.hit.gemius.pl/_1480733148946/rexdot.js? - ORIGINAL_DST/ application/x-javascript

I have started to go blind on this problem. I realy hope that any of you guys can help me out.

  • Any help would really be appreciated. i'm still stuck here... – Wilm Dec 4 '16 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.