Connecting to XBox Live through a linux computer connected to a wireless LAN
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
By veritas at 2006-07-03 15:24
Introduction
This is a common setup for Xbox users. You have a computer, TV and Xbox in one room, and a wireless router on the other side of the home. A logical option, besides buying an Xbox wireless adapter, is to connect your xbox to a PC that is connected to that router. In my opinion, is just as easy to get this working in Linux as it is in Windows.
Assumptions
1. You have a WLAN card and a regular LAN card installed
2. Both have working drivers installed
3. You can connect to the router with the wireless card and access the internet without problems
4. You have a crossover cable
5. Your WLAN interface is wlan0, and LAN is eth0
5. iptables is installed
The guide
1. Configure eth0
First, assign an IP address to the eth0 interface, which is the card that is connected to the Xbox via a crossover cable. Be sure to 'su' to root before continuing.
Code:
# ifconfig eth0 up
# ifconfig eth0 192.168.2.1
These two commands should have assigned an ip address to eth0. Verify this with
Code:
# ifconfig
The ip address assigned should be a network that is not in use on your network. If your router address is 192.168.2.1 use something besides 2.1... 0.1, 1.1, etc.
2. Enable forwarding
The next step is enabling IP forwarding. Check to see if forwarding is enabled:
Code:
# cat /proc/sys/net/ipv4/ip_forward
If the output is 1, you are good. If its 0, then run this command:
Code:
# echo "1" > /proc/sys/net/ipv4/ip_forward
3. Configure iptables
With iptables, you can forward all of the traffic from eth0 to your wireless card wlan0:
You may have to replace 192.168.2.0 with whatever your network was from step 1. If you used 192.168.1.1 as the IP, then use 192.168.1.0 with the iptables command.
4. Configure the Xbox
Go into the dashboard and then go to network settings. Then select IP Address and set the configuration type to manual. Here are the settings if you configured your eth0 as 192.168.2.1:
IP Address: 192.168.2.2
Subnet mask: 255.255.255.0
Gateway: 192.168.2.1
Go back a screen and go to DNS Servers. Set the primary DNS server to your router's IP address. Now, go back to the network settings screen and go to Connect. You should now be connected to Xbox live.
5. Making it permanent
If you restart your computer, you will lose all of these settings. So find the custom startup script for whatever distro you are using (for slackware, open the file /etc/rc.d/rc.local) and add this text to the file:
hey, great tutorial you gave me one more reason to erase my XP partition.
only one thing. when i test my xbox live connection i have a NAT error, it shows MODERATE. Do you know what can i do to fix this, when i connected through XP i didn't have this error.
thanx
by SiegeX on Fri, 2007-12-14 18:04
He forgot to tell how to Port Forward the Xbox live connection. Here is what you need
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/daniel/xboxnet.sh
also make sure nm-applet is not messing with eth0
NOTE: both files need to be executable.
by troubledlinuxuser on Sat, 2008-08-30 16:02
Hey! thanks it works now!!!
by WarTurkey on Wed, 2009-07-08 00:38
Well, I guess I'm the lone soul who this doesn't work even the first time. I don't get any errors upon entering the commands, but when I test my Xbox Live connection, it says there were errors and that it could not reach the xbox live servers or Xbox.com. When I set the DNS to manual and to the address of the laptop (192.168.2.1, like in the tutorial) it hangs for a while and then gives a different error.
Would be great if I could get this to work! Any idea of how to fix it would be nice!
by WarTurkey on Wed, 2009-07-08 00:46
Quote:
Originally Posted by WarTurkey
Well, I guess I'm the lone soul who this doesn't work even the first time. I don't get any errors upon entering the commands, but when I test my Xbox Live connection, it says there were errors and that it could not reach the xbox live servers or Xbox.com. When I set the DNS to manual and to the address of the laptop (192.168.2.1, like in the tutorial) it hangs for a while and then gives a different error.
Would be great if I could get this to work! Any idea of how to fix it would be nice!
Oops! I was lazy, and I didn't read to set the IP to the ROUTER, and not just the LAPTOP! Very sorry!
by takeitslow on Fri, 2010-06-25 15:31
I've successfully connected my Xbox 360 to the internet, but then it says that it does not recognise the port for xbox and xbox live. I think this has to do with the port-forwarding seigex talked about, but I am unsure what to type for $IPTABLES and $WAN_IF when he says to replace the variables. Help would be nice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
only one thing. when i test my xbox live connection i have a NAT error, it shows MODERATE. Do you know what can i do to fix this, when i connected through XP i didn't have this error.
thanx
I think I used /etc/rc.local in ubuntu.
also could ndis wrapper have any affect on this?
Did you tried creating a script in your /home directory and executing it with rc.local?
/home/daniel/xboxnet.sh:
NOTE: both files need to be executable.
Would be great if I could get this to work! Any idea of how to fix it would be nice!
Would be great if I could get this to work! Any idea of how to fix it would be nice!