User:Anushakumar721/sandbox

THE FOLKS
1. Sarangarajan Rajagopal

2. Bharath Ram Chandrasekar

3. Raj Vignesh Dhana Sekar

4. Anusha Kumar

MOTIVATION
Linux is an integral part of the networking industry. It is a very versatile open source software. We took up this project as we wanted to familiarize ourselves with its practical implementation. Our project consists of a network of a DHCP server, web server, DNS and one client. Firewall and backup have also been implemented.

UNDERSTANDING THE PROTOCOL
DNS: A Domain naming system translates the domain names which have been memorized into IP addresses.

DHCP: Dynamic Host Configuration Protocol allocates IP addresses to all the systems which enter the network in the machine on which DHCP is running.

REQUIREMENTS
1.	Apache2 needed for the web Server

2.	Bind9 needed for the DNS Server

3.	Isc-dhcp server needed for DHCP

STEPS (INSTALLATION/SET UP)
SETTING UP THE DHCP SERVERː

1.	isc-dhcp server is installed using apt-get install command.

2.	As eth0 port is being used the interface is set using /etc/default/isc-dhcp-server.

3.	File is edited using /etc/dhcp/dhcpd.conf.

4.	Lease time, broadcast address, range of IP etc. are set in the file.

5.	The range of IP address used is 192.168.5.20-192.168.5.254.

6.	The static IP address for DNS is 192.168.5.100, which is set with the help of MAC address of the same.

7.	The static IP address for DHCP is 192.168.5.101, which is set by using /etc/network/interfaces

CONFIGURING THE DHCP SERVER:

1.    The DHCP server is installed from the following commands

sudo apt-get install isc-dhcp-server

2.    The IP address of DHCP is set static

configuring static IP

auto eth0

iface eth0 inet static

address 192.168.5.101

netmask 255.255.255.0

network 192.168.5.0

broadcast 192.168.5.255

dns-domain-nameserver 192.168.5.254

dns-domain-search sarb.com

3.     The System is now restarted.

sudo nano /etc/init.d/networking restart

4.      Now we are going to configure the DHCP server. To do the following go to DHCP config

sudo nano /etc/dhcp/dhcpd.conf

ddns-update-style none;

option domain-name-servers 192.168.5.254;

option domain-name "sarb.com";

default-lease-time 600;

max-lease-time 7200;

subnet 192.168.5.0 netmask 255.255.255.0{

range 192.168.5.20 192.168.5.254;

option broadcast-address 192.168..255;

option domain-name-servers 192.168.5.100;

}

5.    Go to Resolv.conf and edit the name server

sudo nano /etc/resolv.conf

nameserver 192.168.5.254

6.     Restart the DHCP service

sudo service isc-dhcp-server restart

SETTING UP THE DNS SERVER
1.	apt-get install command is used to bing9.

2.	For the domain “sarb.com” to provide authority source 3 bind configuration files (/bind/named) are added so IP addresses can be translated to names.

3.	/etc/bind/named.conf.local file is edited to add zone entries for “sarb.com” so bind will search in the file /etc/bind/sarb.zone for the authority details of the domain. The file also contains the IP addresses which have to be resolved and the added details.

4.	/etc/bind/5.168.192.in-addr.arpa is used in reverse DNS to resolve IP addresses to hostname.

CONFIGURING THE DNS SERVER:

1.The IP address of DNS is set static so that DHCP doesn’t allocate IP

configuring static IP:

auto eth0

iface eth0 inet static

address 192.168.5.100

netmask 255.255.255.0

network 192.168.5.0

broadcast 192.168.5.255

dns-domain-nameserver 192.168.5.254

dns-domain-search sarb.com

Installation of bind9:

command used is sudo apt-get install bind9

2.Forwarders are set in change named.conf.options in /etc/bind9/

options {

directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want

// to talk to, you may need to fix the firewall to allow multiple

// ports to talk. See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable

// nameservers, you probably want to use them as forwarders.

// Uncomment the following block, and insert the addresses replacing

// the all-0's placeholder.

forwarders {

192.168.5.1;

8.8.8.8;

8.8.4.4;

};

3. zone files are created with IP address in named.conf.local in /etc/bind9

organization

//include "/etc/bind/zones.rfc1918";

zone "sarb.com"

{

type master;

file "/etc/bind/sarb.com.db";

};

#Reverse

zone "5.168.192.in-addr.arpa"

{

type master;

file "/etc/bind/5.168.192.in-addr.arpa";

};

4.Records are inserted in Forward and reverse table accordingly as follows.Two zone file records are created and Resource Records

sarb.com.db $TTL   86400 @      IN      SOA     sarb.com. root.sarb.com. (1        ; Seriaɭ   604800         ; Refresɦ   86400         ; Retrɥ   2419200         ; Expire   86400 )       ; Negative Cache TTL ;  @       IN      NS      sarb.com. @      IN      A       192.168.5.254 @      IN      AAAA    ::1

'''5.168.192.in-addr.arpa '''

$TTL   86400 @      IN      SOA     sarb.com. admin.sarb.com. (1        ; Serial   604800         ; Refresh   86400         ; Retry   2419200         ; Expire   86400 )       ; Negative Cache TTL ;  @       IN      NS      sarb.com. 254    IN      PTR     sarb.com

5. Resolv.conf is edited by giving nameserver

Resolv.conf

Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

nameserver 192.168.5.100

domain sarb.com

SETTING UP THE WEB SERVER
1.	Apache2 web server is installed.

2.	The domain “sarb.com” is viewed with the html page index.html available in /var/www/html.

CONFIGURING WEB SERVER:

1. Configuration of apache webserver:

Apache2 acts as a webserver and is installed to run a web page.

sudo apt-get install apache2

2. Creating a Webpage:

Sarb.com is the domain and a html page is created using html.

The path is /var/www/html/index.html.The Html page is considered as the webpage

SETTING UP THE FIREWALL
1.	Firewall is implemented with the help of IP tables.

2.	Except for ICMP everything else was allowed.

SETTING UP BACKUP
1.	rsync and crontab is used to implement backup

2.	Rsync command is put in crontab so it acts as the scheduler.

EXTRA FEATURES
NETWORK FILE SYSTEM:

Separate NFS server and NFS client are created. Both server and client are configured such that mount point created in server is exactly replicated in client side mount point.

BACKUP SERVER:

Contents inside the same mount point have been backed up by following these steps:

1.	rsync and crontab is used to implement backup.

2.	Rsync command is put in crontab so it acts as the scheduler.

TESTING
TESTING THE DHCP SERVER:

1.	DHCP server is implemented in VMware to test it.

2.	Two virtual machines are used (one server, one client). And a bridge network is created between both the machines.

3.	Static IP was assigned to the DHCP server which is 192.168.5.101.

4.	The DHCP client was used in dual boot and tested with the help of Ethernet cross-over cable. The test was successful as IP address to the client machine.

TESTING OF THE DNS SERVER:

1.	DNS server was implemented in VMware for testing with the creation of another virtual machine.

2.	Commands host and nslookup were used to test the DNS server. The test was successful as the DNS server translated the host names into IP addresses.

TESTING OF THE WEB SERVER:

1.	With the use of Ethernet cables we connected the DHCP server, DNS, web server and a client on the network.

2.	When the IP address of the web server (192.168.5.254) is entered by the client the DNS resolves it and displays the web page created by us.

TESTING THE FIREWALL:

1.	We first implemented IP tables. Then by allowing all IP addresses ping of destination was successful.

2.	By using the deny command for a particular IP, ping of destination was unsuccessful. Which proved the test to be successful.

TESTING THE BACKUP:

1.	rsync is implemented for testing the backup in the same machine. Backup is sent to client.

2.	Two machines are connected with Ethernet cables and rsync is used to perform the backup.

3.	Backup is made to every 1 min with which scheduler (crontab) is tested.

TESTING THE NFS SERVER:

1.	The NFS server was installed on the VMware.

2.	Nfs-common package is installed and file is mounted.

3.	NFS is implemented in dual boot.

PROSPECTS FOR THE FUTURE
The prospects for the future can be much improved by implementation of concepts like NIS, VLAN (when the number of systems increases to a large number) and disaster recovery such that all the servers can be replicated at different regions.

CITATION
Websites referred:

1. http://www.bind9.net

2. http://mixeduperic.com/ubuntu/seven-easy-steps-to-setting-up-an-interal-dns-server-on-ubuntu.html

3. http://net.tutsplus.com/tutorials/other/the-linux-firewall

4. http://ubuntuforums.org/showthread.php?t=921219

5. http://www.linuxproblem.org/art_9.html

6. https://help.ubuntu.com/community/CronHowto

7. https://help.ubuntu.com/community/BIND9ServerHowto

8. https://help.ubuntu.com/community/isc-dhcp-server

9. http://linux.ardynet.com/ipv6setup.php

10. https://www.digitalocean.com/community/articles/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04

11. httpsː//www.youtube.com/danscourses 

BOOKS REFERRED  1.computer Networking A Top Down Approach by Kurose and Rosʂ 