miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Xbox One - Teredo Issues (Multiple Consoles) Port 3074

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
xruptor



Joined: 15 Sep 2014
Posts: 2

PostPosted: Mon Sep 15, 2014 5:47 pm    Post subject: Xbox One - Teredo Issues (Multiple Consoles) Port 3074 Reply with quote

I'm having an issue on my lan where we have multiple gaming consoles. Primarily the issue seems to be with the two Xbox One's on the lan. There apparently is a problem with Xbox One and the Teredo protocol behind NAT. The port which is used is 3074. When this port is used by one of the console the other one is put in a moderate NAT. This causes complications during party invites and voice chat. Which at times also causes party function to disconnect completely. Now I've researched the problem and although there are a few ways to get around it the problem still persists until Microsoft fixes it. Its apparently a huge issue with their console. Until then I'm trying to work around the issue. Any assistance or suggestions would be great!

Router: Asus RT-N66U
Firmware: Tomato Shibby 1.28.0000 MIPSR2-121 K26 USB AIO-64K

Questions:

1) Does Port Forwarding override the port forwarding rules used by uPnP? It doesn't appear that this is the case but I wanted to ask just to make sure. You see when one of the Xbox One claims access to port 3074 the other Xbox One utilizes a completely different random port for the Teredo protocol. When this happens the systems function just fine. So I'm trying to see if I can force one of the systems to always utilize 3074 to make the other system always grab a random port number.

2) uPnP list seems to clear the port forwarding rule when the port is closed. Are these rules supposed to stay on the listing even if we un-check the cleaning process? On DD-WRT the port redirection map stays on uPnP list until it's cleared or the router is reset. Because of this the ports almost always get remapped properly when port 3074 is in the redirection list. I'm wondering if this functions similarity on Tomato?
The reason I bring this up is because no matter what I do port 3074 still gets claimed sometimes by both systems.

3) Is there anyway to force uPnP to assign a port always to a specific IP address? Is there anyway to force a port in general to a specific console so that uPnP causes the remaining console to establish a random port? I've tried several combinations but it doesn't seem to work right. Now I had some success with dd-wrt but honestly speaking I prefer the tomato firmware over dd-wrt. So I'm trying to find solutions to this problems utilizing tomato rather than dd-wrt.

4) is the uPNP different in dd-wrt than tomato? I thought they used the same daemon (miniupnp). You would think they function similarly.

5) It seems strange but sometimes Xbox A will still display port 3074 being used. However, when Xbox B tries to access port 3074 it doesn't force it to use a different port number. There are times it feels like the same port is being used even though Xbox A is off and isn't using the port.

BTW I have static IP assigned to both Xbox One consoles. When you perform a hard reset on both they show as Open Nat. It's not until the issue with port 3074 that one of them gets pushed immediately to Moderate NAT. This is what I'm trying to avoid.

There seems to be A LOT of issues with uPnP and Xbox One's. This includes port 3074 and Teredo. The funny thing the older consoles never had this many problems.

I welcome any suggestions or advice! Smile


BTW Tomato is using 1.8 version of miniupnp.
Back to top
View user's profile Send private message
toddos



Joined: 25 Sep 2014
Posts: 4

PostPosted: Thu Sep 25, 2014 8:31 am    Post subject: Reply with quote

With the Xbox 360, there are a handful of fallback ports that the console will request if it can't get 3074. From what I've seen, Xbox One really, really wants 3074 rather than doing a fallback.

I don't have two Xbox One consoles on my network, but I do have an Xbox 360 and an Xbox One. I did some testing on my own, and it looks like Xbox One isn't playing nicely. I did the following order of events:


  1. Cleared all port mappings
  2. Started miniupnpd from the command line in debug mode
  3. Start Xbox 360 and forced UPnP by doing an Xbox Live test connection.
  4. Verified Xbox 360 got 3074/udp
  5. Start Xbox One and forced UPnP by doing a Test multiplayer connection and then hitting LT/RT/LB/RB combination for detailed statistics


When I do the LT/RT/LB/RB combo, that causes Xbox One to delete the existing 3074 port mapping for Xbox 360:

Code:
miniupnpd[27983]: DeletePortMapping: external port: 3074, protocol: UDP
miniupnpd[27983]: removing redirect rule port 3074 UDP


And then it requests 3074 for itself:

Code:
miniupnpd[27983]: AddPortMapping: ext port 3074 to 10.0.0.17:3074 protocol UDP for: Teredo leaseduration=0 rhost=
miniupnpd[27983]: UPnP permission rule 0 matched : port mapping accepted
miniupnpd[27983]: redirecting port 3074 to 10.0.0.17:3074 protocol UDP for: Teredo


I tried with strict mode on and off, and in both cases the Xbox One was able to delete 3074 and grab it for itself. So this seems like poor behavior on the part of Microsoft rather than miniupnpd.


Last edited by toddos on Thu Sep 25, 2014 8:35 am; edited 1 time in total
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Thu Sep 25, 2014 8:34 am    Post subject: Reply with quote

1) I don't understand the question... The "port forwarding" are "forwarding rules" (or port mapping)
2) miniupnpd removes a port mapping when asked (DeletePortMapping UPnP method) or with the "unused rule cleaning" feature. take a look at your miniupnpd.conf file to see how it is configured.
3) It is the UPnP client (the Xbox one here) which request for a specific port mapping.
4) version and configuration can differ.
5) if one of the XBox is off, it may have released the portmapping, and the other one can use that port...
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Thu Sep 25, 2014 8:39 am    Post subject: Reply with quote

toddos wrote:

When I do the LT/RT/LB/RB combo, that causes Xbox One to delete the existing 3074 port mapping for Xbox 360:

Code:
miniupnpd[27983]: DeletePortMapping: external port: 3074, protocol: UDP
miniupnpd[27983]: removing redirect rule port 3074 UDP


And then it requests 3074 for itself:

Code:
miniupnpd[27983]: AddPortMapping: ext port 3074 to 10.0.0.17:3074 protocol UDP for: Teredo leaseduration=0 rhost=
miniupnpd[27983]: UPnP permission rule 0 matched : port mapping accepted
miniupnpd[27983]: redirecting port 3074 to 10.0.0.17:3074 protocol UDP for: Teredo


I tried with strict mode on and off, and in both cases the Xbox One was able to delete 3074 and grab it for itself. So this seems like poor behavior on the part of Microsoft rather than miniupnpd.

we could try to add an IP check in DeletePortMapping() when securemode is enabled.
see https://github.com/miniupnp/miniupnp/blob/master/miniupnpd/upnpsoap.c#L710
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
toddos



Joined: 25 Sep 2014
Posts: 4

PostPosted: Thu Sep 25, 2014 8:49 am    Post subject: Reply with quote

miniupnp wrote:

we could try to add an IP check in DeletePortMapping() when securemode is enabled.
see https://github.com/miniupnp/miniupnp/blob/master/miniupnpd/upnpsoap.c#L710


I don't know if it's by design that clients can delete port mappings for other IPs in strict mode? I also don't know what the Xbox One will do if it tries to delete the mapping and fails. It should fall back to another port, but I suspect that it'll just fail and claim "moderate" or "strict" NAT. I think it'd be interesting to see what the 360 flow looks like when it tries to get 3074 and can't because it's already reserved (it's too late for me to do that tonight, but I can play with it again tomorrow evening). My suspicion is that 360 doesn't try to do a delete and instead just tries to add a port, and if the add is rejected then it goes to the next port in its list and tries until it finds a port it can redirect. If that's the case, then this sure sounds like bad implementation from Microsoft for Xbox One rather than a problem with miniupnpd.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Thu Sep 25, 2014 9:49 am    Post subject: Reply with quote

@toddos: you can try this patch : https://github.com/miniupnp/miniupnp/commit/c79c17115cf7bddb5a488e19a34af6dff6795006
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
toddos



Joined: 25 Sep 2014
Posts: 4

PostPosted: Fri Sep 26, 2014 5:14 am    Post subject: Reply with quote

It's working now, but the logs look odd. I wonder if maybe I wasn't actually enabling secure mode previously like I thought I was?

I pulled the latest changes from git, built, installed, modified the conf to enable secure mode, and then followed the same procedure as before, ensuring that the 360 got 3074/udp and then forcing UPnP on XBox One. This time, I got this:

Code:
miniupnpd[17449]: AddPortMapping: ext port 3074 to 10.0.0.17:3074 protocol UDP for: Teredo leaseduration=0 rhost=
miniupnpd[17449]: UPnP permission rule 0 matched : port mapping accepted
miniupnpd[17449]: port 3074 protocol UDP already redirected to 10.0.0.18:3074
miniupnpd[17449]: Returning UPnPError 718: ConflictInMappingEntry


Followed by:

Code:
miniupnpd[17449]: AddPortMapping: ext port 50679 to 10.0.0.17:50679 protocol UDP for: Teredo leaseduration=0 rhost=
miniupnpd[17449]: UPnP permission rule 0 matched : port mapping accepted
miniupnpd[17449]: redirecting port 50679 to 10.0.0.17:50679 protocol UDP for: Teredo


The only call to Delete that I see is this, which is odd since it requests to delete port 0:

Code:
miniupnpd[17449]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#DeletePortMapping
miniupnpd[17449]: DeletePortMapping: external port: 0, protocol: UDP
miniupnpd[17449]: removing redirect rule port 0 UDP


Yesterday, before pulling the latest from git (I was up to date as of a month ago), the Xbox One was very clearly sending DeletePortMapping calls. Now, it doesn't look like it's doing so. I also noticed that I didn't have CHECK_PORTINUSE enabled in config.h, which I believe would give the correct behavior without requiring strict mode (I'll have to recompile and try that). But this does at least confirm that if Xbox One can't get 3074 then it will fall back to another port. It just seems more aggressive at getting 3074 than Xbox 360 was.

Edit: Just tried again, this time with secure mode off and CHECK_PORTINUSE enabled in config.h. The Xbox One properly fell back to 50679 when 3074 was already in use, so it looks like OP just needs to enable that and recompile. Any reason why that's disabled by default? That seems like desired functionality to prevent this kind of crosstalk.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Fri Sep 26, 2014 7:40 am    Post subject: Reply with quote

toddos wrote:

Edit: Just tried again, this time with secure mode off and CHECK_PORTINUSE enabled in config.h. The Xbox One properly fell back to 50679 when 3074 was already in use, so it looks like OP just needs to enable that and recompile. Any reason why that's disabled by default? That seems like desired functionality to prevent this kind of crosstalk.

CHECK_PORTINUSE is useful if the port is used open by something on the router, or used in iptables. It doesn't change anything for ports already mapped with UPNP
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
toddos



Joined: 25 Sep 2014
Posts: 4

PostPosted: Fri Sep 26, 2014 8:02 am    Post subject: Reply with quote

Then I can't explain the difference here. I made sure to flush iptables before every repro, and with the latest git pull, CHECK_PORTINUSE, and secure mode off my Xbox One is now behaving nicely rather than trying to steal 3074 when it's already redirected. Prior to this pull I was up to date as of August 26, and I don't see any other significant changes to the server code that would explain the change in behavior.

At this point things are behaving correctly with respect to Xbox One falling back properly vs stealing 3074, so that's good enough for me.
Back to top
View user's profile Send private message
xruptor



Joined: 15 Sep 2014
Posts: 2

PostPosted: Fri Oct 03, 2014 3:11 pm    Post subject: Reply with quote

I apologize for the confusing. Pretty much the exact same issue Toddos is experiencing I'm having with the two Xbox Ones. They just don't play nice and are constantly trying to steal or fight over port 3074. It barely if ever falls over to the backup ports unless I forcefully reset one of the Xbox One units. I'm not entirely sure why they did this but there is obviously an issue with upnp and XBOX One console. It's almost like it demands to have port 3074 and doesn't care if it's in use.

I see you posted an update. Hopefully I can apply it to my Tomato based router and see if it works.

There are a lot of people on the web that have this issue. It's all connected to port 3074 and how Xbox One is utilizing it. I'm hoping your patch fixes the issue.
Back to top
View user's profile Send private message
ifrimmel



Joined: 03 Jan 2015
Posts: 3
Location: GA, USA

PostPosted: Sun Jan 04, 2015 1:36 am    Post subject: Bumping .. Reply with quote

I have this same issue. I am on current Trunk of CC from hnyman

I have tried just about everything and nothing works. Every permutation imaginable. Toredo is fighting for 3074 and doesn't fall over to anything else. I have ipv6 so I don't understand why it's not getting out that way ? whatever.. it's very annoying.

The thing that bothers me, is that people report that there are infact routers that work. Now how that is possible considering the behaviour I have observed, is completely beyond me.

I saw somewhere that say one needs to use PAT and not NAT.. does that make sense to anyone here?
Back to top
View user's profile Send private message
ifrimmel



Joined: 03 Jan 2015
Posts: 3
Location: GA, USA

PostPosted: Fri Feb 13, 2015 4:31 pm    Post subject: Reply with quote

Right, so I replaced my entire router with Debian Jessie and installed miniupnpd from APT and by building from source. Neither of these resolve the issue with the 2 xbox ones conflicting. I have tried secure/unsecure/NAT-PMP etc etc .. I am convinced M$'s uPNP implementation is broken. I saw a patch note come through on a recent Xbox update addressing this issue, but it seems just as bad as it was prior to the "patch".

What is the best way to log the interaction of the devices with the miniupnpd daemon to show connection requests, collisions, inbound routing failures or mis-routing ?

The IP's are static - so I would only need to log inbound/outbound traffic with miniupnpd itself. ( I really don't want the whole IPtables interaction since I Think that would just be way to much data ),

I do have NAT masquerading, but it's not using that. It's definitely a upnp thing on the M$ side.

Any suggestions ? I would prefer a simple view - a full debug output with all data movement would be hard to read .. really I just want to see port establish/maintain/route/close etc..

I have disable IPv6 .. so that is totally out of scope for this exercise, since they are using Teredo (3074).

THANKS!
Ivan.


Thanks
Ivan.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Wed Feb 10, 2016 7:29 pm    Post subject: Reply with quote

another user of this forum succeded in making 2 XBox's work thanks to "Port triggering"
http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=1820
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.