Skip to content

Instantly share code, notes, and snippets.

Created Sep 6, 2019
What would you like to do?
Shortened checks
MODULES="overlay br_netfilter ebtables iptable_nat iptable_filter"
echo "Enabling Modules"
for i in ${MODULES}; do echo "$i" | tee /etc/modules-load.d/$i.conf > /dev/null; done
for i in ${MODULES}; do sudo modprobe $i; done
lsmod | grep 'overlay\|br_netfilter\|ebtables'
echo "Disabling SELinux"
sudo setenforce 0
sudo sed -i -- 's/SELINUX\=enforcing/SELINUX\=disabled/g' /etc/selinux/config
echo "Modifying Kernel Parameters"
sudo sysctl -w net.bridge.bridge-nf-call-ip6tables=1
echo -e "net.bridge.bridge-nf-call-ip6tables = 1" > /etc/sysctl.d/10-net.bridge.bridge-nf-call-ip6tables.conf
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1
echo -e "net.bridge.bridge-nf-call-iptables = 1" > /etc/sysctl.d/10-net.bridge.bridge-nf-call-iptables.conf
sudo sysctl -w net.ipv4.ip_forward=1
echo -e "net.ipv4.ip_forward = 1" > /etc/sysctl.d/10-net.ipv4.ip_forward.conf
sudo sysctl -w fs.may_detach_mounts=1 #
sudo echo -e "fs.may_detach_mounts = 1" > /etc/sysctl.d/10-fs.may_detach_mounts.conf
sudo sysctl -w fs.inotify.max_user_watches=1048576
sudo echo -e "fs.inotify.max_user_watches = 1048576" > /etc/sysctl.d/10-fs.inotify.max_user_watches.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment