Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 194
Rep:
ip forwarding, routing table
I'm working on Slackware 13, and trying to connect an XBox to the internet by connecting it through the ethernet cable on a computer picking up wireless.
I have enabled ip forwarding with
Code:
sysctl -w net.ipv4.ip_forward=1
I think all I need to do is something with my routing table, but haven't figured out how to configure this part. The computer is connected through wlan0, and the ethernet going to the xbox is eth0.
Here is what route -n reveals
Code:
root@slack:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 wlan0
Your routing table doesn't list your ethernet interface or a bridge interface you can use routing instead of bridging the interfaces together.
Also, you need to consider how you will share your internet address. You either need to configure masquerading on your Linux box or subnet the 192.168.2.0 network and use your NAT router. For example I once shared my wireless connection (of my laptop) for my desktop's connection. I configures wlan0 on 192.168.1.0/25 and eth0 on 192.168.1.128/25. I did find that I needed to load the tc_conntrack module, now nf_conntrack before forwarding would work. The laptop's eth0 interface was the desktop's default gateway. I didn't use brctl, I simply configured the devices and the default gateway.
I have a similar setup where one PC hangs off another just like your xbox would:
Comp A - eth0 <-> eth1 - Comp B - eth0 <-> Router
192.168.49.90 192.168.49.1 192.168.48.96 192.168.48.1
Comp A would be your Xbox, Comp B would be the Slax 13 box.
1. Edit /etc/sysctl.conf so the changes are permanent. (not really needed, but recommended)
2. Ensure eth0 and the xbox are on the same subnet with wlan0 on a different one.
3. Ensure 360's default gateway is the IP of Slax eth0 iface.
That should be it. The routing table should automatically populate upon reboot or network restart too (once eth0 is configured properly anyway).
You should also temporarily disable IPtables until you get everything working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.