# Data Networking/Fall 2015/ACEP
## Team

1.Ankit Chourasia
2.Prashanth Reddy Edunuri
3.Elveera Linda Menezes
4.Venkata Pratapa

## MOTIVATION:

Linux is the most significant part or driving power behind IT industry. It is running almost everywhere, on PCs, Servers, Routers, and Smartphones, etc. Linux is an Open Source and which creates a feel like independence to work and enhance our skills and obviously it develops interest in us. It helps us to become passionate for passive learning and passively acquire self-sufficiency. The world is looking for Linux professionals. There are demand, high salaries and many opportunities for Linux professionals. We are doing this project, to get acquainted with the most versatile and collaborative OS, which has features like superior design & performance, extremely scalable, Multi-Platform, True Multi-user, True Multi-tasking, Multi-threading and security.

## DHCP (DYNAMIC HOST CONFIGURATION PROTOCOL):

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.
For IPv4: Step 1: Install DHCP server
Command:
Step 2: Now set the static IP address of the DHCP server
Command:
Step 3: Change lo to either eth0 or wlan0 and loopback to static or else keep both of them
Command:
Step 4: Restart the network
Command:
Step 5: Configure the DHCP server
Command:
Step 6: Edit the dhcp.conf file and make the following changes
Command:
Step 7: Open the resolv.conf file
Command:
Step 8: Edit the resolv.conf
Command:
Step 9: Restart the DHCP server
Command:
For IPv6:
Step 1: Install radvd to build IPv6 DHCP server
Command:
Step 2: Open radvd.conf file
Command:
Step 3: Edit the radvd.conf file and make following changes
Command:
Step 4: Open dhcpd.conf file
Command:
Step 5: Edit dhcpd.conf file and make following changes
Command:

## DNS (DOMAIN NAME SYSTEM):

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, then comes the Top Level Domain (TLDs) and then authoritative DNS servers.
Step 1: Install bind9
Command:
Step 2: Open the interfaces.
Command:
Step 3: Edit the interfaces and configure static IP address for the DNS server
Command:
Step 4: Reboot the virtual machine
Command:
Step 5: Open the named.conf.options
Command:
Step 6: Remove the comments from the forwarders
Command:
Step 7: Configure the named.conf.options
Command:
Step 8: Open the named.conf.local
Command:
Step 9: Configure zones in the named.conf.local file
Command:
Step 10: Open the forward lookup table in the zone
Command:
Step 11: Configure the forward lookup table
Command:
Step 12: Open the reverse lookup table in the zone
Command:
Step 13: Configure the reverse lookup table
Command:
Step 14: Open the resolv.conf file
Command:
Step 15: Edit the resolv.conf file
Command:
Step 16: Restart the Bind9 server
Command:

## WEB SERVER:

A web server is a server placed in the network to primarily handle the HTTP requests made by hosts of the network. It helps to connect the network hosts to the World Wide Web. It is a network component which takes all the resolved requests from DNS as inputs, fetches the requested page or request and replies back with an appropriate reply.
Step 1: Install Apache Web server
Command:
Step 2: Open the index.html page, which is the webpage of Web server
Command:
Step 3: Edit the index.html
Command:
Step4: Open the interfaces
Command:
Step 5: Edit the interfaces and change the IP address to static
Command:
Step 6: Open the hosts
Command:
Step 7: Edit the hostnames in the hosts
Command:
Step 8: Restart the Web server
Command:

## FIREWALL:

A system that controls traffic coming in or going out of the network. It acts as a barrier to the unwanted traffic flowing through it. We can block a network, a particular host, or certain sections of communications such as FTP, telnet, TCP, UDP, ICMP, etc.
Step 1: Install UFW firewall
Command:
Step 2: Check the status
Command:
Step 3: Change status to active
Command:
Step 4: Configure UFW for port 80/tcp
Command:
Step 5: Configure UFW for port 22/tcp
Command:

## BACKUP SERVER:

Step 1: Log into the Web server and generate a pair of authentication keys
Command:
Step 2: Using ssh create a directory ~/.ssh on the host machine
Command:
Step 3: Now append Web server’s public key to the host
Command:
Step 4: Now we have to compress the file, which is needed to be backed up
Command:
Step 5: Open crontab file
Command:
Step 6: Using cron jobs we will schedule the backup for every minute
Command:

## MAIL SERVER:

Mail server is a network component which helps to also send e-mails to other domains other than our own. If mail server would not had been there in the network, we might just be able to send e-mails to people with our domain name. Through a mail server, a mail could be send out to everyone via internet. This service is very useful for communication within and outside your domain network.
Step 1: Update the Ubuntu OS with packages
Command:
Step 2: Install all the packages along with Postfix and Dovecot which are required
Command:
Step 3: Change the directory to /etc/bind and open named.conf.local file
Command:
Step 4: Add zones to the named.conf.local file
Command:
Step 5: Copy content of file db.local to db.linux
Command:
Step 6: Copy content of db.127 to db.192
Command:
Step 7: Open db.linux file
Command:
Step 8: Edit db.linux file
Command:
Step 9: Open db.192 file
Command:
Step 10: Edit db.192 file
Command:
Step 11: Disconnect net and restart bind
Command:
Step 12: Do a nslookup for mail we created
Command:
Step 13: Dig that mail
Command:
Step 14: change the directory to /etc/apache2/sites-available/
Command:
Step 15: Copy content in 000-default.conf to mail.conf
Command:
Step 16: Open mail.conf file
Command:
Step 17: Edit mail.conf file
Command:
Step 18: Ensite the mail
Command:
Step 19: Restart apache
Command:
Step 20: Reconfiguring postfix
Command:
Step 21: Open apache.conf file in /etc/squirrelmail/
Command:
Step 22: Edit apache.conf file
Command:
Step 23: Open dovecot.conf file in /etc/dovecot/
Command:
Step 24: Edit dovecot.conf file
Command:
Step 25: Kill all the processes
Command:
Step 26: Set the static IP address for the server
Command:
Step 27: Restart bind, apache, postfix and dovecot
Command:
Step 28: Addusers
Command:

## NFS (NETWORK FILE SYSTEM):

It is a file system protocol which is of distributed type. A client can share or access files over the network such as it is stored locally. Thus, a client will be able to have access to every file available in its network only like it has been saved by itself. This protocol improves the interactive capabilities for the host and the entire network.
Step 1: Install the NFS server
Command:
Step 2: Create directory which we need to share with client
Command:
Step 3: Providing permissions for client to access the NFS share (i.e., mkdir public to all)
Command:
Step 4: Open the user file
Command:
Step 5: Open the export file having network address
Command:
Step 6: Edit export file
Command:
Step 7: Do an exportfs command
Command:
Step 8: At client end, make directory test to share the file of the server
Command:
Step 9: Making the test directory read and write
Command:
Step 10: Mounting the servers directory on to test
Command:

## NTP (NETWORK TIME PROTOCOL):

Step 1: Install ntp and ntpdate
Command:
Step 2: Show the status of configured peers
Command:
Step 3: Open ntp.conf file in /etc/
Command:
Step 4: Edit ntp.conf file
Command:
Step 5: Restart ntp server
Command:
Step 6: Show the status of configured peers and broadcast address should be added
Command:
Step 7: Open client in new virtual machine and install ntp and ntpdate
Command:
Step 8: Show the status of configured peers
Command:
Step 9: Open ntp.conf file in /etc/
Command:
Step 10: Edit ntp.conf file
Command:
Step 11: Restart ntp server
Command:
Step 12: Show the status of configured peers and server IP address should be added
Command:

## VPN (VIRTUAL PRIVATE NETWORK):

VPN (Virtual Private Network)- Point to Point Tunneling Protocol (PPTP)
Step 1: Install pptpd package
Command:
Step 2 : Open pptpd.conf file
Command:
Step 3: Open pptpd-options
Command:
Step 4: Add details as specified below for authentication
Command:

## TESTING:

* Connect all network components to a switch
* Do an –ifconfig –on client
* Client gets an IP address from DHCP server; within network range and subnet mask
* Client makes a HTTP request
* Request send to DNS for resolution
* DNS resolves the request, sends back a reply to client with associated IP/Hostname
* Subsequent HTTP request made to web server
* Web server fetches and replies back to client with associated HTTP page

## REFERENCES:

[1] https://www.youtube.com/watch?v=hFe81mkO_uY
[2] http://mirrors.bieringer.de/Linux+IPv6-HOWTO/hints-daemons-isc-dhcp.html
[3] https://www.youtube.com/watch?v=DuVNclBfykw
[4] https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
[5] https://www.digitalocean.com/community/tutorials/how-to-setup-a-firewall-with-ufw-on-an-ubuntu-and-debian-cloud-server
[6] https://help.ubuntu.com/community/SettingUpNFSHowTo
[7] https://help.ubuntu.com/community/BackupYourSystem
[8] https://help.ubuntu.com/12.04/serverguide/firewall.html
[9] https://vpnreviewer.com/how-to-install-vpn-server-pptp-debian-ubuntu-linux-vps
[10] http://whatismyipaddress.com/mail-server