# Data Networking/Fall 2014/SRKT
## Group Candidates

1. Rohit Gomashe 2. Pratyusha Keerthi K R 3. Sahil Jain 4. Tushar Shinde

## Purpose of Project

As in today’s world we use linux in most of the industries on switches, routers and all workstations because it is the open source Operating System and it is also customisable. That is the reason why we are working on this project because it will be useful to us in industrial experience.

## Protocols

DNS:
DNS stands for Domain Name Server, which resolves URL into an IP address. DNS in an intranet, such as our network, can resolve only hostnames and IP addresses mentioned in its files. Whereas in internet DNS maps domain name to IP address by assigning Authoritative servers to each domain.
DNS uses UDP to fetch IP address of a hostname, which includes following processes to forward packets:
Recursive Process
Iterative Process
Hostname to IP address mapping is known as Forward DNS query and IP address to hostname mapping is known as Reverse DNS query. We configured BIND9 according to our project requirements. BIND stands for Berkley Internet Name Domain, which contains both name server and resolver library.
DHCP:
DHCP (Dynamic Host Configuration Protocol) is used on layer three protocol (Internet Protocol to assign IP addresses to the devices connected in the same network. There are three methods by which DHCP server allocates IP address:
Dynamic Allocation: Devices connected to the network are dynamically allocated with IP addresses when the network is initialized.
Static Allocation: Every device requesting for a IP address is permanently assigned withan IP address.
Automatic Allocation: DHCP allocates IP addresses based on the pre defined, MAC address IP address mapping.
IP allocation is done in four phases, which includes discover, offer, request, acknowledge.
DHCP Server Discovery: Client broadcasts a DHCP discover message with source address as 0.0.0.0
DHCP Server Offer: DHCP Server responds with an offer message, which includes Transcation ID, Processs ID, Subnet mask, and IP address lease time.
DHCP Request: Client sends a DHCP Request message in response to the DHCP Offer message, which indicates that client is ready to accept the Configuration information involved in the Offer message. Unlike Discovery message, client includes its MAC address in the Request message.
DHCP ACK: DHCP server sends ACK message in response to the DHCP Request message, which includes the information client has requested for.

## The Requirements

LINUX OS
BIND9
UBUNTU 14.04
APACHE 2 to Implement web server
ISC-DHCP-SERVER for DHCP Implememtation

## Steps to perform the setup / installation

Installation of Domain Name System (DNS):
For named.conf.local:
For Forward lookup table:
For Reverse lookup table:
For Master Zone Files:
Commands used in installing DHCP on linux:
DHCP (IPV4) Steps
1) To install DHCP server:
2) DHCP file Configuration:
3) Command to edit network interfaces file:
4) DHCP Server restart:
DHCP log:
DHCP (IPV6) Steps:
1) Command used to install IPV6 server:
2) Command to edit the configuration file of radvd:
3) Command to edit dhcpv6 configuration:
4) Command to restart the radvd:
5) Command to restart dhcp6 :
Web Server:
A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol (HTTP), serves the files that form Web pages to Web users (whose computers contain HTTP clients that forward their requests).
Every computer on the Internet that contains a Web site must have a Web server program. Two leading Web servers are Apache , the most widely-installed Web server, and Microsoft's Internet Information Server (IIS).
Web servers often come as part of a larger package of Internet- and intranet-related programs for serving e-mail, downloading requests for File Transfer Protocol (FTP) files, and building and publishing Web pages.
Apache is generally recognized as the world's most popular Web server (HTTP server). Originally designed for Unix environments, the Apache Web server has been ported to Windows and other network operating systems. The Apache Web server provides a full range of Web server features, including CGI, SSL, and virtual domains.
Installation Steps:
Apache:
PHP modules (Server side scripting):
PHPadmin and MySql Installation:
Firewall:
A firewall is a hardware or software system that prevents unauthorized access to or from a network. It can be implemented in both hardware and software, or a combination of both. Firewalls are frequently used to prevent unauthorized Internet users from accessing private networks connected to the Internet. All data entering or leaving the intranet pass through the firewall, which examines each packet and blocks those that do not meet the specified security criteria.
The name firewall comes from a common architectural practice of placing a brick wall between two structures, to prevent a fire in one from spreading to the other.
The National Institute of Standards and Technology (NIST) 800-10 divides firewalls into three basic types:
Firewalls act as a platform for network security policy enforcement and network traffic inspection. They are defined by following attributes:
Standard capabilities: Packet filtering, Stateful protocol inspection, network address translation(NAT), VPN connectivity.
Truly integrated intrusion connection: Support for vulnerability-facing and threat-facing signatures and suggesting rules based on IPS activity.
Full stack visibility and application identification: Ability to enforce policy at the application layer.
Extra firewall intelligence: ability to take information from external sources and make improved decisions.
Adaptability to modern threat landscapes: Supports upgrade paths for integration of new information feeds and new techniques to address future threats.
In-line support : with minimum performance degradation or disruption to network service.
The following are the configuration commands and relevant functionalities:
iptables is a user-space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall.
-m conntrack - Allow filter rules to match based on connection state. Permits the use of the --ctstate option.
--ctstate - Define the list of states for the rule to match on. Valid states are:
Commands to allow and deny access to ssh, http, ftp-data, ftp-control, telnet by port address.
Allows icmp ping at input chain
Allows icmp ping at output chain
Save the configured file in a table
Restore the configured file in a table
NFS
NFS allows a system (NFS server) to share files with the systems connected to it in the same network.This helps in reducing the storage of files on each and every system in the network, instead can have access to all the files stores on server using NFS.
Steps involved in configuration of NFS server and client includes the following commands
NFS at Server:
NFS at Client:
Backup Server:
1) Command to Install rsync –
2) Command to change the configuration of rsync client and server
3) Command to create a shell script to finish the backup–
4) Command to edit the shell script –
5) Command to give the privilege to execute shell script –
6) Command to add shell script to the task table to execute–
7) Command to execute the shell script –
VPN
VPN stands for Virtual Private Network, which enables two devices on private network to connect over public network. In VPN the device in private network communicates as though it is connected to a public network, VPN ensures security. VPN is a point to point connection between two private networks through a dedicated network followed by encryption of data that can be sent over public network.
VPN in our project is enabled by creating a VPN connection with SSID and password.
For server:
1) Command to Install pptd –
2) Command to edit the file configuration of pptd –
3) Change the configuration file for VPN's username and password –
Secrets for authentication using CHAP
4) Restart the server –
NIS: NIS stands for Network Information System, which is a directory protocol for distributing data or information with the systems in same network. Data distributed by NIS database includes login names, passwords, group names, hostnames and IP addresses. For example if NIS data such as password is recorded in NIS database, the systems in the same network with NIS client configured on it, could be able to access with same login credentials. NIS implemented in our project has a record of password and username mapping, client can only read the records.
NIS Server configuration:
1) Command to install NIS:
2) Command to edit configuration:
3) Command to initiate database:
NIS Client configuration:
1) Command to install on NIS client:
2) Command to edit the configuration:
3) Command to add on /etc/passed, /etc/group, /etc/shadow respectively:
PXE Boot and RARP:

## Testing

Test Plan
DNS server Testing of following entries
1. Forward zone
2. Reverse zone
3. CNAME
4. A Name
5. Ping
Testing DNS:
Dig Nslookup (Name Server Lookup) Ping
Testing DHCP: Ifconfig
cat /var/lib/dhcp/dhcpd.leases
sudo dhclient
Testing Web Server:
By entering the webpage name www.dnlab.net in the client we were able to fetch a web page from the web server.
Testing Firewall:
When client whose IP address is blocked tries to ping the server then the result will be “request time out” and “server not reachable”.
Testing Backup:
Backup Testing was performed by synchronising the files to a fixed directory. We can confirm the presence of file by using ls command.

## Future Prospects

Future Scope:
1. We could have implemented light weight directory access protocol for maintenance of directory. 2. We could have implemented cloud server and bit torrent server. 3. We could have implemented modularity in network. 4. We could have implemented VLAN,s.

## Citations

Websites referred:
https://help.ubuntu.com/community/
https://wiki.debian.org/WiFi/AdHoc
http://www.linuxquestions.org/questions/linux-server-73/write-permission-for-users-on-nfs-folder-852800/
https://help.ubuntu.com/community/SettingUpNFSHowTo
http://www.garron.me/en/go2linux/how-setup-dns-server-master-slave-bind.html
https://help.ubuntu.com/lts/serverguide/dhcp.html
https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-onan-ubuntu-or-debian-vps
http://www.syslinux.org/wiki/index.php/PXELINUX#DHCP_Config_-_PXE-1
Books referred:
Computer Networking: A Top-Down Approach, 6/e James F. Kurose, Keith W. Ross