HOWTO: XBOX360 Internet Through Laptop

From Sabayon Wiki
Jump to: navigation, search
i18n: en it

Use your laptop as the wireless interface for you XBOX360
xbox --> cable --> pc --> wireless --> router --> internet

OK, I'm pretty sure you could do two things on this.

1. Bridge the cards into the same IP range, and then you'd have connectivity.
2. Assign different IP range to LAN card than the WIFI card and then enable IP routing.

For me, the second is the easiest, because I've done it. The first, whilst in theory it should work, I'm not entirely sure as I've not tested it. But you could try, and I'll explain how I think it should work.

Esentially this sets up 2 IP ranged networks and provides routing between the two.

1) Bridging the cards

Ensure that bridge-utils are installed. You can then use a command called brctl to do many things such as add a bridge, etc. Here is how I just bridged my eth0 with wlan0.

[email protected]:/home/ian# brctl show
bridge name    bridge id        STP enabled    interfaces
pan0        8000.000000000000    no

shows that I don't have any bridges other than the bluetooth one that was set up on my system already.

[email protected]:/home/ian# brctl addbr mybridge
[email protected]:/home/ian# brctl show
bridge name    bridge id        STP enabled    interfaces
mybridge        8000.000000000000    no        
pan0        8000.000000000000    no

now you can see I've created a bridge called mybridge, and so now I need to add interfaces:

[email protected]:/home/ian# brctl addif mybridge eth0 wlan0
[email protected]:/home/ian# brctl show
bridge name    bridge id        STP enabled    interfaces
mybridge        8000.001a4b65d43e    no        eth0
pan0        8000.000000000000    no

now you can see I've added eth0 and wlan0 to "mybridge". Now, you can allocate IP addresses from the same range to the xbox as you would for the wlan0 interface. For example, if I had all this, I would have something like:

Internet Router - wlan0 - xbox -

default router for the xbox would be, the same as it is for wlan0, and then of course you just need to supply the same DNS servers that you have for the PC using wlan0, so check /etc/resolv.conf and look for the nameserver lines, and give this IP address in here to the xbox for the DNS.

As I said, I don't know if this works, you can try it, but the next step definitely works.

2) Routing

Now, another way is with routing, and so what you'd need to do is look inside /etc/sysctl.conf for the following line:

net.ipv4.ip_forward = 1

if it's set to 0 set it to 1 like above, and then do:

sysctl -p

to activate the setting, or alternatively, just simply reboot. Now, ensure you have an IP address assigned to eth0 that is different from wlan0. For example, this is how I would do it:

xbox: eth0: wlan0: router:

so that you understand the above, your current internet connection is via the router, which is in my example (of course replace this with your IP that you have for your router). Also, replace my IP for wlan0 with your IP. Then, what you need to do is ensure that the xbox uses a default gateway that points to the IP of eth0, so the default gateway for the xbox in my example is For DNS, you'll have to use whatever you normally use for your PC that has the internet connection (check in /etc/resolv.conf as before). Now, once that's been done, you should be able to ping eth0 and wlan0 from the xbox, but you won't be able to go any further. This is because now, we need to set up iptables to do NAT'ing for us, so ensure you have iptables installed, and then run it by doing:

chkconfig iptables on
service iptables start

then, do:

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

this will ensure that you have source nat set up for the xbox connection, so that it will pass through your PC and go to the internet. Once this is done, you should then be able to ping the internet router, which in my example was And if that works, you should be able to browse the internet!