Mini-Howto: easy LAN setup under Linux

By Keld Simonsen, v0.6 1999-04-17
The following gives a cookbook for setting up a Local Area Network (LAN) under Linux RedHat, that gives access to all the machines on the LAN to the Internet via only one telephone line, and also provides a common file area and a networked printer.

A fuller description of services provided is available.

The advantage of this setup is that you do do not need to change any configuration files. All what is needed is installing the services and one configuration patch. Security has been addressed in the setup.

Server installation on Linux

DHCP can do a lot:

Very simple configuration (out of the box)

 
The following configuration provides a very simple - yet powerful - setup of DHCP and other things like name server, sendmail and samba. It uses only one IP-number out - eg. one telephone line.

Can be used for:
  • Small home LAN - make all you home pcs use one telephone line for internet access and share printers
  • Travel portable LAN - provide common infrastructure for meetings of 10-500 people
  • - for simple setup at a bigger LAN (the setup can do up to 50.000 machines)
    services install:
    install (via rpm) from your standard RedHat 5.2 CDrom the following services:
    • DHCPD
    • sendmail
    • named
    • anonymeous ftp
    • apache web-server
    The extra patch file is a tar file for installation , installs from /
    . If you worry about overwriting your existing configuration files, or if you are just curious, you can unpack the tar file in another directory and inspect it.
         su root
      cd /
      tar xzf easylan-0.6.tgz
     
    The /etc/dhcpd.conf file:
     server-identifier 172.16.1.1 ;
     subnet 172.16.0.0 netmask 255.255.0.0 {
     range 172.16.40.1 172.16.254.254;
     option domain-name-servers 172.16.1.1 ;
     option routers 172.16.1.1 ;
     default-lease-time 86400 ; max-lease-time 86400;
     option broadcast-address 172.16.255.255 ;
     option time-servers 172.16.1.1 ;
     option lpr-servers 172.16.1.1 ;
     option ip-forwarding on ;
     }
     
    create empty /etc/dhcpd.leases file
     
    Perform IP masqurading etc in /etc/rc.d/rc.local, insert line in bottom:
           sh /etc/rc.d/rc.lan
             
    Configuration of local net (eth0)
     set to ipadr 172.16.1.1 mask 255.255.0.0
     with ifconfig
     Nameservice - install named

    Client installation

     Linux: dhcpcd
     Win95/98: automatic network configuration
     My computer/network/TCP/IP/IP-number/automatic