Install APT caching proxy

apt-get install -y apt-cacher-ng
 
# config
/etc/apt-cacher-ng/acng.conf
 
# restart service
/etc/init.d/apt-cacher-ng restart
 
# web interface
http://YOUR_IP:3142
 
# add to preseed config
d-i mirror/http/proxy string http://apt-cacher:3142/
 
# configure APT to use proxy
echo 'Acquire::http::Proxy "http://YOUR_IP:3142/";' >> /etc/apt/apt.conf.d/01proxy
apt-get update
 
# ssl
http://blog.packagecloud.io/eng/2015/05/05/using-apt-cacher-ng-with-ssl-tls/
 
# clear ?
/usr/lib/apt-cacher-ng/distkill.pl
 
# Links
http://www.unix-ag.uni-kl.de/~bloch/acng/
http://wiki.ubuntuusers.de/Lokale_Paketquellen/Apt-Cacher-ng
http://www.howtoforge.com/local_debian_ubuntu_mirror_p2