User:Priti 2008

'LINUX PROJECT -TELE 5330 -SPRING 2016'

GROUP MEMBERS SAMYAK KATHANE PRITI LIMAYE ANSHUL JAIN DNS Server- A DNS server is used to link an IP address with the corresponding hostname and all its aliases and canonical names. When a client types the host name along with the domain name in the main server, it first does a DNS lookup for that domain name and then extracts the IP address and goes to the webserver where that IP address is stores and returns the web page requested.

'Functioning-' 1.	For example, the client types project.com in its browser. 2.	The browser extracts this hostname and passes the hostname to the client side of DNS server. 3.	The DNS client sends as query for the hostname to the DNS server. 4.	The DNS client then receives a reply which includes the IP address. 5.	Once the browser receives the IP address, it can then do HTTP request with that IP address at port 80.

DNS server Configuration-

For Master DNS First we need to install the bind9 package on the terminal of Ubuntu.

1. To achieve the root access: This will install the bind package needed for the DNS server configuration. After this we need to add zones to our root files of bind.
 * 1) sudo su
 * 2) sudo apt-get install bind9

#nano /etc/bind/named.conf.local 2. To create a database file to log all the mappings of DNS server: #sudo cp /etc/bind/db.local /etc/bind/db.project.com Now we need to input all the mappings in this file. #nano /etc/bind/db.project.com 3. To restart bind. #sudo service bind9 restart

4.To create a file for reverse dns lookup #sudo cp /etc/bind/db.127 /etc/bind/db.192 Now add the mappings in it #nano /etc/bind/db.192 After this again restart bind.

5.To add the nameserver. #nano /etc/resolv.

Slave configuration: 1. Install the bind9 2. Edit the zone file #sudo nano /etc/bind/named.conf.local

3. Restart the bind. #sudo service bind9 restart

4. Add the nameserver for the slave DNS Edit the following file: #nano /etc/resolv.conf Testing- We can use commands like dig, nslookup and host. DHCP Server-

DHCP refers Dynamic Host Control Protocol. It is a protocol that provides IP to users on startup. DHCP server is a server to assign IP address to workstations. Using DHCP we can configure host IP, gateway, DNS. It can provide ipv4 as well as ipv6 to host. In this project I have used DHCP server isc-dhcp-server to configure a dhcp server on Linux machine.Any system on booting up, it sends across a DHCP discover message that asks for an IP address, the server responds with an offer and the client accepts this offer with a request for the offered IP. The server then acknowledges the request and thereby making note that the IP has been assigned to that requesting host. This finishes the DHCP IP address assignment.

1.To Install DHCP server on Ubuntu 14.04 #sudo apt-get install isc-dhcp-server

2.To Assign interface #nano /etc/etwork/interfaces

3.To restart the interface # nano etc/init.d/networking restart

4.To Configure server #sudo nano /etc/default/isc-dhcp-server Assign network interface as “eth0”.

5.To configure dhcp pool #sudo nano /etc/dhcp/dhcpd.conf 6.To Configure DHCP IPV6 pool # nano /etc/dhcp/dhcpd6.conf 7.To Configure a initialization file for IPV6 # nano /etc/init.d/isc-dhcp6-server

Testing: DHCP primarily provides dynamic IP address to the clients. By writing ifconfig command on different virtual machines, we can check IP allotment for the particular client.

Webserver- To access different webpages, webservers are used world widely with different IP address.By using public domain softwares and packages , any host machine can act as a webserver with the help of internet connection Behavior of protocol: Hypertext transfer protocol is used for Data communication primarily.It is an application for the collaborative information transfers.

	Signaling: 1.DHCP server assigns IP address to the client. 2.client sends SYN message on the port 80 by enabling TCP connection. 3. Server replies with SYN-ACK messages. 4.client sends Acknowledgement and accomplish the process of three way handshaking

Webserver Configurations-

To configure webserver Apache2 server is used for greater speed and higher flexibility. 1.we can Install Apache Webserver: sudo apt-get install apache2

2.To create a directory to make Webserver: sudo mkdir /var/www/project.com

3.To grant Permissions for the webserver: sudo chmod 755 /var/www/ sudo chown $user:$user /var/www/project.com/

4. To Create html Pages for the Web Server sudo nano /var/www/project.com/sample.html 5. To Create files for the Web Server file: sudo nano /etc/apache2/apache2.conf sudo nano /etc/apache2/mods-available/dir.conf 6.To Customize ServerName and DocumentRoot for Web Server to match requests made on port 80 sudo apt-get install gksu gksu nautilus

7. To restart Apache for the changes: Sudo service apache2 restart

Testing 1.By writing project.com, we can check browser showing HTML page. 2. By providing IP address of the following server we can check whether it is showing HTML page on the server.

Firewall- 1.To install firewall: sudo apt-get install ufw

2.To enable firewall with IPV6 : sudo nano etc/default/ufw

3.To allow/deny ports and IP address: sudo ufw deny proto tcp from 192.168.1.100 to any port 22 sudo ufw allow 22 sudo ufw allow ssh

4.To check firewall status: sudo ufw status

5.To reset firewall : sudo ufw reset

Testing: By pinging specific address ,we can check whether firewall is working or not. BackUp Server-

1. To Install SSH: sudo apt-get install ssh

2. To Generate RSA keys to establish connection : ssh-keygen –t rsa

3.To compress files for backup: sudo tar –cvpzf backup.tar.gz /var/www/project.com

4. To get minute backup by using crontab: sudo crontab -e
 * * * * * sudo tar -cvpzf /home/wserver/backup.tar.gz /var/www/project.com
 * * * * * sudo scp /home/wserver/backup.tar.gz bkup@192.168.1.9:/home/backup

Testing : Client machine will show backup for every minute.