diff --git a/openmptcprouter/files/etc/firewall.upnp b/openmptcprouter/files/etc/firewall.upnp new file mode 100644 index 000000000..9b573ffa9 --- /dev/null +++ b/openmptcprouter/files/etc/firewall.upnp @@ -0,0 +1,3 @@ +#!/bin/sh + +/etc/init.d/miniupnpd restart >/dev/null 2>&1 \ No newline at end of file diff --git a/openmptcprouter/files/etc/uci-defaults/1980-omr-firewall b/openmptcprouter/files/etc/uci-defaults/1980-omr-firewall index 1b08a4541..b2b465778 100755 --- a/openmptcprouter/files/etc/uci-defaults/1980-omr-firewall +++ b/openmptcprouter/files/etc/uci-defaults/1980-omr-firewall @@ -158,6 +158,15 @@ if [ "$(uci -q get firewall.ttl)" = "" ]; then commit firewall EOF fi +if [ "$(uci -q get firewall.upnp)" = "" ]; then + uci -q batch <<-EOF >/dev/null + set firewall.upnp=include + set firewall.upnp.path='/etc/firewall.ttl' + set firewall.upnp.type='script' + set firewall.upnp.fw4_compatible='1' + commit firewall + EOF +fi if [ "$(uci -q get firewall.fwlantovpn)" = "" ]; then uci -q batch <<-EOF >/dev/null set firewall.zone_lan.auto_helper='0'