Skip to content

Instantly share code, notes, and snippets.

@dstaley
Created Nov 7, 2021
Embed
What would you like to do?
# docker run -p 8000:8000 -it debian:8 /bin/bash
apt update
apt install -y build-essential pkg-config bison flex wget lbzip2 python3
sed -i '/^mozilla\/DST_Root_CA_X3/s/^/!/' /etc/ca-certificates.conf && update-ca-certificates -f
wget https://www.netfilter.org/pub/libmnl/libmnl-1.0.4.tar.bz2
tar -xf libmnl-1.0.4.tar.bz2
cd libmnl-1.0.4
./configure
make -j4
make install
cd ..
wget https://www.netfilter.org/pub/libnftnl/libnftnl-1.0.6.tar.bz2
tar -xf libnftnl-1.0.6.tar.bz2
cd libnftnl-1.0.6
./configure
make -j4
make install
cd ..
wget https://www.netfilter.org/pub/iptables/iptables-1.6.1.tar.bz2
tar -xf iptables-1.6.1.tar.bz2
cd iptables-1.6.1
./configure --prefix=/usr --mandir=/usr/man --disable-shared --enable-static
make -j4
export CFLAGS='-static'
export LDFLAGS='-static -dl'
mkdir pkg
PKG="$(pwd)/pkg"
make DESTDIR=$PKG install
stat $PKG/usr/sbin/xtables-multi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment