_amd64.changes
Exporting indices...
pkgrepo@kali:~/reprepro$ find pool
pool
pool/main
pool/main/o
277
Chapter 10 — Kali Linux in the Enterprise
pool/main/o/offsec-defaults
pool/main/o/offsec-defaults/offsec-defaults_1.0.dsc
pool/main/o/offsec-defaults/offsec-defaults_1.0.tar.xz
pool/main/o/offsec-defaults/offsec-defaults_1.0_all.deb
As you can see, it added the files into its own package pool in a
pool
sub-directory.
The
dists
and
pool
directories are the two directories that you need to make (publicly) available
over HTTP to finish the setup of your APT repository. They contain all the files that APT will want
to download.
Assuming that you want to host this on a virtual host named pkgrepo.offsec.com, you could cre-
ate the following Apache configuration file, save it to
/etc/apache2/sites-available/pkgrepo.
offsec.com.conf
, and enable it with
a2ensite pkgrepo.offsec.com
):
ServerName pkgrepo.offsec.com
ServerAdmin repoadmin@offsec.com
ErrorLog /var/log/apache2/pkgrepo.offsec.com-error.log
CustomLog /var/log/apache2/pkgrepo.offsec.com-access.log ”%h %l %u %t \”%r\” %>s %O”
DocumentRoot /home/pkgrepo/reprepro
Options Indexes FollowSymLinks MultiViews
Require all granted
AllowOverride All
And the corresponding
sources.list
entry to add on machines that need packages from this
repository would look like this:
deb http://pkgrepo.offsec.com offsec-internal main
# Enable next line if you want access to source packages too
# deb-src http://pkgrepo.offsec.com offsec-internal main
Your package is now published and should be available to your networked hosts.
Although this has been a lengthy setup, the “heavy lifting” is now completed. You can boot your
networked machines via PXE, install a customized version of Kali Linux without interaction thanks
to a network-delivered preseed, configure SaltStack to manage your configurations (and control
minions!), create forked custom packages, and distribute those packages through your own pack-
age repository. This provides centralized management and enterprise-level control over multiple
Kali Linux installations. In short, you can now quickly deploy highly secure Kali systems precon-
figured for your specific needs and keep them synchronized thanks to Kali’s (semi-automatic) in-
stallation of all package updates.
278
Kali Linux Revealed
|