You are not logged in.

#1 2009-11-20 23:23:18

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Forward internet from wireless to ethernet: can it be done?

Here's my setup at the moment:
Wireless router <wlan0> computer

I would like to route my internet connection from wlan0 coming in to my comp to another computer that does not have wireless. This would look like:
Wireless router <wlan0> computer <eth0> other computer

How could I go about this? I would like for both computers to be able to use the internet at the same time, but I could go with something that was more of an 'xor' setup.


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

#2 2009-11-20 23:45:03

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: Forward internet from wireless to ethernet: can it be done?

On the computer connected to the router run "iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE" and enable forwarding in /etc/sysctl.conf, on the other computer add a route (set it in rc.conf or run route add default gw the.other.pc.ip eth0) and set the nameserver to the wireless router's IP, to your ISP's servers' IPs or the other computer's IP if you're running dnsmasq on it. Make sure your router allows traffic from that additional computer.

-edit-

Related wiki entries: http://wiki.archlinux.org/index.php/Internet_Share http://wiki.archlinux.org/index.php/Ad-hoc_networking

Last edited by lucke (2009-11-20 23:47:42)

Offline

#3 2009-11-21 00:13:21

z.s.tar.gz
Member
From: Rural Florida
Registered: 2008-12-12
Posts: 298

Re: Forward internet from wireless to ethernet: can it be done?

Thanks! The internet share wiki page is right up my alley.


I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581

Offline

Board footer

Powered by FluxBB