[packages] git: update to 2.0.0
[packages.git] / net / miniupnpd / files / firewall.include
1 #!/bin/sh
2 # miniupnpd integration for firewall3
3
4 iptables -t filter -N MINIUPNPD 2>/dev/null
5 iptables -t nat -N MINIUPNPD 2>/dev/null
6
7 local ext_iface
8 for ext_iface in $(uci -q get upnpd.config.external_iface); do
9         local ext_zone
10         for ext_zone in $(fw3 -q network "$ext_iface"); do
11                 iptables -t filter -I zone_${ext_zone}_forward -j MINIUPNPD
12                 iptables -t nat -I zone_${ext_zone}_prerouting -j MINIUPNPD
13         done
14 done
15