0

For example, I want squid to cache HTTP contents only for *.archive.ubuntu.com, which is blocked by firewall, and don't cache for other domains.

And, only LAN (192.168.0.0/16) users can access the cached contents, but all users are allowed to access non-cached contents.

User-IP              Dest-Domain                    acl             Expect   
----------------     -----------------------       ------      -------------------------                  
192.168.0.0/16       *.archive.ubuntu.com          allow       Cache Proxy, Fast
192.168.0.0/16       *.other                       allow       Pass Proxy, Slow     
Other                *                             allow       Pass Proxy, Slow
0

1 Answer 1

2

This is a bit of a dodge, but if you only care about auto-cacheing debian/ubuntu packages, try approx:

apt-get install approx

This requires that the clients be configured to download package lists from your proxy server, instead of the usual ubuntu servers but if you already use configuration management software like puppet or cfengine this is easy.

Your sources.list file would look something like this:

deb  http://my.proxy.tld:9999/ubuntu/  lucid  lucid main restricted universe multiverse
deb http://my.proxy.tld:9999/ubuntu-security/ lucid-security main restricted universe multiverse
...

And your approx.conf file like:

ubuntu http://us.archive.ubuntu.com/ubuntu
ubuntu-security http://security.ubuntu.com/ubuntu
...
1
  • 1
    apt-cacher-ng is another good apt repository proxy. Mar 2, 2011 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .