Miniupnpd error during installation (amule not working)

Hi,

I’m Trying to install miniupnpd to let amule upnp work,

but when I restart the firewall, I get the following error

root@OpenWrt:/etc/config$ opkg install miniupnpd

root@OpenWrt:/etc/config$ opkg install luci-app-upnp




root@OpenWrt:/etc/config$ /etc/init.d/miniupnpd enable

root@OpenWrt:/etc/config$ /etc/init.d/miniupnpd start

root@OpenWrt:/etc/config$ /etc/init.d/firewall restart

Section miniupnpd option 'family' is not supported by fw4

Section miniupnpd option 'reload' is not supported by fw4

Include '/usr/share/miniupnpd/firewall.include' failed with exit code -9

What is “fw4” ?

where are this section ?

the /etc/config/firewall, got appended the following lines

config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'any'
option reload '1'

and the include file, is a bash file with the following content:

#

!/bin/sh

miniupnpd integration for firewall3

IPTABLES="/usr/sbin/iptables"
IP6TABLES="/usr/sbin/ip6tables"
IPTARGS="-w 1"

$IPTABLES -t filter -N MINIUPNPD 2>/dev/null
$IPTABLES -t nat -N MINIUPNPD 2>/dev/null
$IPTABLES -t nat -N MINIUPNPD-POSTROUTING 2>/dev/null

[ -x $IP6TABLES ] && $IP6TABLES -t filter -N MINIUPNPD 2>/dev/null

. /lib/functions/network.sh

helper to insert in chain as penultimate

iptables_prepend_rule() {
local iptables="$1"
local table="$2"
local chain="$3"
local target="$4"

    $iptables "$IPTARGS" -t "$table" -I "$chain" $($iptables "$IPTARGS" -t "$table" --line-numbers -nL "$chain" | \
            sed -ne '$s/[^0-9].*//p') -j "$target"

}

ADDED=0

add_extzone_rules() {
local ext_zone="$1"

[ -z "$ext_zone" ] && return

# IPv4 - due to NAT, need to add both to nat and filter table
# need to insert as penultimate rule for input & forward & postrouting since final rule might be a fw3 REJECT
iptables_prepend_rule "$IPTABLES" filter "zone_${ext_zone}_input" MINIUPNPD
iptables_prepend_rule "$IPTABLES" filter "zone_${ext_zone}_forward" MINIUPNPD
$IPTABLES -t nat -A "zone_${ext_zone}_prerouting"  -j MINIUPNPD
iptables_prepend_rule "$IPTABLES" nat "zone_${ext_zone}_postrouting" MINIUPNPD-POSTROUTING


    # IPv6 if available - filter only
    [ -x $IP6TABLES ] && {
        iptables_prepend_rule "$IP6TABLES" filter "zone_${ext_zone}_input" MINIUPNPD
        iptables_prepend_rule "$IP6TABLES" filter "zone_${ext_zone}_forward" MINIUPNPD
    }
    ADDED=$(($ADDED + 1))
}

# By default, user configuration is king.

for ext_iface in $(uci -q get upnpd.config.external_iface); do
    add_extzone_rules $(fw3 -q network "$ext_iface")
done

add_extzone_rules $(uci -q get upnpd.config.external_zone)

[ "$ADDED" -ne 0 ] && exit 0

# If really nothing is available, resort to network_find_wan{,6} and
# assume external interfaces all have same firewall zone.

# (This heuristic may fail horribly, in case of e.g. multihoming, so
# please set external_zone in that case!)

network_find_wan wan_iface
network_find_wan6 wan6_iface

for ext_iface in $wan_iface $wan6_iface; do
    # fw3 -q network fails on sub-interfaces => map to device first
    network_get_device ext_device $ext_iface
    add_extzone_rules $(fw3 -q device "$ext_device")
done

System: Flint2 + LuCI openwrt-24.10 branch (25.340.26705~d88390b) / OpenWrt 24.10.5 (r29087-d9c5716d1d)

Uninstall

luci-app-upnp
miniupnpd-iptables
iptables-zz-legacy
ip6tables-zz-legacy

Install

miniupnpd-nftables
luci-app-youknowwhat

I dont see any bsh on openwrt though...

2 Likes

Fw4 is the current OpenWrt firewall. It is using nftables commands instead of the old iptables.

You seem to have the older iptables based miniupnpd installed.

Like brada4 implies, you need the miniupnp-nftables variant instead of miniupnp-iptables.

1 Like

From the terminal:

remove old packages and install new ones:

root@OpenWrt:~# opkg remove miniupnpd-iptables, iptables-zz-legacy, ip6tables-zz-legacy

root@OpenWrt:~# opkg install miniupnpd-nftables, luci-app-upnp

Tried to enable the upnp BUT, same error…

root@OpenWrt:~# /etc/init.d/miniupnpd enable

root@OpenWrt:~# /etc/init.d/miniupnpd start

root@OpenWrt:~# /etc/init.d/firewall restart

Section miniupnpd option 'family' is not supported by fw4

Section miniupnpd option 'reload' is not supported by fw4

Section miniupnpd specifies unreachable path '/usr/share/miniupnpd/firewall.include', ignoring section

Automatically including '/usr/share/nftables.d/table-post/20-miniupnpd.nft'

Automatically including '/usr/share/nftables.d/chain-post/dstnat/20-miniupnpd.nft'

Automatically including '/usr/share/nftables.d/chain-post/forward/20-miniupnpd.nft'

Automatically including '/usr/share/nftables.d/chain-post/srcnat/20-miniupnpd.nft'


The errors reported come from last lines in etc/config/firewall, that have been kept like this:

config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'any'
option reload '1'

Can I safely delete them ? (shouldn’t the opgk remove have removed the related block ?)

BUT Even the menu-item does NOT appear in the webpage…even if I have enabled the miniupnpd service (??)

AFAIK should appear a new Services→Upnp menu item ….

Which AI barfed those commands? BTW there is output after commands saying how wrong your command is....

Exact copy/paste

opkg update
opkg remove --autoremove luci-app-upnp miniupnpd-iptables iptables-zz-legacy ip6tables-zz-legacy
opkg install miniupnpd-nftables luci-app-upnp

You enable from luci app, service is enabled by default but it checks enabled setting in uci.

Thanks for your help !

After re-installing from console, the Service→Upnp menu did reappear.

Then Enabled the Start Service checkbox, and clicked save&apply.

BUT running Amule (Ubuntu 24.04) from laptop, the Service→Upnp menu shows “

There are no active port maps.

And Amule get a low ID :frowning:

With DDWRT the upnp protocol worked with no problem.

Kindly ask

Do I have to set some other parameter in OpenWrt?

Do someone else have an Amule or upnp program working with OpenWrt ?

PS

I checked the log in Amule:

2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANDSLLinkConfig:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: WAN Service Detected: 'urn:schemas-upnp-org:service:WANIPConnection:1'.
2026-02-06 15:45:35: Universal Plug and Play: Successfully retrieved SCPD Document for service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a:b6fc:7dff:fe37:a187]:49000/igdupnp/control/WANIPConn1.
2026-02-06 15:45:35: Universal Plug and Play: Successfully subscribed to service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a:b6fc:7dff:fe37:a187]:49000/igdupnp/control/WANIPConn1.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANIPv6FirewallControl:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-any-com:service:Any:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: WAN Service Detected: 'urn:schemas-upnp-org:service:WANIPConnection:1'.
2026-02-06 15:45:35: Universal Plug and Play: Successfully retrieved SCPD Document for service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a::1]:5000/evt/IPConn.
2026-02-06 15:45:35: Universal Plug and Play: Error subscribing to service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a::1]:5000/evt/IPConn, error: UPNP_E_SUBSCRIBE_UNACCEPTED.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:Layer3Forwarding:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected

BR

Giuliano

Any mappings appearing in LuCI?

  • You can install miniupnpc on ubuntu and try to map a port
  • You certainly have to start the upnp client anew, it does not query fr upnp igd on every connection
  • What are first 2 numbers of "wan" ip address?

From ubuntu, this is what miniupnp client find the following:

giuliano@Apollo11:~$ sudo upnpc -S
upnpc : miniupnpc library test client, version 2.2.6.
(c) 2005-2024 Thomas Bernard.
Go to http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.0.1:5000/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

desc: http://192.168.0.102:49000/igddesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://192.168.0.1:5000/ctl/IPConn
Local LAN ip address : 192.168.0.208
FirewallEnabled: 1 & Inbound Pinhole Allowed: 1
GetFirewallStatus:
Firewall Enabled: Yes
Inbound Pinhole Allowed: Yes
Bytes:   Sent: 2948547228	Recv: 1277413466
Packets: Sent: 26886311	Recv: 145800899

BUT Amule claims about “Error subscribing to service”:

2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANDSLLinkConfig:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: WAN Service Detected: 'urn:schemas-upnp-org:service:WANIPConnection:1'.
2026-02-06 15:45:35: Universal Plug and Play: Successfully retrieved SCPD Document for service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a:b6fc:7dff:fe37:a187]:49000/igdupnp/control/WANIPConn1.
2026-02-06 15:45:35: Universal Plug and Play: Successfully subscribed to service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a:b6fc:7dff:fe37:a187]:49000/igdupnp/control/WANIPConn1.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANIPv6FirewallControl:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-any-com:service:Any:1'. Ignoring.
2026-02-06 15:45:35: Universal Plug and Play: Internet Gateway Device Detected.
2026-02-06 15:45:35: Universal Plug and Play: WAN Service Detected: 'urn:schemas-upnp-org:service:WANIPConnection:1'.
2026-02-06 15:45:35: Universal Plug and Play: Successfully retrieved SCPD Document for service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://[2a00:6d43:605:cf0a::1]:5000/evt/IPConn.

2026-02-06 15:45:35: Universal Plug and Play: Error subscribing to service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://

[2a00:6d43:605:cf0a::1]:5000/evt/IPConn, error: UPNP_E_SUBSCRIBE_UNACCEPTED.
2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'. Ignoring.

2026-02-06 15:45:35: Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:Layer3Forwarding:1'. Ignoring.

Amule also find ALSO that the HP printer has an own upnpd, but it seems it does not create a problem:

2026-02-06 16:02:32: Universal Plug and Play: error(UPNP_DISCOVERY_ADVERTISEMENT_ALIVE): Error retrieving device description from ``http://192.168.0.134:8080/dd.xml:`` UPNP_E_SOCKET_CONNECT(-204).
2026-02-06 16:02:32: Universal Plug and Play: error(UPNP_DISCOVERY_ADVERTISEMENT_ALIVE): Error retrieving device description from ``http://192.168.0.134:8080/dd.xml:`` UPNP_E_SOCKET_CONNECT(-204).
2026-02-06 16:02:32: Universal Plug and Play: error(UPNP_DISCOVERY_ADVERTISEMENT_ALIVE): Error retrieving device description from ``http://192.168.0.134:8080/dd.xml:`` UPNP_E_SOCKET_CONNECT(-204).

Any idea what maybe causing the “Error subscribing to service” ?

BR

Giuliano

1 Like

Not an OpenWrt problem. permutate bhorse checkboxes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.