Linux server as a wireless bridge

Since learning the XBox 360 doesn’t come with a wifi adapter, and that buying such a thing would add another 60 pounds to the cost of the console… I’ve been thinking of different ways to get an Internet connection from my high-speed wired network in the living room out to the router way out in the spare room. For many reasons, it’s just not practical for me to wire the whole flat.

Most of the solutions I came up with involved things like ‘spending money’, which I’m slightly adverse to do if I can do it with the existing kit, so these are the really basic steps to turn the existing linux box (with both wireless and wired cards) into a useful bridge. As usual, don’t be fooled into thinking this guide is here for anyone else, as much as it’s here for me when I need to rebuild the machine and I’ve forgotten it all. But feel free to leave a comment about how much warmer and fuzzier I’ve made your life through your use of these “instructions”.

The current configuration

Fedora 8 installation
Wireless Ethernet (ath0) card is connected as
Wired Ethernet (eth1) card is connected as
Named/bind/DNS server already configured and set-up to accept requests on
The Xbox will be wired, on

Setting up Fedora

Setup the forwarding rules

#Outgoing requests
iptables -t nat -A POSTROUTING -s -o ath0 -j MASQUERADE
iptables -A FORWARD -s -o ath0 -j ACCEPT
iptables -A FORWARD -d -m state --state ESTABLISHED,RELATED -i eth1 -j ACCEPT
#Incoming requests (port forwarding)
iptables -t nat -A PREROUTING -p tcp -i ath0 -d --dport 88 -j DNAT --to
iptables -t nat -A PREROUTING -p tcp -i ath0 -d --dport 3074 -j DNAT --to

Save your rules so they’re applied on start-up
sudo iptables-save > /etc/sysconfig/iptables

Enable ipv4 port forwarding
nano /etc/sysctl.conf
Change this line
net.ipv4.ip_forward = 0
net.ipv4.ip_forward = 1

The client machine / Xbox 360

Now on your client machine (note this will only have a wired connection).
IP Address:
Subnet mask:
Default Gateway:
DNS Server:

You’re going to need a DHCP server so that these settings are automatically assigned to the XBox 360. If don’t have one for your subnet already, you can set it up through dhcpd. You’ll probably want to do something about

Edit /etc/dhcpd.conf

ddns-update-style interim;
# HardWired
subnet netmask {
option routers;
option domain-name-servers;
# Assign a static IP
host xbox {
hardware ethernet 00:45:40:10:FE:12;

Then restart dhcpd
/etc/rc.d/init.d/dhcpd restart


Remember those ports we forwarded on the server? You’ll also need to add port forwarding to your router, to forward the same ports (88, 3074) to the Fedora machine on

And that’s really it. You should now be able to connect to the Internet without any troubles.

Tags: , , , , ,


    • luke
    • April 9, 2008
    • Reply

    can also use the ‘brctl’ command in linux to create a bridge between each of the interfaces… might also be worth looking into

Leave a Reply?