Recently in games Category

Gaming backlog

My little brother came out to visit over the 4th of July, and he pointed me to his new project: finishing his entire backlog of games. While I applaud his effort and wish him luck, he's more ambitious than I am. I have my own backlog (don't we all?), but I just don't have the motivation to take up the gauntlet and work my way through. There's too much new good stuff out now or coming soon that I'd rather get a taste of it all instead of immersing myself in one game at a time. That's not to say that I don't get caught up in certain games. I played Forza 2 nearly exclusively for all of June, and I continue to play it now. I just can't see myself focusing what little gaming time I have on going through my stack of games. Maybe someday ...

Xbox 360, Live, and NAT update


A little over a year ago, I posted how I fixed some problems I was having with Xbox Live by setting up UPnP on my Linux router. Since I was finally able to get my hands on an Xbox 360, I figured it was time to update my guide on using Live behind a Linux NAT. The instructions work for both Xbox and Xbox 360, but I'm going to focus on the Xbox 360 configuration this time around.

First things first. If you don't need to do this, don't do this. How do you know if you need to do this? Are you using Linux as a NAT router for your home network? Does the Xbox 360 report your NAT as moderate? If so, you probably need to do this. What is "this"? Keep reading.

Since the last time I posted, the Linux-IGD project has seen some development, but to look at their home page you wouldn't know it. Even the Sourceforge page still shows 0.92 as the latest version, having not been updated since January 12, 2003. All of the recent changes are in their CVS repository, though, so we'll build from that instead. Follow the instructions to checkout linux-igd to your machine.

If you followed my previous post, make sure you've fully uninstalled upnpsdk and linuxigd (a "make uninstall" should be enough for upnpsdk, and for linuxigd you should at least make sure upnpd is not running and remove the /etc/linuxigd directory). Once you've checked out the CVS project, you'll find a file called INSTALL. Read that to guide you through installing libupnp-1.2.1. Make sure you download version 1.2.1 and not version 1.2.1a from the download page. The INSTALL file is not exactly correct, as you can't just run "make" from the libupnp-1.2.1 root directory. Instead, go down into the upnp directory under libupnp-1.2.1 and run make there. This should also build ixml and threadutil at the previous directory level. Follow the rest of the INSTALL steps, making sure to copy the extra ixml and threadutil libs and includes. Finally, you can build and install the CVS linux-igd following the steps in the INSTALL file.

Before you fire up upnpd, first take a look through /etc/upnpd.conf and make sure everything is set to your liking. Some settings I suggest (these should be the defaults):

  • Make sure "iptables_location" points to the path to your iptables binary. This should default to /usr/sbin/iptables and should already be correct, but double-check to be sure.
  • debug_mode = 1. Without this, you're not going to be able to keep tabs on what upnpd is doing.
  • Make sure the chain names for forward and prerouting are correct for your configuration. The defaults should usually be right, but it doesn't hurt to double-check.
  • Set your upstream_bitrate and downstream_bitrate if you really care. These are in bits per second, not bytes, so make sure you multiply by 8 if you start from bytes per second. For example, 2 Megabits per second would be 2097152, but 2 MegaBytes per second would be 16777216.
Now you can fire up upnpd by running "upnpd <external ifname> <internal ifname>", where <external ifname> and <internal ifname> depend on your configuration (they are eth0 and eth1 for me, respectively, but yours might be different -- check /sbin/ifconfig if you're not sure). If all goes well, upnpd will now be running if you look at the process list (I use "ps waux | grep upnpd", and look for entries like "/usr/sbin/upnpd eth0 eth1"), and you should see some messages in /var/log/messages and /var/log/debug.

Now that that's taken care of, start up your Xbox 360 and go to the System blade. From here, choose Network Settings and then Test Xbox Live Connection. You'll be prompted that testing the connection will sign out all profiles, so choose Yes and get down to business. You should now see something like this:

The most important line is the one called "NAT", and it should read "Open", like so:
(For original Xbox users, read my original post for steps to check your NAT level.) If it doesn't, something went wrong. On the linux box, run "tail -f /var/log/debug" (if your syslogd is configured to log debug messages somewhere else, tail that log instead -- you can find out what your syslogd will do by looking at /etc/syslog.conf). When you run the Test Xbox Live Connection troubleshooter, you should see something similar to the following in your log when it gets to the "Xbox Live" portion of the test.
If you don't see that, run "killall upnpd" and then check ps to make sure upnpd has died before restarting it. Watch the debug log when restarting, and if you see any errors you can look into the Linux-IGD forums to see if you can find some help. Luckily for me, everything worked great the first time.

By the way, if you have a Windows box behind your NAT, it should now pick up the UPnP gateway device (you may have to install some components through the Add/Remove Programs applet to be able to see UPnP connections, and even if you already have UPnP support installed you'll need to reboot for the OS to pick up the gateway device). For example, on my XP laptop, I now see this in my Network Connections control panel:

From here, you can drill down into the gateway device's Status, then Properties, and finally Settings to see the list of current port mappings.
If you can't get this working, you can use Noel Danjou's UPnPTest (about halfway down the page, "Univeral Plug-and-Play Tester") to test your UPnP configuration instead. Linux-IGD still reports itself as version 0.92, but the CVS version is really something like 1.04 or 1.05 now.

Hopefully this will help out other people trying to get Xbox Live working on their original Xbox or new Xbox 360, since Microsoft doesn't officially support Linux as a NAT router. If you've had problems and been told to go buy a router off of the official compatibility list even though you'd rather continue with your Linux setup, this is for you.

Update: One minor note that I forgot. You may need to do a little bit of manual patching of the linux-igd code, if that fix hasn't merged into CVS. Read that thread, and look in your downloaded code to see if you need to manually patch or not before you actually build.

XBox Live!, Linux, NAT, and UPNP


A little bit of background first. I've been a subscriber to XBox Live! since its launch in November of 2002. For a while, I was on DSL (at my old apartment), and had a nice static IP dedicated solely to the XBox. Later, I bought a house and could no longer get DSL, so I switched to cable. No more nice static IPs, but I paid for a second dynamic IP and strung a looooong ethernet cable across my entire house and hooked up the XBox that way. In both of these cases, life was good. Of course, I couldn't just leave well enough alone. I was annoyed by the long ethernet cable, and Microsoft had just shipped the XBox Wireless Adapter, so I bought it. Now, a bit of background on my wireless setup: I use a Linux machine to do Network Address Translation (NAT) for my internal network (a wired desktop, a wireless laptop, a wireless TiVO, and now a wireless XBox). I've used a similar setup since college, oh so many years ago (I believe the first time I set this up was 1998). Anyway, back to the story. I plugged in the XBox wireless adapter, set it up, and things worked great. The XBox could connect to Live!, and I could play games. Then I noticed that there were some games I couldn't connect to. I lived with it, because there was usually an abundance of games to choose from (btw, my poison of choice is Project Gotham Racing 2 (PGR2)). Now that the game has been out for more than a year, the number of available online games or "rooms" has dwindled, and the "This session is no longer available" message is much more annoying. When there are only four or five available games in the list, and I can only connect to one of those if I'm lucky, my gaming time is spent more on searching for games than actually playing.

Well, I finally decided to do something about it. I was told to check out this page to help diagnose my problem. The key metric here was the "NT" value, or NAT Type. My XBox reported that value as 1, or "open", which means I shouldn't have any problems connecting to online games. And yet, I was. The description of NAT Type 1 is as follows, and gave me my first clue:

Open NAT means that either the port assignment policy is minimal or the router has a fully compliant version of UPnP (Universal Plug and Play) enabled by default.

About this Archive

This page is an archive of recent entries in the games category.

code is the previous category.

other is the next category.

Find recent content on the main index or look in the archives to find all content.



OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.01