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 05: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 05: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 06: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 09:55 PM

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

Nergar 08-20-2008 02: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 02: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 12:27 PM

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 05:02 PM

Hey! thanks it works now!!!

WarTurkey 07-08-2009 01: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 01: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 04: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 01: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 11: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 11: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 12:30 PM

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


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