LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxAnswers Discussion (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/)
-   -   DISCUSSION: Connecting to XBox Live through a linux computer connected to a wireless LAN (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/discussion-connecting-to-xbox-live-through-a-linux-computer-connected-to-a-wireless-lan-467229/)

veritas 07-24-2006 04:29 PM

DISCUSSION: Connecting to XBox Live through a linux computer connected to a wireless LAN
 
This thread is to discuss the article titled:
Connecting to XBox Live through a linux computer connected to a wireless LAN

Quote:

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

Nergar 02-12-2007 04:53 PM

Great tutoria
 
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

SiegeX 12-14-2007 05:04 PM

He forgot to tell how to Port Forward the Xbox live connection. Here is what you need

Code:

$IPTABLES -t nat -A PREROUTING -i $WAN_IF -p tcp --dport 3074 -j DNAT --to-destination $XBOX_IP
  $IPTABLES -t nat -A PREROUTING -i $WAN_IF -p udp -m multiport --dports 88,3074 -j DNAT --to-destination $XBOX_IP
  $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p tcp --dport 3074 -j ACCEPT
  $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p udp -m multiport --dports 88,3074 -j ACCEPT

Make sure you set the variables appropriately

troubledlinuxuser 08-19-2008 08:55 PM

making it permanent
 
it wont seem to stay permanent can some one please help me?

Nergar 08-20-2008 01:01 AM

Quote:

Originally Posted by troubledlinuxuser (Post 3253306)
it wont seem to stay permanent can some one please help me?

What distro are you using?

I think I used /etc/rc.local in ubuntu.

troubledlinuxuser 08-20-2008 01:04 PM

Distro
 
im using Ubuntu. but rc.local has no effect, i can type it into my terminal get it to work but then after i turn off my computer it never works again.

also could ndis wrapper have any affect on this?

Nergar 08-21-2008 11:27 AM

I don't think ndiswrapper has anything to do but I can't be sure.

Did you tried creating a script in your /home directory and executing it with rc.local?

/home/daniel/xboxnet.sh:

Code:

#!/bin/bash
ifconfig eth0 up
ifconfig eth0 192.168.2.1
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE

and /etc/rc.local:
Code:

#!/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.

troubledlinuxuser 08-30-2008 04:02 PM

Hey! thanks it works now!!!

WarTurkey 07-08-2009 12:38 AM

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!

WarTurkey 07-08-2009 12:46 AM

Quote:

Originally Posted by WarTurkey (Post 3600439)
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!

takeitslow 06-25-2010 03:31 PM

sorry I'm so late to the game
 
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.

WarTurkey 07-04-2010 12:27 AM

taketslow: the $IPTABLES for me is literally just iptables on the command line. the $WAN_IF refers to the interface that the computer uses to connect to the internet. In my case, this was wifi0, as the laptop connected using WiFi. If you are using 2 wired connections and eth0 is connected to the internet and eth1 is to the xbox, $WAN_IF would be eth0.

Hope this helps you!

joshfedo 09-02-2010 10:58 PM

not working
 
it says can't connect to your router because your network hardware is using a static ip. your manually defined ip may be wrong"

my router is 192.168.1.1 so i just copied word for word did i do something wrong?
Xbox reads:
ip:192.168.2.2
sub net:225.255.255.0
geateway:192.168.2.1
DNS: 192.168.1.1

Quote:

root@bt:~# ifconfig eth0 192.168.2.1
root@bt:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:d4:36:b1:8c
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::216:d4ff:fe36:b18c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:620 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51864 (51.8 KB) TX bytes:468 (468.0 B)
Interrupt:22 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:140 errors:0 dropped:0 overruns:0 frame:0
TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7000 (7.0 KB) TX bytes:7000 (7.0 KB)

wlan0 Link encap:Ethernet HWaddr 00:14:a5:b6:fb:91
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::214:a5ff:feb6:fb91/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11047 errors:0 dropped:0 overruns:0 frame:0
TX packets:10041 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11328524 (11.3 MB) TX bytes:1750697 (1.7 MB)

root@bt:~# cat /proc/sys/net/ipv4/ip_forward
1
root@bt:~# iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
root@bt:~#

WarTurkey 09-05-2010 10:32 PM

Quote:

Originally Posted by joshfedo (Post 4086654)
it says can't connect to your router because your network hardware is using a static ip. your manually defined ip may be wrong"

my router is 192.168.1.1 so i just copied word for word did i do something wrong?
Xbox reads:
ip:192.168.2.2
sub net:225.255.255.0
geateway:192.168.2.1
DNS: 192.168.1.1

IP addresses beginning with 192.168.x.x are class C addresses. This means that the first 3 groups of digits must be the same, so if the router is 192.168.1.1, the Xbox needs to be 192.168.1.x, where x can be anything from 2 to 254. So the Xbox should be:

IP: 192.168.1.2
subnet: 255.255.255.0
gateway: 192.168.1.1
DNS: 192.168.1.1

Mouon 12-26-2010 11:30 AM

Simple solution, very good. Works as intended. I'm running Arch Linux i686. Thank you!

paul_warren 06-13-2011 04:05 PM

Quote:

Originally Posted by SiegeX (Post 2990941)
He forgot to tell how to Port Forward the Xbox live connection. Here is what you need

Code:

$IPTABLES -t nat -A PREROUTING -i $WAN_IF -p tcp --dport 3074 -j DNAT --to-destination $XBOX_IP
  $IPTABLES -t nat -A PREROUTING -i $WAN_IF -p udp -m multiport --dports 88,3074 -j DNAT --to-destination $XBOX_IP
  $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p tcp --dport 3074 -j ACCEPT
  $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p udp -m multiport --dports 88,3074 -j ACCEPT

Make sure you set the variables appropriately

Hi when i type in the first line it says iptables 4.4 option "--to-destination" requires an arguement, please forgive me im new to Linux and the answer is porobly in front of me .thanks

koolfue8 09-15-2011 08:38 PM

Wait what???
 
Quote:

Originally Posted by WarTurkey (Post 3600443)
Oops! I was lazy, and I didn't read to set the IP to the ROUTER, and not just the LAPTOP! Very sorry!

Im having the exact same problem and I dont understand how you fixed it would you mind explaining it further?? Im very noob at all this.

WarTurkey 09-17-2011 02:47 PM

Certainly, however first I would need to know a little bit of information from you:
  • The output of the command,
    Code:

    ifconfig
  • What kind of xbox are you using (Original, 360)

koolfue8 09-20-2011 12:45 AM

Quote:

Originally Posted by WarTurkey (Post 4474670)
Certainly, however first I would need to know a little bit of information from you:
  • The output of the command,
    Code:

    ifconfig
  • What kind of xbox are you using (Original, 360)

Sure no problem the output of the command ifconfig is below.

eth0 Link encap:Ethernet HWaddr 00:e0:b8:d7:82:b1
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:b8ff:fed7:82b1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:265888 errors:1 dropped:2671 overruns:0 frame:1
TX packets:276358 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41910851 (41.9 MB) TX bytes:59176605 (59.1 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

wlan0 Link encap: Ethernet HWaddr 00:c0:a8:e5:5c:a4
inet addr:10.0.0.8 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:a8ff:fee5:5ca4/64 Scope:Link
UP BROADCASTING RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33631 errors:0 dropped:0 overruns:0 frame:0
TX packets:20345 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50387776 (50.3 MB) TX bytes:1839033 (1.8 MB)

And im running with an Xbox 360 but not the slim one. if that makes sense.

WarTurkey 09-23-2011 09:01 AM

I'm sorry for the late response, but here would be the correct settings for your particular situation:

Code:

iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.2.2
  iptables -t nat -A PREROUTING -i wlan0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.2.2
  iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p tcp --dport 3074 -j ACCEPT
  iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p udp -m multiport --dports 88,3074 -j ACCEPT

And then on your Xbox, you need to set the Network settings manually to this:

Code:

IP Address:      192.168.2.2
Subnet mask:    255.255.255.0
Gateway:        192.168.2.1

DNS/Nameserver:  192.168.2.1


koolfue8 09-28-2011 10:09 PM

Im sorry for the late response myself but thanks so much that was a lot of help :D!

guitaristmatt 02-01-2012 08:27 PM

eth0 Link encap:Ethernet HWaddr c8:0a:a9:df:42:16
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::ca0a:a9ff:fedf:4216/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2491 errors:0 dropped:1902 overruns:0 frame:0
TX packets:3343 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:188736 (188.7 KB) TX bytes:731843 (731.8 KB)
Interrupt:43 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2498 errors:0 dropped:0 overruns:0 frame:0
TX packets:2498 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:259579 (259.5 KB) TX bytes:259579 (259.5 KB)

wlan0 Link encap:Ethernet HWaddr 70:f1:a1:f0:a7:80
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::72f1:a1ff:fef0:a780/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:639935 errors:0 dropped:0 overruns:0 frame:0
TX packets:523572 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:674334897 (674.3 MB) TX bytes:116570008 (116.5 MB)

Did everything exactly like tutorial and still get DNS error. Any mistakes you can find?

WarTurkey 05-08-2012 09:50 AM

guitaristmatt: can I see the exact format of the command you typed? I mean the iptables command, in your case however.


All times are GMT -5. The time now is 07:40 AM.