Need Help - uPnP Not Working on 19.07.4 x86 Target

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.

My setup is like so...

ISP -> Wall -> Modem(Just a modem) -> OpenWrt Router -> TP-Link TL-SG108E Switch -> Client machines.

Can someone help me out? I am at a loss and all I need is uPnP and this thing is gold.


@Oliumen, welcome to the community!

You're not really being clear.

  • Did you successfully install the packages?
  • Did this work on a previous version?
  • Can you verify you have a public IP address?
  • Does opening the ports as a test for one of the devices work?
  • What is the device called "Wall"?
1 Like

"welcome to the community!"

Thank you so much.

"You're not really being clear."

Oh, sorry what do you need clarification on?

"Did you successfully install the packages?"


"Did this work on a previous version?"

I have an older 18.x.x release that works just fine.

"Can you verify you have a public IP address?"

Not sure what you mean by this.

"Does opening the ports as a test for one of the devices work?"

If I manually open the ports, yes it works. If I rely on uPnP to do the work, No.

"What is the device called "Wall"?"

By Wall I mean the wire from outside to my home and the wall socket that then feeds a line to my modem.

Sorry let me update the diagram.

ISP -> Modem(Just a modem) -> OpenWrt Router -> TP-Link TL-SG108E Switch -> Client machines.


Thanks again,

"Can you verify you have a public IP address?"

"Not sure what you mean by this."


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 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?"

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 / ) -> Apartment Modem( / -> OpenWRT Router with NAT(That he has full control over) ( -> 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.

Thanks again! :smiley:

1 Like

So I was able to correct my IP situation at my buddies. He now gets a publicly addressable IP.

upnp is installed and does work but... It doesn't work very well.

I have to initiate multiple connection attempts for the upnp redirect to actually start. When I close out the connection, the redirect isn't remembered. This makes it so that when I try to connect again I start with a strict NAT in my games, then I have to restart the game, and the redirect starts working properly.

Is there anyway for the upnp service to remember what redirects it used last and keep them for every subsequent connection to whatever game service I am trying to use?

I don't understand what this means.

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"!? :confused:

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.