I'm using Ubuntu 14.04 as a firewall with iptables.
I have a network interface like this:
iface lo inet loopback pre-up iptables-restore < /etc/iptables.rules
This method has been working for years, but not anymore. My firewall is up to date. I also enabled logging:
iface lo inet loopback pre-up iptables-restore < /etc/iptables.rules > /var/log/iptables-boot.log
but it's empty.
I also tried it with a script at /etc/network/if-up.d/script:
#!/bin/sh iptables-restore < /etc/iptables.rules >> /var/log/iptables_boot.log echo "iptables loaded" >> /var/log/iptables_boot.log
Where, the logfile only contains "iptables loaded" but nothing else. That means the script runs, but no iptables rules are added to the kernel.