The pfSense Store

Author Topic: UPnP and multiple Xbox 360s (4-8)  (Read 24106 times)

0 Members and 1 Guest are viewing this topic.

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
UPnP and multiple Xbox 360s (4-8)
« on: October 25, 2007, 10:54:52 am »
Is it realistic to think that UPnP and Open NAT status are possible for more than one Xbox 360 behind 1 IP using pfsense(or any router for that matter)?

I am using 1.2 RC2 and have applied the upnp fix that RSW686 has submitted and as far as i can tell they are working.  However it seems that with multiple xbox 360s, you are sharing the port forwards between the Xbox 360s.  I check the XBL connection in the dashboard and it says open for all xbox 360s.  Should I try XBL connection test for all 4 Xbox 360s simultaneously?

The reason I am asking is because we play often online in Halo 3 and everyone claims that "We never get host."  Could this be the symptom of the multiple Xbox 360/UPnP thing?

I have everyone pointing the finger at me saying that this router software is inferior and I'm getting annoyed.  I get responses like "just get an xbox live compatible router and it will be easier and faster."  (of course those people only have one xbox at their house). I don't want an XBL compatible router at all.  I want pfsense!

Also once the xbox 360 is off should there still be entries in the uPNP status menu for the xbox 360s that were on a few hours ago?  In my case I still see entries in the upnp status from the night before.

Any help would be greatly appreciated.

EDIT: By the way I have enabled static ports.

Offline rsw686

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 520
  • Karma: +0/-0
    • View Profile
    • The Reptile File
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #1 on: October 26, 2007, 09:18:46 am »
However it seems that with multiple xbox 360s, you are sharing the port forwards between the Xbox 360s.
Every xbox 360 should have its own mapping in the UPnP status page.

The reason I am asking is because we play often online in Halo 3 and everyone claims that "We never get host."  Could this be the symptom of the multiple Xbox 360/UPnP thing?
What do you mean by "we never get host". I rarely play xbox 360 so put it in dumb terms as far as what you do to have that happen. Does this happen with one xbox 360 or just with multiple xbox 360 being on at the same time?

Also once the xbox 360 is off should there still be entries in the uPNP status menu for the xbox 360s that were on a few hours ago?  In my case I still see entries in the upnp status from the night before.
Yep I have noticed this as well. The issue is xbox 360 never deletes the port mappings. I think it expects the router to just delete them after an inactive time period. However every other UPnP software or device always deletes the mappings. Xbox aldo doesn't check for an exisiting mapping either. Thats why I had to update miniupnpd so that if the port forwarding for the xbox was already there it didn't create a new one on a different port.

It is not a big deal the mappings are left in place, except for having that port always being forwarded. I think there is a menu choice in the xbox 360 so you can delete the mapping manually, however it might be easier to just restart the service.

EDIT: By the way I have enabled static ports.
Gald you edited your post and added that. That was the first thing I was going to recommend.
« Last Edit: October 26, 2007, 09:21:05 am by rsw686 »

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #2 on: October 26, 2007, 10:21:06 pm »
When i said "We never get host" i was referring to Bungie's host choosing algorithm.  In the past few days we have gotten to host some games so this issue seems to be resolved (after i turned off traffic shaper)

Also it's true that all xbox 360s have their own entry... only one has the 3074 entry however.

we normally just press the power button to turn off the Xbox 360... do you think properly shutting the Xbox down will clear the port mappings in uPnP? like hold the X button and choose shutdown.

By the way RSW thank you for your help!!!  I have tracking your upnp progress and it has really helped my network!

I am currently using 6 Xbox 360s at my house using upnp.  I will keep you updated on how everything works.


Offline rsw686

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 520
  • Karma: +0/-0
    • View Profile
    • The Reptile File
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #3 on: October 26, 2007, 10:35:03 pm »
Also it's true that all xbox 360s have their own entry... only one has the 3074 entry however.

It is good to know turning off the traffic shaper seemed to fix the problem. Yep only one will have port 3074. All the xbox's must have their own unique port number. You only have one public IP. So from the outside the only way to request a specific xbox is with its unique port.

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #4 on: October 27, 2007, 05:57:52 pm »
We now have 7 xbox 360s on my network behind a pfsense box all working with upnp.  average upstream with all on xbox live is ~ 78-82KB/s... although i am using remote desktop from another location so this may be lower since RDP uses some upstream.
CPU usage is never more than 5%, avg 0-3% on:
AMD athlon 1.5ghz skt A
512mb  (2x256) registered DDR 266
ASUS mboard
8gb 5400rpm hard drive
generic compaq atx psu
3com 3c network cards
interfaces: lan, wan, opt1 and opt2

Thank you so much for your upnp help and the great router distro!

Offline forum

  • Full Member
  • ***
  • Posts: 100
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #5 on: November 06, 2007, 10:02:13 am »
it,s a serch on the site. or some swedish det är en sök sida här nånstans.   can,t i play with you ? what,s your namne on xbox live ?

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #6 on: November 13, 2007, 01:22:57 pm »
Quote
It is not a big deal the mappings are left in place, except for having that port always being forwarded. I think there is a menu choice in the xbox 360 so you can delete the mapping manually, however it might be easier to just restart the service.

How would I schedule the miniupnpd service to restart at 7:30AM every morning?  I would like those upnp entries cleared every morning when no one is playing.  I was scared to mess around with the crontab file since it stated that it is best to not edit the file manually.

Would it be something like

minutes - 30
hours 7
day *
month*
etc ?

command = /etc/init.d/miniupnpd restart?
(I'm new to Freebsd)


The reason I am asking is because after there were about 8-10 residual upnp entries for the xbox 360s on my network and after a few days, none of the Xbox 360s were able to connect to Xbox Live (similar to the symptoms I experienced pre-RSW patch to miniupnpd).  After I cleared the upnp entries (and the miniupnpd service was restarted) via the web interface and rebooted the Xbox 360s I was OK.  I normally manually restart the service but I would like to avoid using the web interface every day to do so.

It also seems like when two or more Xbox 360s are powered on at the same time (or very close together), one or more will fail to connect to Xbox Live the first couple times we try to connect.  Is this normal?

Thank you for your help.

Offline rsw686

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 520
  • Karma: +0/-0
    • View Profile
    • The Reptile File
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #7 on: November 13, 2007, 02:08:12 pm »
You would need to backup your config, add the cron item, and then restore your config.

   <cron>
      <item>
         <minute>30</minute>
         <hour>7</hour>
         <mday>*</mday>
         <month>*</month>
         <wday>*</wday>
         <who>root</who>
         <command>/usr/local/sbin/upnp_support restart</command>
      </item>
   </cron>

Since miniupnpd is supported with the livecd there is no rc file as the commands are php functions. You would need to download the following file. I would place it under /usr/local/sbin/. This will allow to interface miniupnpd from the command line.

http://wgnrs.dynalias.com/pfsense/miniupnpd/upnp_support

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #8 on: November 13, 2007, 04:33:17 pm »
Hey thanks for the script... That's a lot of work for you to write!  I will try it tonight and let you know how it works.

Offline rsw686

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 520
  • Karma: +0/-0
    • View Profile
    • The Reptile File
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #9 on: November 13, 2007, 04:46:58 pm »
Hey thanks for the script... That's a lot of work for you to write!  I will try it tonight and let you know how it works.

Your welcome! I am the miniupnpd maintainer and the script was a way for me to easily test out builds.

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #10 on: November 15, 2007, 11:28:15 am »
The script seems to be working AOK.  However my time/date is set incorrectly.  I did "date 0711151223" from SSH to set it to 12:20 11/15 but I'm not sure this is the proper way.  What is the proper way to set the time and date in Pfsense?

Offline rsw686

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 520
  • Karma: +0/-0
    • View Profile
    • The Reptile File
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #11 on: November 15, 2007, 11:41:20 am »
The script seems to be working AOK.  However my time/date is set incorrectly.  I did "date 0711151223" from SSH to set it to 12:20 11/15 but I'm not sure this is the proper way.  What is the proper way to set the time and date in Pfsense?

The date and time is set automatically via ntp. Make sure your timezone is set correctly on the System -> General page.

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #12 on: November 15, 2007, 03:28:23 pm »
ok time is now set properly via the general menu.  Sorry, I glanced there for a time setting but I missed it.  Should have done CTRL+F.  Thank you.

Offline xcrustwadx

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #13 on: November 16, 2007, 08:49:16 am »
OK.  The script/cron job definately works.  I just checked the upnp status and it's completely cleared!  This is great.

Are there any plans to build in a timeout for upnp port mappings?

The reason I ask is because it has been said that Xbox never bothers to release the ports when it is powered off (which I can certainly say is true from firsthand experience).  I know that this is actually a problem with the implementation on the Xbox's end and not with miniupnpd but restarting the service every morning seems like it may not be the best solution.  If there is any way I can help, please let me know.

Offline rsw686

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 520
  • Karma: +0/-0
    • View Profile
    • The Reptile File
Re: UPnP and multiple Xbox 360s (4-8)
« Reply #14 on: November 16, 2007, 08:54:29 am »
My debate about adding it into miniupnpd is deciding when is the port inactive. I'm not sure how easy it is to see the last activity since once the rule is created pfSense is dealing with the redirects not miniupnpd. I'll contact the miniupnpd author and see what his opinion is on this.