UpNP is not able to create rule

Hi,

I have loaded OpenWrt in BT Home hub 5A. While exploring could not see UpNp and services menu.

Installed the miniupnp package and could see UpNp under Services now. Also enable the
Start UPnP and NAT-PMP service
and enable UpNp in eservices and Upnp page.

I am using UpNp wizard in my windows lappi to send request to my router, but I am getting error Port mapping could not be added.

Appreciate any inputs/thoughts on what I am missing here.

Thanks

Did you install luci-app-upnp or miniupnp on it's own?

Did you add a rule to allow the IP of the host or the whole LAN subnet to open ports on the router?

Hi, from update list I found luci-app-upnp and installed manually the same but can see miniupnpd in below path.

root@LEDE5:/etc/init.d#
root@LEDE5:/etc/init.d#
root@LEDE5:/etc/init.d# ls -ltr miniupnpd
-rwxr-xr-x 1 root root 5807 Aug 6 19:22 miniupnpd
root@LEDE5:/etc/init.d#

Hi Trendy.

I am expecting the port forwarding rule should be created automatically on router as long as I am registering from UpNp wizard tool in my windows machine.

In order for the forwarding rule to be created automatically, you first need to allow certain IPs to access a range of ports in miniupnpd configuration. Have you created that? Even better can you post here the configuration?
uci show upnp or cat /etc/config/upnp ? Post it in preformatted text </>

Hi ,
was not aware of this. I have not changed anything in the file. Here is the default output.

root@LEDE5:/etc/config#
root@LEDE5:/etc/config#
root@LEDE5:/etc/config# cat upnpd

config upnpd 'config'
option download '1024'
option upload '512'
option internal_iface 'lan'
option port '5000'
option upnp_lease_file '/var/run/miniupnpd.leases'
option enabled '1'
option uuid '23e3d653-42da-48da-948b-8903db87b1aa'
option log_output '1'

config perm_rule
option action 'allow'
option ext_ports '1024-65535'
option int_addr '0.0.0.0/0'
option int_ports '1024-65535'
option comment 'Allow high ports'

config perm_rule
option ext_ports '0-65535'
option int_addr '0.0.0.0/0'
option int_ports '0-65535'
option comment 'Default deny'
option action 'allow'

root@LEDE5:/etc/config#

My Router IP i.e Default gateway is 192.168.1.1.
My device Ip from where I am trying to register UpNP is 192.168.1.234 with 8000 internal and 8000 external port with Protocl TCP. Could you please help me where I need to change this in above config.

Also tried after adding this and restarting minupnpd

config perm_rule
option action 'allow'
option ext_ports '8000'
option int_addr '192.168.1.234/32'
option int_ports '8000'
option comment 'Allow high ports'
But no luck so far ..

The configuration allows all ports from all IPs, so this is not where the problem lies.
Taking in consideration the insecure nature of upnp nat, I strongly recomment you to just open manually the ports you want in the firewall and forget the upnp.

Hi Trendy, thank you very much. But I wanted to test this UPnP feature with OpenWrt.
Manual port forwarding I tried and It was working fine.

After installing miniupnp package, this UPNP should work on OpenWrt, not sure I am missing something in config part for OpenWrt.

You can also check the logs for any useful information why it is not working, since you have it enabled. Last resort would be to monitor the packet exchange with tcpdump.