Data Networking/Fall 2016/APSS

From Wikiversity
Jump to navigation Jump to search

Team Members[edit | edit source]

1. Akshay Mahajan
2. Praveen Prakash
3. Sagar Raikar
4. Siddesh Shenoy

Objective[edit | edit source]

To create a secure, reliable and dynamic network that can support multiple hosts.

Behaviour of Protocols[edit | edit source]

Domain Name System[edit | edit source]

DNS(Domain name system) server also called as name server, which implements network services for providing responses to queries against directory services i.e. It translates user supplied host name (web site) to IP addresses and vice versa and which contains a databases of network names and IP address. DNS process flow: DNS client running on the user host, request a server page, at first it needs a IP address of that web server which is processed by the DNS Server.
1)First the client sends a query with the given hostname to the DNS server
2)The DNS server receives the query from the client and maps it with the IP address
3)The DNS server sends the IP address to the DNS client operating at the user machine
4)Once the Host user receives the IP address, it can access the web server.

Dynamic Host Configuration Protocol[edit | edit source]

DHCP referred to as Dynamic host configuration protocol. It is a client server protocol which assigns host with an IP address through a DHCP server. In general, DHCP automatically assigns IP address to new devices or to devices when moved from one subnet to another. DHCP server has as a pool of IP address and leases an address when it start up in the network and also has TCP/IP configuration parameters for all hosts on the network,that received IP address
Assigning IP addresses to the networking component can be done in the following ways.
Types of DHCP Allocation:
1) Automatic allocation - DHCP server assign permanent IP address to the client.
2) Dynamic allocation -DHCP server assigns IP address to the client only for a limited period of time. Automatic reuse of IP address is allowed.
3) Manual allocation -IP address Assigned by the network administrator and DHCP is used simply to convey the messages to the client.

Webserver & Firewall[edit | edit source]

A Web server is a software responsible for accepting HTTP request from the client, which are know as web browser and serving them the HTTP responses We are using apache 2 webserver to host our website, we are using a firewall for providing security to the website.

Backup[edit | edit source]

Backup is done to the webserver file to add redundancy to the fle and make it robust . All the files in the webserver are sent to the backup in a zipped format at a scheduled time Backup for the webserver data is achieved by using rsync and ssh protocols.
Rsync is used to synchronize files between the webserver and the backup. Therefore whenever changes are made at the webserver the backup gets updated at the scheduled time.
Ssh provides a secure channel to send and receive files by using end to end encryption and decryption. .


Installation Steps[edit | edit source]

DNS[edit | edit source]

Step 1: Update the package list(
Command:

               sudo apt-get update

Step 2: Install Bind9 for DNS server configuration
Command:

sudo apt-get install bind9

Step 3: Make virtual machine interface as static
Command:

sudo nano /etc/network/interfaces

Add
For IPv4 configuraiton

auto eth0
iface eth0 inet static
address 192.168.77.5
netmask 255.255.255.0
broadcast 192.168.77.255
gateway 192.168.77.1
dns-nameservers 192.168.77.5

For IPv6 configuration
face eth0 inet6 static
address 2001:aaaa:1000:0000:0000:0000:0000:0007
netmask 64
gateway 2001:aaaa:1000:0000:0000:0000:0000:0001

             dns-nameservers 2001:aaaa:1000:0000:0000:0000:0000:0007


Step 4: Configuring the forwarding addresses
Command:

               sudo nano /etc/bind/named.conf.options
Add
forwarders {
# Local DNS and Google DNS
192.168.77.5
192.168.77.6
2001:aaaa:1000:0000:0000:0000:0000:0007
2001:aaaa:1000:0000:0000:0000:0000:0008
8.8.8.8;
8.8.4.4;
};

Step 5: Add ZONES TO THE ROOT FILES OF bind9
Command:
sudo nano /etc/bind/named.conf.local

Step 6: Creating DNS forward Zone file
Command:

             sudo nano /etc/bind/db.siddesh.lanr

Step 7: Creating DNS reverse zone file
Command:
sudo nano /etc/bind/db.192

Step 8: Adding name server in resolv.conf file
Command:
sudo nano /etc/resolv.conf

Step 9: Adding server addresses in hosts file
Command:
sudo nano /etc/hosts

Step 10: Commands to start/ restart/stop the DNS server
Command:

             Start: 
sudo /etc/init.d/bind9 start
Restart:
sudo /etc/init.d/bind9 restart
Stop:
sudo /etc/init.d/bind9 stop

Step 11: Configuring named.conf.local file on slave
Command:

                          sudo nano /etc/bind/named.conf.options

Step 12: Adding server addresses in hosts file for slave
Command:
sudo nano /etc/hosts

DHCP[edit | edit source]

Step1: Install ISC-DHCP server for DHCP configuration
Command:

               sudo apt-get install isc-dhcp-server

Step2: Configuring static address for IPv4 DHCP
Command:

               sudo nano /etc/network/interfaces

Step3: Setting range for IPv4
Command:

sudo nano /etc/dhcp/dhcpd.conf

Step4: Setting up the interface
Command:

                sudo nano /etc/default/isc-dhcp-server

Step4: Restart to set the configuration
Command:
sudo service networking restart
sudo service isc-dhcp-server restart
sudo ifdown eth0
sudo ifup eth0
Step5: Setting static IP address for IPv6
Command:
sudo nano /etc/network/interfaces

Step6: Setting range for IPv6 address
Command:
sudo nano /etc/dhcp/dhcpd6.conf

Step7: Creating empty dhcpd6.lease file
Command:
sudo nano/var/lib/dhcp/dhcpd6.leases

Step8: Verifying the configuration
Command:
/usr/sbin/dhcpd -6 –d –cf /etc/dhcp/dhcpd6.conf eth0

Step9: Restarting to set the configuration
Command:
sudo service networking restart
sudo service isc-dhcp-server restart
sudo ifdown eth0
sudo ifup eth0


Webserver[edit | edit source]

Step 1: Install Apache2 Webserver
Command:

                sudo apt-get install apache2 

Step 2: To create a HTML page for the Web server
Command:

                Sudo chmod 755 /var/www/
Sudo chown -R $ user:$user /var/www/html/
Sudo nano /var/www/html/index.html

Step 3: Restart the web server
Command:

                sudo /etc/init.d/apache2 restart

Step 4: To test web server
Command:

                http://localhost

Backup[edit | edit source]

Step 1: Install rsync on both web server and backup machine

                            sudo apt-get install rsync 

Step 2: Copy files from webserver to backup machine

                            Rsync -avzhe ssh @:/var/www 

Step 3: Generate a public and a private key for security

                            ssh-keygen -trsa 

Step 4: Share the private and public key with the backup machine

                            Ssh-copy-id -l  /root/.ssh/id_rsa.pub  vm3@192.168.77.135

Step 5: Zipping the .HTML file and sending the file automatically using crontab

crontab –e
***** sudo tar –cvpzf /home/dnspraveen/finalbackup1234.tar.gz /var/www/html/index.html
***** rsync –azvp --delete –e ssh /home/dnspraveen/finalbackup1234.tar.gz /vm3@192.168.77.135:/home/vm3/finalb/