#!/bin/sh MC_DESCRIPTION="Firewall configuration." . "$(dirname "$(readlink -f "$0")")/common" || exit # TODO add support for Turris/OpenWRT somehow? restart4=false inst ipv4 /etc/iptables/ipv4 restart4=$change inst ipv4-config /etc/conf.d/iptables $restart4 || restart4=$change restart6=false inst ipv6 /etc/iptables/ipv6 restart6=$change inst ipv6-config /etc/conf.d/ip6tables $restart6 || restart6=$change apply ############################################################################ if $restart4; then echo "Restarting IPv4 firewall" rc-service iptables restart fi if $restart6; then echo "Restarting IPv6 firewall" rc-service ip6tables restart fi