-   Linux - Networking (
-   -   Xbox live through a Linux gateway? (

Andrew Benton 03-19-2005 10:54 AM

Xbox live through a Linux gateway?
Hello forum. My son has an xbox connected to his PC with a crossover cable. He has been using internet connection sharing on Windows XP to connect the xbox to the web. Then the other day he installed something he shouldn't have "...but dad, I didn't install anything, all I did was click yes..." and now Windows is more borken than usual. I'd like to install linux. Linux can do everything we need that computer to do, except connect the xbox to the net. So I've installed Ubuntu for now and if we can get the xbox to work I'll build Linux From Scratch.

The PC connects to the web with a SpeedTouch USB modem. It took me a couple of days to figure out how to get the ethernet card working (I've never needed it before) but now that's built into the kernel. From the PC I can ping the xbox. I've setup a dhcp server on the PC. The xbox likes the dhcp server and gives a different error message if that's not running. So they're talking. The problem is the xbox can't see the web. I've done

ifconfig eth0 netmask
route add -host dev ppp0
echo 1 > /proc/sys/net/ipv4/ip_forward

and /etc/dhcpd.conf looks like this

default-lease-time 600;
max-lease-time 7200;
option subnet-mask;
option broadcast-address;
# option routers;
option domain-name-servers,;
# option domain-name "localhost.localdomain";

subnet netmask {

I think the problem is I don't know how to set the internet address of the PC on the local network but I'm not sure. I've also tried various masquerading firewall rules but It didn't help. Any suggestions?

odious1 03-20-2005 09:05 AM

i don't know if there is a way to get tcp/ip info directly from the xbox or not but you could stop your dhcpd server on the linux machine and restart it by dhcpd -d -f which will run it in the foreground. restart your xbox and watch the standard out messages as the xbox makes its lease request. you will see the offer and acceptance if things are set up properly. if the box is getting its lease then the next step is to set up nat firewall rules. confirm that the xbox is getting a lease and post back with the ouput of iptables -L


Andrew Benton 03-25-2005 01:58 PM

Thanks for your response. Sorry I didn't reply but by the time you posted I'd already caved in and give him the windows CDs. I was up to my neck with college work and didn't have the time to read up on how to get it fixed, which is why I posted for help. Anyway, with that essay is done I've had time over the last two days to get this sorted out. LFS is built. I bought a new ethernet card and another crossover cable so I could connect my sons computer to mine and work out how to do masquerading with two normal computers and then applied what I learned to the xbox. I didn't need the dhcp server, the settings that worked were these firewall/nat/masquerading rules

iptables -A INPUT  -i lo -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -s -j MASQUERADE
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT
iptables -P INPUT DROP
iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT

and these routing details (the xbox is on eth1 now because I bought another card)

ifconfig eth1 netmask &&
route add -host dev ppp0 &&
echo 1 > /proc/sys/net/ipv4/ip_forward

On the xbox I manually entered our ISP's nameserver numbers, set the xbox's address as with a netmask of and (the PC) as the gateway.
It's good to be rid of windows. It was through msn messenger he was getting infected with stuff. Gaim works fine and in the unlikely event that anything bad happens, on Linux he only has write permission in his home folder, which limits the damage.

All times are GMT -5. The time now is 10:01 AM.