MINIUPNPD not working. Please help

Please can anyone help me get my miniupnpd working?? It doesn't create any redirects.
my router is TP-Link WR-840N v4 running version 21.02.0-rc3 r16172-2aba3e9784.
I'm also a noob with OpenWrt so any simple explanations will be well appreciated.:pray:t3:

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 igdv1 '1'
        option enabled '1'
        option uuid '0432dab0-2ac8-4551-8bbc-67b47044e6d4'

config perm_rule
        option comment 'allow high ports'
        option ext_ports '1024-65535'
        option int_ports '1024-65535'
        option action 'allow'
        option int_addr '192.168.1.13'

config perm_rule
        option int_addr '192.168.1.13'
        option action 'deny'
        option comment 'Default deny'
        option ext_ports '0-65535'
        option int_ports '0-65535'

This is what my system log looks like

Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=473, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=489, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=485, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=473, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=471, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=418, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=457, dest=[ff0e::c]:1900): sendto: Permission denied
Tue Jul  6 16:51:01 2021 daemon.err miniupnpd[4454]: try_sendto(sock=8, len=418, dest=[ff0e::c]:1900): sendto: Permission denied

Did you restart the firewall after applying the miniupnpd changes?

Is the lan host communicating over IPv6?
Install tcpdump on OpenWrt opkg update; opkg install tcpdump
Than run the command to capture the packets: tcpdump -i br-lan -evn port 5000 or port 1900

No, it's not. I only have IPv4 at the moment. should I still run the command?

Yes, and verify that you have restarted the firewall.

thanks. The command is currently running. I restarted the firewall but upnp still isn't working. I'll try again after the tcpdump command is finished and see if anything changes.

The tcpdump runs indefinitely. It will capture any packets sent to the router from the lan hosts to verify that they are indeed sending requests for port forwards. After you see some lines stop it with Ctrl-c and paste here the output in preformatted text.

10:59:22.243278 34:e8:94:44:dd:46 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 458: (tos 0x0, ttl 2, id 17165, offset 0, flags [DF], proto UDP (17), length 444)
    192.168.1.1.39051 > 239.255.255.250.1900: UDP, length 416
10:59:22.244652 34:e8:94:44:dd:46 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 521: (tos 0x0, ttl 2, id 17166, offset 0, flags [DF], proto UDP (17), length 507)
    192.168.1.1.39051 > 239.255.255.250.1900: UDP, length 479
10:59:22.246118 34:e8:94:44:dd:46 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 449: (tos 0x0, ttl 2, id 17167, offset 0, flags [DF], proto UDP (17), length 435)
    192.168.1.1.39051 > 239.255.255.250.1900: UDP, length 407

I feel like this might also help. these are from my system log.

Tue Jul  6 16:52:01 2021 daemon.err miniupnpd[4454]: sendto(udp_notify=7, 192.168.1.1): No such device
Tue Jul  6 16:52:01 2021 daemon.err miniupnpd[4454]: sendto(udp_notify=7, 192.168.1.1): No such device
Tue Jul  6 16:52:01 2021 daemon.err miniupnpd[4454]: sendto(udp_notify=7, 192.168.1.1): No such device
Tue Jul  6 16:52:01 2021 daemon.err miniupnpd[4454]: sendto(udp_notify=7, 192.168.1.1): No such device
Tue Jul  6 16:52:01 2021 daemon.err miniupnpd[4454]: sendto(udp_notify=7, 192.168.1.1): No such device
Tue Jul  6 16:52:01 2021 daemon.err miniupnpd[4454]: sendto(udp_notify=7, 192.168.1.1): No such device
Tue Jul  6 16:51:31 2021 daemon.err miniupnpd[4454]: try_sendto(sock=7, len=475, dest=239.255.255.250:1900): sendto: No such device
Tue Jul  6 16:51:31 2021 daemon.err miniupnpd[4454]: try_sendto(sock=7, len=416, dest=239.255.255.250:1900): sendto: No such device
Tue Jul  6 16:51:31 2021 daemon.err miniupnpd[4454]: try_sendto(sock=7, len=479, dest=239.255.255.250:1900): sendto: No such device

This is your router advertising the service. So far I don't see any lan host requesting a port forward.

thanks for the help. I'll do some testing to make sure one of my devices requests one. My ps4 usually does, weird it didn't this time.

1 Like

I figured out what was wrong. It turns out miniupnpd selected the wrong external IP by default

So I manually added the option in my config file to use my actual external IP, rebooted the router and it started working again!!

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 uuid '0432dab0-2ac8-4551-8bbc-67b47044e6d4'
        option enabled '1'
        option igdv1 '1'
        option external_iface 'wan'
        option external_ip 'my actual external IP'
1 Like

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