Last active
October 18, 2019 16:45
-
-
Save nethunteros/182337ed67b606a4735888bde1941b89 to your computer and use it in GitHub Desktop.
Build Kali container in LXC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################################## | |
# (right now the lxc bridge interface isn't working with this guide) | |
# (still had to install lxc over this) | |
# This is for my testing env for building a kali template for LXC | |
# You may need to install additional packages. | |
# | |
########################################################################################## | |
# Prereqs | |
sudo apt-get update | |
sudo apt install -y binfmt-support qemu qemu-user-static bridge-utils \ | |
python3-dev libtool debootstrap autoconf automake \ | |
libcap-dev libcgmanager0 libcgmanager-dev libselinux1-dev\ | |
libapparmor-dev docbook2x git python3-setuptools | |
# Make & install LXC | |
git clone https://github.com/binkybear/lxc.git -b kali | |
cd lxc | |
./autogen.sh | |
/configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu \ | |
--with-rootfs-path=/usr/lib/x86_64-linux-gnu/lxc --sysconfdir=/etc --localstatedir=/var \ | |
--with-config-path=/var/lib/lxc | |
make && make install | |
# Template is located @ | |
# /usr/share/lxc/templates/lxc-kali | |
# Create Kali LXC container | |
lxc-create -n kali -t kali -- -r kali-rolling | |
# Start container in background | |
lxc-start -n kali | |
# Access kali with console | |
lxc-console -n kali |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#what do you think about this :
#when use ./autogen.sh
#Output:
./autogen.sh: 27: ./autogen.sh: libtoolize: not found