openwrt / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
6.38k stars 2.53k forks source link

[BUG] nftables ports opened by miniupnpd not shown on status page or upnp luci app page #5678

Closed edrikk closed 2 years ago

edrikk commented 2 years ago

Master build as of ae75541 shows that the miniupnpd ports are correctly opened via fw4 rules.

However, both the Luci status -> overview page’s “Active UPnP Redirects” as well as luci-app-upnp package’s “Active UPnP Redirects” sections are empty.

Expected behaviour is of course for the redirects to appear on these pages when nftables are used for miniupnpd.

urbenlegend commented 2 years ago

I am also seeing this issue on my end. In addition to this, it seems that sometimes port mappings fail to get removed properly, with errors shown in the logs saying as much.

jckefan commented 2 years ago

The issue still persists in July.

firewire10000 commented 2 years ago

I've just compiled 22.03.0-rc6 with miniupnpd 2.3.0 (modified the Makefile to download the latest version) and I too am not seeing anything show under 'Active UPnP Redirects' table of LuCI nor am I getting any open ports. I have even applied the patch mentioned in the forum post here whilst compiling the firmware and no difference.

elliotclee commented 2 years ago

I came here for what I think is this bug... In /usr/libexec/rpcd/luci.upnp (part of the luci-app-upnp package), the get_status method seems to try running iptables, which of course doesn't work with firewall4/nftables. I don't know enough to submit a patch but it seems like this could be part of the problem. I am running 22.03-rc6.

elliotclee commented 2 years ago

I just checked the master and openwrt-22.03 branches of https://github.com/openwrt/luci/blob/master/applications/luci-app-upnp/root/usr/libexec/rpcd/luci.upnp and it is still broken there. @Ansuel wrote the original code.

jow- commented 2 years ago

Fixed by #5961