RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

UPnP not working for netplay hosting

Open JuanVCS opened this issue 9 years ago • 12 comments

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 UPnP router config

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

  1. Set the "NAT Traverse" option under Network config to "on".
  2. Host a network game.
  3. 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.

JuanVCS avatar Feb 02 '17 17:02 JuanVCS

Paging @GregorR

ghost avatar Feb 02 '17 17:02 ghost

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.

GregorR avatar Feb 02 '17 18:02 GregorR

$ 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/

miniupnpc 2.0-1

JuanVCS avatar Feb 02 '17 18:02 JuanVCS

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 :)

GregorR avatar Feb 02 '17 18:02 GregorR

$ grep API_VERSION /usr/include/miniupnpc/miniupnpc.h #define MINIUPNPC_API_VERSION 16

JuanVCS avatar Feb 02 '17 18:02 JuanVCS

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.

GregorR avatar Feb 02 '17 18:02 GregorR

It works now, tried on 2b1fbca3 "Public address" message is wrong tho, shows my router's WAN IP

JuanVCS avatar Feb 27 '17 00:02 JuanVCS

how is that incorrect? That's what it should show, your own router's public IP address as reported by the router

andres-asm avatar Feb 27 '17 03:02 andres-asm

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.

JuanVCS avatar Feb 27 '17 16:02 JuanVCS

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 .

andres-asm avatar Feb 27 '17 17:02 andres-asm

Forwarding to the internet facing one, yes.

JuanVCS avatar Feb 27 '17 17:02 JuanVCS

@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

orbea avatar Jan 06 '19 15:01 orbea