[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: daisy-chaining internet connectivity



Terrence Brannon wrote:
> I have a Debian/testing machine connected to the internet via our
> wireless lan.

Check.

> I want to put another machine on the internet which requires physical
> ethernet instead of wireless.

This other machine has only a wired network card, right?

> Besides buying a wireless bridge, is there some way for the connected
> machine to provide internet connectivity for this other machine? 

Yes.  Very easily as a matter of fact.  Install a wired network card
in the same machine that currently has a wireless network connection.
It can gateway the data to your wired network.  In this mode it will
function as a router.  The wireless interface will be the WAN
connection and the wired interface will be the LAN connection.  You
could also have it function as a firewall for the wired network.

It really is just about as easy as configuring both network interfaces
and then turning on internet packet forwarding between the
interfaces.  But you will almost certainly want to install some other
things such as a DHCP server on your wired network.  So let me outline
a simple plan for you.

* Install a wired network card as the second network interface.

* Configure the second wired network card with a static IP address.
  Use a different subnet than you have on our WAN side.  That is, if
  you have a 10.* address use 192.168.1.1 on the LAN.  If your outside
  address is already 192.168.* then use 10.0.0.1 on your LAN side.
  Just make sure they are different.

* Install and configure DHCP for your LAN interface.  This is probably
  the most complicated part of the problem.  But not overly so.

* Ensure that packet forwarding is in place.  Use either a firewall
  package or do this yourself with low level commands.

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

* Connect everything up.  Have your other wired machine DHCP an
  address.  Test connectivity.

Ask more questions as you need them.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: