Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Persist bridge-nf-call-iptables on Reboot
#!/bin/bash
set -e
# Running `modprobe br_netfilter` does not persist.
echo 'br_netfilter' >> /etc/modules
# Running `sysctl net.bridge.bridge-nf-call-iptables=1` does not persist.
echo 'net.bridge.bridge-nf-call-iptables=1' >> /etc/sysctl.conf
echo 'net.bridge.bridge-nf-call-ip6tables=1' >> /etc/sysctl.conf
@adamelliotfields
Copy link
Author

adamelliotfields commented Nov 11, 2019

If this still doesn't work, try sudo apt remove --purge ufw, as ufw has rules that override sysctl.

If that still doesn't work, try sudo grep -rl net.bridge.bridge-nf-call-iptables /etc to find any other files that could be overriding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment