Navigation
Scripts
Guides
Involvements
TnN Show
Favorite Linux Distros
Gentoo
Debian

Xbox Live NAT with Iptables

My Situation...

As some may know, Xbox Live can be a fun but troubling experience. When I first configured the network for my Xbox 360, I did not receive any notices about network incompatibilities. However, after several months of being on Live, I came across the error, "Can Not Connect to Xbox Live Party". After Googling around for a solution I discovered that this error was occuring because of my NAT settings. I did a network test on my Xbox 360, and sure enough, my NAT was recognized as "Moderate". According to several sources, Xbox Live does not play nice with "Strict" or "Moderate" NATs. On the bright side, Xbox Live does like "Open" NATs. Now one may ask how to make their NAT set to "Open". To complete this task, you can use iptables with your home server acting as a router with Linux. Read on with these step by step instructions...

Assumptions:

You have a static IP set for your Xbox, you have your NAT setup on a box using iptables, you have root access to the aforementioned box

Step 1/3

Log onto your computer running the NAT with iptables as root. This may be done locally or through a remote shell. You may use su or login directly as root.

Step 2/3

Enter the following commands in your shell. Be sure to replace "192.168.x.x" with your Xbox's local IP address. Also make sure that "eth0" is replaced with the WAN adapter.

# iptables -t nat -A PREROUTING -p udp --dport 88 -i eth0 -j DNAT --to 192.168.x.x
# iptables -t nat -A PREROUTING -p tcp --dport 3074 -i eth0 -j DNAT --to 192.168.x.x
# iptables -t nat -A PREROUTING -p udp --dport 3074 -i eth0 -j DNAT --to 192.168.x.x
# iptables -t nat -A POSTROUTING -p udp -s 192.168.x.x --sport 88 -j MASQUERADE --to-ports 88
# iptables -t nat -A POSTROUTING -p tcp -s 192.168.x.x --sport 3074 -j MASQUERADE --to-ports 3074
# iptables -t nat -A POSTROUTING -p udp -s 192.168.x.x --sport 3074 -j MASQUERADE --to-ports 3074

As you may have noticed, these commands allow the Xbox to have access to ports 3074 and 88 with tcp and udp. These are the ports required for full Xbox Live functionality.

Step 3/3

Now you may test your network connection with your Xbox and it should test succesfully with no errors. You can now enjoy Live without limitations.

Do you have questions or comments? If so submit a comment at this post or e-mail me.