Linux – how to forward wlan0 to eth0

internetlinuxnetworkingwifi

I get internet from my wireless wlan0 and I would like to forward it to eth0 which is connected to another laptop. How can I do that? Thanks.

Edit: my wireless card is intel:

0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

Best Answer

You can enable routing. Run this as root

 echo 1 > /proc/sys/net/ipv4/ip_forward

Give manual ip addresses to both ethernet ports, the wireless-connected laptop's IP address becomes the "gateway IP" for the other one. make sure they have the same subnet masks. and the kernel would do the remaining magic.

Related Topic