UPnP not working for netplay hosting
Description
UPnP isn't working when hosting a network game on Linux. Retroarch is built with miniupnp support
Checking existence of -lminiupnpc ... yes
And the router UPnP service works for other software

Expected behavior
Having the "NAT Traversal" option set to "on", clients should be able to connect to a host without further configuration.
Actual behavior
The room is listed on the lobby browser but clients can't connect. Netplay works when explicitly forwarding the port on the router.
Steps to reproduce the bug
- Set the "NAT Traverse" option under Network config to "on".
- Host a network game.
- Try to get a client to connect.
Version/Commit
- RetroArch: git 6abcaff
Environment information
- OS: Arch Linux kernel 4.9 x86-64
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Paging @GregorR
Check your MiniUPnPC version. Unfortunately the configure check will work even if MiniUPnPC is actually too old to use (which it almost certainly is). It must be at least MiniUPnPC 2.0. I should add that check to the configure script so it's clearer.
$ upnpc upnpc : miniupnpc library test client, version 2.0. (c) 2005-2016 Thomas Bernard. Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
Now that is odd! Can you grep API_VERSION /usr/include/miniupnpc/miniupnpc.h for me? That should be >= 16. If so, something, somewhere broke :)
$ grep API_VERSION /usr/include/miniupnpc/miniupnpc.h #define MINIUPNPC_API_VERSION 16
Hm! I can't check it right now, but assuming that it's not your router being broken, it looks like UPnP support went squonky. Can't check it now, but I'll look into it when I get the opportunity.
It works now, tried on 2b1fbca3 "Public address" message is wrong tho, shows my router's WAN IP
how is that incorrect? That's what it should show, your own router's public IP address as reported by the router
how is that incorrect? That's what it should show, your own router's public IP address as reported by the router
It's not a public IP address. You might be assuming there's only one router connecting directly to the internet.
I think it's either a misleading message or not working as expected. I guessed it's the latter because I don't see much point in showing an internal address.
So you're behind double NAT? And have manual forwarding OR DMZ in the Internet facing one?
On Mon, Feb 27, 2017, 11:42 AM JuanVCS [email protected] wrote:
how is that incorrect? That's what it should show, your own router's public IP address as reported by the router
It's not a public IP address. You might be assuming there's only one router connecting to the internet.
I think it's either a misleading message or not working as expected. I guessed it's the latter because I don't see much point in showing an internal address.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/4550#issuecomment-282775283, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpC0F3sCKXLGU-l97_e0DXo0TI4TJidks5rgvzZgaJpZM4L1bHx .
Forwarding to the internet facing one, yes.
@JuanVCS I'm not sure if this works for you now or not, but I am going to close this in favor of the more recent issue which seems to be a duplicate and is certainly still a problem. If you have any problems with UPnP not working for netplay please bring it up there, thanks!
https://github.com/libretro/RetroArch/issues/7865