| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
|
By veritas at 2006-07-03 15:24
|
|
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
4. You have a crossover cable
5. Your WLAN interface is wlan0, and LAN is eth0
5. iptables is installed
The guide
1. Configure eth0
First, assign an IP address to the eth0 interface, which is the card that is connected to the Xbox via a crossover cable. Be sure to 'su' to root before continuing.
Code:
# ifconfig eth0 up
# ifconfig eth0 192.168.2.1
These two commands should have assigned an ip address to eth0. Verify this with
The ip address assigned should be a network that is not in use on your network. If your router address is 192.168.2.1 use something besides 2.1... 0.1, 1.1, etc.
2. Enable forwarding
The next step is enabling IP forwarding. Check to see if forwarding is enabled:
Code:
# cat /proc/sys/net/ipv4/ip_forward
If the output is 1, you are good. If its 0, then run this command:
Code:
# echo "1" > /proc/sys/net/ipv4/ip_forward
3. Configure iptables
With iptables, you can forward all of the traffic from eth0 to your wireless card wlan0:
Code:
# iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
You may have to replace 192.168.2.0 with whatever your network was from step 1. If you used 192.168.1.1 as the IP, then use 192.168.1.0 with the iptables command.
4. Configure the Xbox
Go into the dashboard and then go to network settings. Then select IP Address and set the configuration type to manual. Here are the settings if you configured your eth0 as 192.168.2.1:
IP Address: 192.168.2.2
Subnet mask: 255.255.255.0
Gateway: 192.168.2.1
Go back a screen and go to DNS Servers. Set the primary DNS server to your router's IP address. Now, go back to the network settings screen and go to Connect. You should now be connected to Xbox live.
5. Making it permanent
If you restart your computer, you will lose all of these settings. So find the custom startup script for whatever distro you are using (for slackware, open the file /etc/rc.d/rc.local) and add this text to the file:
Code:
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
You should be good to go next restart.
|
|
|
|
All times are GMT -5. The time now is 08:32 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|
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
I think I used /etc/rc.local in ubuntu.
also could ndis wrapper have any affect on this?
Did you tried creating a script in your /home directory and executing it with rc.local?
/home/daniel/xboxnet.sh:
NOTE: both files need to be executable.
Would be great if I could get this to work! Any idea of how to fix it would be nice!
Would be great if I could get this to work! Any idea of how to fix it would be nice!