blob: a42f01d59d91e196d32f9e14c4bf8bf6b38d6e55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/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
|