Anonymous - 2008-05-10

Just a few pointers to anyone wanting to access 360 Media Server on a different network via a Linux router with iptables. I don't claim this is the best/only/sensible way, but it's what worked for me. Better suggestions welcome!

The problem: Xbox 360 on one LAN, 360 Media Server on another LAN, connected by a Linux box (Fedora 7) acting as a router with iptables. Need to do some fiddling to make this work:

(Xbox 360 is "xbox" on eth3, 360 Media Server is running on "sv01" via eth1)

1) Install/configure mrouted:


    phyint eth0 disable
    phyint eth1
    phyint eth2 disable
    phyint eth3

2) Configure iptables to allow multicasts. Seem to need all three rules:

    for lan in eth1 eth3
        iptables -A OUTPUT  -o ${lan} -d -j ACCEPT
        iptables -A INPUT   -i ${lan} -d -j ACCEPT
        iptables -A FORWARD -i ${lan} -d -j ACCEPT

3) Allow forwarding of media server traffic between xbox and server
  (Seems to use all manner of TCP and UDP so less hassle if we just open the gates)

    iptables -A FORWARD -i eth3 -o eth1 -s xbox -d sv01 -j ACCEPT
    iptables -A FORWARD -i eth1 -o eth3 -d xbox -s sv01 -j ACCEPT

4) This is the killer. Multicasts from the Xbox only have a TTL of 1, so they evaporate
   in the router. This fixes that little problem:

    iptables -t mangle -A PREROUTING -i eth3 -d -j TTL --ttl-set 2

5) Run mrouted (must be done after #2 above)


6) Run up 360 Media Server and enjoy :)

Hope this is useful to someone.