On Thu, 22 Feb 2001, Francois Massonneau wrote:
> OK, thank you, so let's go but it's a long message as I include some
> of the config files I made : At home, I have 3 computers and a
> laptop. One is named "francois" Second is "warren" Third is
> "claudine" and the laptop is "earlene"
>
> I assigned the following IPs :
> francois --> 192.168.131.1
> warren --> 192.168.131.50
> claudine --> 192.168.131.52
> earlene --> 192.168.131.54
>
> "francois" is the only one with an external modem and which has a
> connection to the internet (I can call my ISP with the laptop too,
> using a pcmcia card, but I use it when I 'm away only).
>
> "francois" and "claudine" run linux, "warren" runs OS/2 and the laptop
> depending of the way I boot, runs linux or Windows 98 (I use my laptop
> with windows at my office only).
>
> I don't have a Hub, so at home when I need to exchange datas between
> computers I connect two computers together only. But soon, I will buy
> a little hub.
>
> Now what I want to do is the following (maybe I forgot something
> ;-():
> - I want that at home each computers see each other and can
> exchange datas.
> - I want to be able to call my ISP using "francois' modem", when I use
> "francois" (that's logical ;-) ) but even if I use "claudine", or
> "warren" or "earlene". So maybe this has to do something with what
> people name "masquerading" ?
>
Yes, IP masquerading is what you want for this.  If you want francois
to automaticly dial your ISP when any of the machines on your network
need access to the internet, you can use DIALD or the demand option of
PPP.  If you want this, someone else will have to help with the PPP
setup, as I have not played with DIALD or the demand dialing options of
pppd.

You will want to read the IP-MASQUARDING howto.  You will also want to
read up about IP chains,  or IP table to set up a firewall.
>
> - I want "francois" to act as a DNS server for my local lan (my domain
> name is "celtes.com")
>
No problem thare.
>
> - I want "francois" to deliver mail (local mail, but also the one
> coming from the internet), to all computers, and of course I want
> computers to exchange mail together.
>
Set up "francois" as the mail server, and set us sendmail on the rest of
the machines to use "francois" for local mail.  You will also want to
use fetchmail to collect your mail from your ISP when you are connected.
Start ftchmail, and run sendmail -q from /etc/ip-up.local and stop
fetchmail from /etc/ip-down.local.
>
> - I want to be able to call my ISP using "warren" (the laptop) when
> I'm not at home with its modem pcmcia card.
> - I want to be able to use "warren" (the laptop) at my office, and be
> able to call my ISP using it, but also to connect it (my laptop), to
> our office's network. (it's a windows NT 4 network). The problem is
> that at my office, I must use another IP address. I guess we do not
> have DHCP at my office, but I don't remember the IP they assigned to
> me (let's say it could be something like 202.0.0.21).
>
One way to do this is to create several ifcfg-ethX files in
/etc/sysconfig/network-scripts.  I hacked my setup on my laptop, so that
I end up with:

ifcfg-eth0
=========================
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.9.130
NETMASK=255.255.255.0
GATEWAY=192.168.9.254
HOSTNAME=laptop.Infinity-ltd.com
DOMAIN=Infinity-ltd.com
ONBOOT=no
=========================

ifcfg-eth1
=========================
DEVICE=eth0
BOOTPROTO=dhcp
IPADDR=
NETMASK=
GATEWAY=
ONBOOT=no

It is too bad your office doesn't run dhcp, it would make things so much
easyer.  You may have to change the name server entrys in
/etc/resolv.conf.  You could write a script to do this.  I think you can
also have a script that runs automaticly when you bring up the
interface to set up the name servers, but I have not played with this
yet.  All the places my laptop goes ether have dhcp, or I don't know the
valuse ahead of time, so I just set them manualy.

>
> The domain name for my ISP is "free.fr"
> Their DNS are : 212.27.32.5 and 212.27.32.6
>
> During Redhat install on "francois", this is what I said :
> ( ) Configure using DHCP
> (x) Activate on boot
> IP Address : 192.168.131.1
> Netmask: 255.255.255.0
> Network: blank
Network 192.168.131.0
> Broadcast: blank
Broadcast: 192.168.131.255
> Hostname: francois.celtes.com
> Gateway: blank
> Primary DNS : 192.168.131.1
> Secondary DNS : 212.27.32.5
> Tertiary DNS : 212.27.32.6
>
> I don't know what to put for the other computers.:-(
>
For the other computers, use the same entries, except for:
IP Address:     <computer specific>
Hostname:       <computer specific>
Gateway: 192.168.131.1
>
> Now, this is what I did for the DNS server I want to set up (but I
> know there are mistakes and not everything has been done) :
> I made that on "francois" only, I did nothing at all on the other
> computers
>
> I changed the file /etc/named.conf that way :
> // generated by named-bootconf.pl
>
> options {
>       directory "/var/named";
>       /*
>        * If there is a firewall between you and nameservers you want
>        * to talk to, you might need to uncomment the query-source
>        * directive below.  Previous versions of BIND always asked
>        * questions using port 53, but BIND 8.1 uses an unprivileged
>        * port by default.
>        */
>       // query-source address * port 53;
>
>       /*
>        * Francois Massonneau - I have added the following five lines
>        * Those two IP addresses are the primary and secondary IP
>        * addresses of my ISP.
>        */
>        forward first;
>        forwarders {
>        212.27.32.5;
>        212.27.32.6;
>        };
> };
>
> //
> // a caching only nameserver config
> //
> zone "." {
>       type hint;
>       file "named.ca";
> };
>
> zone "0.0.127.in-addr.arpa" {
>       type master;
        notify no;
>       file "named.local";
> };
>
> /*
>  * Francois Massonneau - Here I have to declare the zone for my
>  * my Domain. I have added the following five lines.
>  */
> zone "celtes.com" {
>       notify no;
>       type master;
>       file "celtes.com";
> };
>
> /*
>  * Francois Massonneau - Here I have to declare the zone for the
>  * reverse mapping. I have added the following five lines.
>  */
> zone "131.168.192.in-addr.arpa" {
>       notify no;
>       type master;
>       file "celtes.com.rev";
> };
>
> Then I changed the file /var/named/named.local :
>
> @       IN      SOA     francois.celtes.com. root.francois.celtes.com.  (
>                                       1997022700 ; Serial
>                                       28800      ; Refresh
>                                       14400      ; Retry
>                                       3600000    ; Expire
>                                       86400 )    ; Minimum
>                 NS      francois.celtes.com.
> 1               PTR     localhost.
>
> Then I created a file named /var/named/celtes.com
> ;
> ; Zone file for celtes.com
> ;
> ; The full zone file
> ;
@       IN      SOA     celtes.com. root.francois.celtes.com.  (
>         1997022700 ; Serial
>         28800      ; Refresh
>         14400      ; Retry
>         3600000    ; Expire
>         86400 )    ; Minimum
> ;
>                 TXT     "Computer francois on celtes.com - Serveur DNS Primaire"
>                 NS      212.27.32.5.
>                 NS      212.27.32.6.
>                 NS      francois.celtes.com.
>
>                 MX      10 mail.free.fr.
>                 MX      20 francois.celtes.com.
>
> localhost       A       127.0.0.1
>
> francois        A       192.168.131.1
>
> www             CNAME      francois
> smtp            CNAME      francois
> pop             CNAME      francois
> news            CNAME      francois
>
> warren          A       192.168.131.50
>                 MX      10 mail.free.fr.
>                        MX      20 francois.celtes.com.
>                        HINFO   "586" "OS/2"
>
> claudine        A       192.168.131.52
>                 MX      10 mail.free.fr.
>                        MX      20 francois.celtes.com.
>                        HINFO   "PIII" "Linux"
>
> earlene         A       192.168.131.54
>                 MX      10 mail.free.fr.
>                 MX      20 francois.celtes.com.
>                 HINFO   "PIII" "WIN/NT"
>
> And I created a file named /var/named/celtes.com.rev :
@       IN      SOA     celtes.com. root.francois.celtes.com.  (
>                                       1997022700 ; Serial
>                                       28800      ; Refresh
>                                       14400      ; Retry
>                                       3600000    ; Expire
>                                       86400 )    ; Minimum
>         IN      NS      francois.celtes.com.
>
> 1       IN      PTR     francois.celtes.com.
> 50      IN      PTR     warren.celtes.com.
> 52      IN      PTR     claudine.celtes.com.
> 54      IN      PTR     earlene.celtes.com.
>
> Finally, this is what my /etc/resolv.conf looks like :
> search celtes.com
> nameserver 192.168.131.1
> nameserver 212.27.32.5
> nameserver 212.27.32.6
>
Once you have your name server running right, change it to
search celtes.com
nameserver 127.0.0.1
>
> But this is not completed ;-( and I did nothing about masquerading,
> about the fact that I want my laptop to be able to see my local lan,
> but my office network too, etc...
>
> Francois
>
This will get you started.  You will be better off making it severial
smaller messages to go into the different parts in depth.  I would
sugest:
You laptop.
You home network config.
The name server.  I can see more changes I would make there.
Demand dialing.
IP Masquarding and firewall.
dhcp setup (optional).
Samba setup (optional).

Mikkel
 --

    Do not meddle in the affairs of dragons,
 for you are crunchy and taste good with ketchup.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to