# Data Networking/Fall 2014/Sanket

Template:Speedy deletion-test page
Project is about integrating and make different components work together in the network. Four network components: Domain Name Server, Dynamic Host Configuration Protocol, Web server/ Firewall/ Backup, Client – are created on four different machines. Steps: 1. Client takes an IP address from the DHCP server. 2. Client makes a page request, request proceeds to DNS for look up. 3. DNS resolves the IP address/Name and request is send to web server. 4. Web server sends back the requested page to client.

## Group Members

- Sanket Soni - Abhishek Sawarkar - Nupoor Nuwal - Pratik Pande

## Behavior of Protocols

Domain Name System (DNS) Domain Name System is used to translate IP address to hostname and also hostname to IP address. Rather than implementing centralized architecture for DNS, which creates a possibility of single point of failure, DNS is implemented in hierarchy. At the top of hierarchy are the root DNS servers, them comes the Top Level Domain (TLDs) and then authoritative DNS servers. Client first invokes the host side of DNS to request IP for a hostname. Local DNS then contacts root server for query. Root server forwards information about all the TLD servers after looking at the suffix. TLD then directs local DNS to the authoritative server responsible for that hostname.
Dynamic Host Control Protocol (DHCP) The protocol is used to allocate IP addresses to various hosts connected in a network. It automatically assigns IP addresses to all the hosts in the network of a specified range within the network, a proper subnet mask, gateway, and DNS server of the network.
Firewall Firewalls are used to avoid unauthorized access to our network i.e. we can control incoming and outgoing traffic of our organization using firewalls. Firewall filters the packets on the basis of either Source IP, Destination IP, Port or all of them. To demonstrate, we have blocked one IP from accessing web server.
Network Information Service (NIS) Originally known as Yellow Page is client–server directory service protocol for distributing system configuration data such as usernames, host names, passwords and group information that has to be configured once and it apply to every computer on network.It is a centralized authentication on linux project.
Back-up It is a server used to back up all the data of a particular host, generally a web server or the whole network. It can also back up the required data to a different location, so that the data can be retrieved in case of failure of even back-up server.

## Domain Name System (DNS)

Commands Used Installing DNS
Step 1 : To change the interface settings-
Step2 : Install BIND9 which is used to implement DNS
Step3 : Include the Ips of Google public DNS servers in the forwarders section.
Step4 : Write the entries of forward and reverse lookup zones in named.conf.local file Define these zones in both master and slave machines
In the reverse lookup zone write the following commands
For IPv6 write the following commands
Step5 : Forward look-up zone
Step6 : Reverse Look-up zone file
$TTL 3D
Step7 : Make changes to resolv.conf
Step8 : To make the changes effective, restart bind9

## Dynamic Host Control Protocol (DHCP)

Step 1 : Installing DHCP
Step 2 :Edit the interface file
Step 3 : Restart with the new config
Step 4 : Edit dhcpd conf file/set range and other paramteres
Step 6 : Restart DHCP

## Webserver

Step1 : Install apache2 web server Sudo apt-get install apache2 Step2 : To check if webserver is listening on which port
Step3 : Restart the web server
Step4 : To put the webpage on the server

## Firewall

Step1 : Block a host to telnet into webserver
Step2 : Allow a host to Web request

## Backup

In order for a Linux Web server to automate our task of sending backup, we need an automatic login from our web server to host on which the backup is being copied. We don't want to enter any password. Step1 : Log onto web server and generate a pair of authentication keys
Step2 : Now use ssh to create a directory ~/.ssh on the host machine.
Step3 : Finally append Web server's public key to host
Step4 :Now we will compress the file that we need to make the backup
Step5 :Using the cron jobs we will schedule the backup for every minute

## Mail Server

Step1 : Install the postfix package first with defaults
Step 2 : Detailed configuration is done here. Select Internet Site as General type of mail config. System mail name -> FQDN name. Define the local Networks.
Step 3 : Edit edit /etc/postfix/sasl/smtpd.conf file and put these lines in it.
Step 4 :Restart postfix daemon
==Network File System (NFS)== Step1 : Install the kernel server
Step2 : Choose the directory which we need to share with client
Step3 : To export the directory through the terminal
Step3 :To check the mount
Step4 :To update few prompts
Step5 :On client side
==Testing== Testing DNS We basically use nslookup command to test DNS. Try nslookup <hostname> from all PCs in the network and it should show the translated IP. Also test reverse lookup. Apart from nslookup we can also use dig, host commands to test DNS.
Testing DHCP Connect client PC to the network and it should be assigned with a IP address automatically. This can be checked by ifconfig.
Testing WebServer Test by entrring hostname or IP address in any web browser. Testing Firewall Telnet to webserver is blocked. Try to telnet its Ip and it should show timeout. Testing backup Check the backup file on destination location by typing ls -l command and check the time when the last file backup was done.

## Future Improvements

1)Digital Signatures, symmetric key encryption, authentication can provide extra security to DNS. 2)Using DHCP to assign IP address for different subnets. This is possible with the use of relay agents. 3)Dynamic DNs helps to update records with dynamic IP address.

## Citations

Websites 1. https://help.ubuntu.com/community/BIND9ServerHowto
2. https://help.ubuntu.com/lts/serverguide/dns-configuration.html
3. http://www.ubuntugeek.com/how-to-install-and-configure-dhcp-server-in-ubuntu-server.html
4. https://help.ubuntu.com/community/isc-dhcp-server
5. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04
6. https://wiki.ubuntu.com/BasicSecurity/Firewall
7. http://www.server-world.info/en/note?os=Ubuntu_12.04&p=nis&f=2
8. http://net.tutsplus.com/tutorials/other/the-linux-firewall
9. https://help.ubuntu.com/community/PPTPServer
Books Referred 1. Computer Networking: A Top-Down Approach, James F. Kurose, Keith W. Ross