[NBLUG/talk] Internal Network and the WWW

ME dugan at passwall.com
Wed Jun 4 22:12:00 PDT 2003


davidtanya at netzero.net said:
>
> I have an internal network with addresses: x.x.x.x
>
> With the new DSL service I needed to change the IP and gateway addresses
> using netconfig.  What was x.x.x.x is now z.z.z.z.
>
> I want to have my locally networked machines on one network as well as
> have access to the network provided by the DSL service.  Can I have two IP
> addresses for the same local machine in the /etc/hosts file?  I suppose I
> could try it, but hey...What are friends for?

Going to change your language. Hope this is what you mean:

You have a private network (using an address from one of these ranges:
10.x.y.z    | x,y,z are int  0 <= x,y,z <= 255
172.x.y.z   | x,y,z are int,  16 <= x <= 31 && 0 <= y,z <= 255
192.168.y,z | 0 <= y,z <= 255

and these connect your home machines together.

You also have DSL with a public IP address (one or more)

Your question:
Is it possible to have a machine on more than one network?
Yes.

Can this be done with Windows?
Yes

Can this be done for Linux?
Yes.

Can this be done with one ethernet card per machine?
In many cases, Yes, but it is not very secure.

Is it better to do it with a different ethernet card per network/IP
address per machine?
Yes.

How do you do it?

Assuming you have a public IP and Private IP for each machine, and a
separate ethernet card per machine, then you specify all network
information for the private network card EXCEPT specification of a
gateway/default-gateway.

You *do* specify the default gateway/gateway on the card's interface that
has the public (ISP provided) IP address and link.

How to do this with Linux and one network card per machine?
virtual interfaces on the same card (eth0, eth0:1, eth0:2, etc.)
***NOTE: using a single card like this is a security risk.

modify the name of the host in your /etc/hosts. A good convention is use
of delegated sub-domains like if your machine is called "sparky" and that
is what is used for the public/ISP/Internet interface, then call your
private IP name "sparky.intra". Just be consistent. Not a good idea to
have the same name map to different IP in *this* case described above.
(There are cases where mapping multiple names to one IP is fine or mapping
multiple IP to the same name is fine, but in this case (like most) you
should avoid it unless you really have a need for it.

If you only have one IP address from your ISP, you probably want
NAT/Masquerading. There are how-to for setting this up with nice filters.

HTH,
-ME

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM/IT$/LS/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ PGP++
t at -(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html





More information about the talk mailing list