During the process of building and rebuilding lots of customized Kali ISO images, I noticed a problem with the instructions on http://docs.kali.org. When I didn't see anywhere on the site to submit changes I figured this would be the best place.

Right now the problem is in the commands listed under "Speeding up future builds" on this page: http://docs.kali.org/downloading/liv...ustom-kali-iso where it says:

Code:
apt-get install apt-cacher-ng
/etc/init.d/apt-cacher-ng start
export http_proxy=http://localhost:3142/
.... # setup and configure your live build
lb build
The way this is written, it does cache the first part of the build process, but not the bulk of it. I confirmed this by setting up another machine as the apt-cacher-ng proxy, pointing http_proxy at that IP address, and using TCP dump to see where apt traffic was headed. In the beginning it all went through my proxy. Later it all went straight to the Internet, ignoring the proxy. Not only that, but it did it on all the repeated builds I did.

Fixing the problem is easy (and confirmed by the documentation for the lb command, which you can find here: http://live.debian.net/manual/curren...al.en.html#469 ). All you have to do is add an "lb config" command before your "lb build" command like so:

Code:
apt-get install apt-cacher-ng
/etc/init.d/apt-cacher-ng start
export http_proxy=http://localhost:3142/
.... # setup and configure your live build
lb config --apt-http-proxy http://127.0.0.1:3142/
lb build
After this change, all apt-get traffic related to the build process will go through the proxy, saving you significant time and bandwidth.