[Face with Tears of Joy]Ah my bad, didn't notice it's a closed PR not a closed issue.Because the patch was rejected by the miniupnpd author.
[Face with Tears of Joy]Ah my bad, didn't notice it's a closed PR not a closed issue.Because the patch was rejected by the miniupnpd author.
In his defense, he's trying to follow the UPNP/IGD official specs as closely as possible. The IGD functionality requires the public WAN IP to be used - that is something separate from the UPNP functions of forwarding ports, which does not require it.Ah sounds unnecessarily added complexity, what is this author thinking[Face Holding Back Tears emoji]
I know that story.That patch is from 2020. Asuswrt-Merlin's miniupnpd isn't outdated, it was updated to 2.3.0 back this spring.
It's a complicated story. When the miniupnpd author decided a few years ago to disable miniupnpd whenever using a private WAN IP and adding a stun client inside miniupnpd to retrieve the public IP instead, I disagreed with the whole idea (we had a discussion about it on the miniupnpd github repo). Adding a stun client only for that specific purpose was feature bloat IMHO, and adding another moving part that could break at any time if any built-in stun server went offline, or an ISP decided to block access to that particular server. So at the time, my solution was to revert the whole change, and fully allow private WAN IPs once again.
A few years later, these patches became a major PITA for me to maintain, because every time I needed to upgrade to a new miniupnd version, I had to manually reapply these patches. So I eventually gave up, reverted them, and went with the next best thing: rely on Asuswrt's own built in stun lookup that it had then. This is what's normally stored in the wan0_realip nvram.
The actual problem in your case doesn't seem to be miniupnpd, but your router not properly setting that nvram. Switching to miniupnpd's built in stun client won't help you if your router is failing to do the same stun lookup.
I spent a lot of time back in the day working on miniupnpd. IPv6 ended up being left disabled because enabling it required upgrading miniupnpd to a newer IGD protocol version, and that version flooded Windows's event log with tons of error messages due to a bug in Microsoft's implementation. Again, it was discussed on the miniupnpd GIthub back then, and ultimately the problem was deemed to be within Windows, not miniupnpd, so nobody could do anything about it.
It gets filled here on my development RT-AC66U_B1 that sits behind my main router. Timing issue between WAN being up and running and miniupnpd config being generated perhaps? Try just restart miniupnpd to see if then it fills it properly.I had a similar problem a month ago (https://www.snbforums.com/threads/upnp-doesnt-work-on-cgnat-double-nat.80132/ ), but unlike the OP my nvram variables were getting populated correctly, but the upnp config (ext_ip=) was not getting populated on boot, I think it has something to do with my settings, I didn't investigate the cause further.
service restart_upnp
thank you for your replyIt gets filled here on my development RT-AC66U_B1 that sits behind my main router. Timing issue between WAN being up and running and miniupnpd config being generated perhaps? Try just restart miniupnpd to see if then it fills it properly.
Code:service restart_upnp
Try disabling that. One possible issue is that local DNS resolving is taking longer to be working, causing get realip to fail resolving the stun server, which in turns will cause miniupnpd to be missing the IP returned by getrealip. Directly connecting with the ISP DNS servers might be more reliable there.I have enabled "Wan: Use local caching DNS server as system resolver (default: No)",
Thank you, I tried it and it didn't work.Try disabling that. One possible issue is that local DNS resolving is taking longer to be working, causing get realip to fail resolving the stun server, which in turns will cause miniupnpd to be missing the IP returned by getrealip. Directly connecting with the ISP DNS servers might be more reliable there.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!