You are not logged in.

#1 2011-11-27 17:24:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Arch laptop + wireless as an internet connection [solved]

I want to use my Arch laptop which is connected via Wifi as an internet source for a wired box.  Is this possible?

[laptop] <----- cat 5e -------> [windows machine]

Last edited by graysky (2011-11-27 20:26:21)

Offline

#2 2011-11-27 17:58:04

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,491

Re: Arch laptop + wireless as an internet connection [solved]

Why not try as described here, it need to be a cross over cat5 though:  https://wiki.archlinux.org/index.php/Internet_Share

Offline

#3 2011-11-27 18:01:51

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: Arch laptop + wireless as an internet connection [solved]

Yep, you can use iptables and masquerading.

1) If your wifi card has an IP like 192.168.0.x, then create a wired connection with a static IP 192.168.10.x (for example.)
2) Add in rc.local (or wherever you want):

echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o wlan0 -j MASQUERADE

3) Configure your other PC with a static IP 192.168.10.y and 192.168.10.x as gateway.

There may be other ways to do that but it worked for my Xbox a couple of years ago smile.

Edit: oh, you might need a hub or switch between the two machines though...

Last edited by stqn (2011-11-27 18:05:37)

Offline

#4 2011-11-27 18:10:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Arch laptop + wireless as an internet connection [solved]

Cool, thanks for the suggestions.

Offline

#5 2011-11-27 18:13:52

hexanol
Member
From: Canaduh
Registered: 2009-08-04
Posts: 95

Re: Arch laptop + wireless as an internet connection [solved]

Indeed, unless the wired network interface card on your machines are Gigabit, you'll either need a crossover cable or a hub/switch.

Offline

Board footer

Powered by FluxBB