/compile-iptables.sh Secret
Created
November 7, 2021 23:47
Star
You must be signed in to star a gist
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
# 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