I recently took an old Dell Optiplex 3020 x86 machine sitting around collecting dust and turned it into a openwrt router using the 19.07.4 x86 target.
It works great, the only problem is I can't get uPnP, and by that I mean luci-app-upnp + miniupnpd (which seems to be a dependency of the luci app), to work properly. No matter what I do I am still behind a strict NAT on any of the game consoles or PCs in the home.
"Can you verify you have a public IP address?"
-llechii
"Not sure what you mean by this."
-Oliumen
===
It just hit me.
You are asking if I am running a NAT behind another NAT and if my modem is actually getting an IP directly from an ISP and isn't part of some subnetwork address like 192.168.100.1 or whatever they might issue.
I will need to double check, pretty sure it's not.
"Can you verify you have a public IP address?"
IIeachii
So after hanging out at my buddy's house for a day it looks like they aren't exposing the public IP address to him and are instead running it in a private network with NAT which has created a double NAT scenario.
Even if I remove NAT on his OpenWRT router, he will still be behind a firewall he has zero control over.
He now has to contact his ISP and get them to remove that private network from the mix and just flat out expose the public IP address to his modem so he can then have that public IP hit his router and then he can control every aspect of the connection.
This is the setup.
ISP(Public IP-Unknown at this time as it's not being exposed as a public address to the modem) -> Apartment Complex Network Using NAT ( Private Network - Gateway Address 192.168.100.1 / 255.255.255.0 ) -> Apartment Modem(192.168.100.10 / 255.255.255.0) -> OpenWRT Router with NAT(That he has full control over) (192.168.1.1) -> TP-Link TL-SG108E Switch -> Client Machines.
The double NAT scenario here is why it's not working.
I also tried exposing the ports manually and it still had issues. Previously, I had said it worked but I guess I was thinking of another setup I had worked on that same day.
So UPNP works... It's just this weird messed up setup the Apartment complex has that is causing the problem.
Thanks again for the help lleachii. I was really tried and I missed something really simple because of it. I appreciate your patience and the questions you asked which helped me diagnose and fix the issue.
This sounds like normal behavior of UPnP, perhaps I don't understand the issue you're describing.
I'm not sure how that's the router's fault...though you may be able to increase the time of the openings.
See clean_ruleset_interval at:
It appears the default is 600 seconds (10 minutes). There's also a clean_ruleset_threshold that by default only permits 20 openings before closing the oldest one for new openings.
Huh..."remember redirects"!?
I thought you wanted UPnP?
What you're asking now seems like you prefer to manually set permanent port forwards in the firewall - instead of UPnP.