From 414ccbc4d296ab15a997167c1dd141e57004c45d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 23 Sep 2024 15:26:19 +0200 Subject: [PATCH] Try to fix uPnP --- openmptcprouter/files/etc/firewall.upnp | 3 +++ openmptcprouter/files/etc/uci-defaults/1980-omr-firewall | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 openmptcprouter/files/etc/firewall.upnp diff --git a/openmptcprouter/files/etc/firewall.upnp b/openmptcprouter/files/etc/firewall.upnp new file mode 100644 index 0000000000..9b573ffa91 --- /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 1b08a45410..b2b465778a 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'