Instalimi dhe Konfigurimi i nje Serveri Gateway te Thjeshte

Dashamir Hoxha

Legal Notice

1. Hyrje
1.1. About this tutorial
1.2. Who should read this tutorial
1.3. Description of the situation
1.4. Requirements
2. Installation
2.1. Prepare the Installation Server
2.2. Prepare Installation Floppies
2.3. Install Rescue
2.4. Install Server
2.5. ks-server.cfg
2.6. Fix GRUB (bootloader menu)
3. Network Configuration
3.1. /usr/local/config/network-setup
3.2. /usr/local/config/nework-config
3.3. /usr/local/config/network-config-1
3.4. /usr/local/config/network-config-2
3.5. /usr/local/config/network-config-3
4. Firewall
5. Source NAT (Masquerading)
6. Web Server
7. CACHE
7.1. /usr/cachesys/csp/CSP.ini
8. CACHE Port Forwarding
9. Samba
10. Reconfiguration
11. Backup Configuration Files

1. Hyrje

1.1. About this tutorial

This tutorial is based on my experience with installing and configuring a small gateway server. It is going to be useful to me in case that I will do a similar installation in the future, and it may also be useful to other people that have to do something like this. It takes a practical approach, describing all the steps in details, with all the commands that are used in the concrete example.

1.2. Who should read this tutorial

Anybody that wants to learn how to install and maintain a linux server can read this tutorial. However, it assumes that the reader has some experience with linux and it does not explain everything in details. So, if you have no previous experience with linux, it will be hard to understand and to follow the instructions in the guide, and you have better to start with some introductory tutorials first.

In order to help you to understand whether you can follow this guide easily, try to answer the following questions. If you can answer them positively, then most probably you can follow this guide easily. Otherwise, maybe you have better to study some other guides or tutorials before this one.

  1. Have you ever used linux? Do you know what is Fedora?

  2. Have you ever installed a linux system yourself? Do you know what is a partition? Do you know what is a swap partition?

  3. Have you ever used the commands of linux? Do you know what is a terminal ? Have you ever used ls , cd , mkdir , cp , rm ?

  4. Do you know what is bash ? Do you know what are shell scripts ?

  5. Have you ever configured a network interface yourself? Do you know what is an IP and a netmask ?

  6. Do you know what are services? Have you ever heard about DNS , sendmail , apache ?

  7. Have you ever used the vi editor?

1.3. Description of the situation

This document describes the installation and configuration steps for the server that is installed at the network of a small company or institution. It serves as the gateway of the network (protecting it with a firewall), as the web server of the client, as a port forwarder to the CACHE(DB) server, etc.

The diagram below shows how the components of the network are connected physically. There is a router-modem that provides connection to the Internet. The router and the computers are connected in an ethernet network by means of a HUB (which is represented in the picture by the thick line).

Physical diagram of the network

What we want to do is to place a linux server between the router and the rest of the local network, so that it can protect it with a firewall. The linux server will also serve as the web server of the company/organization.

We will do this in two steps. First we are going to configure the server according to the following diagram:

First configuration of the network

In this network configuration the linux server can perform all of its functions: gateway, web server, port-forwarding, etc. However the other computers can choose either the linux server, or the router itself as gateway. This is done in order not to interrupt the Internet connection for the local network during the time that the server is installed and tested. Also, the switch to the new gateway is done gracefully, without Internet connection interruption.

Once the server is installed and tested, and once all the computers switch to the new gateway, we can change the configuration of the network as shown in the diagram below:

Second configuration of the network

In this configuration the local network can access the Internet only through the linux server. During the configuration of the server we will take care so that we can switch instantly from the first configuration to the second configuration (we will see how). Also, the local computers don't need to change the gateway, it is the same as before: 10.10.3.100. The physical connection doesn't need to be changed as well; the router, the server and the local machines are still connected to the HUB, same as before.

1.4. Requirements

The minimal requirements for the linux server are:

  • Pentium I, CPU

  • 64MB RAM

  • 2GB HDD

  • Floppy drive (no need for CD-ROM drive)

  • Two ethernet network cards.

If you have hardware older than this, you can still try it, it may work.