# Data Networking/Fall 2015/Zopgang
## Group Members

1) Mitali Vikas Mathure 2) Priyanka Suresh Pawar 3) Neha Sudhir Mahajan 4) Shivani Santosh Jakhi

## Motivation

The main objective of this project is to implement a network in real scenario using Linux based operating system on Ubuntu 14.04 by configuring network elements such as DHCP,DNS, Web Server, Firewall and Back-up. Linux is secure, the processing speed is faster as compared to other systems and smart enough to cater the needs of an organization.

## Understanding the Protocols
### DHCP

Every device on a TCP/IP-based network must have a unique unicast IP address to access the network and its resources. Without DHCP, IP addresses for new computers or computers that are moved from one subnet to another must be configured manually; IP addresses for computers that are removed from the network must be manually reclaimed.
With DHCP, this entire process is automated and managed centrally. The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled client when it starts up on the network. Because the IP addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation.
The network administrator establishes DHCP servers that maintain TCP/IP configuration information and provide address configuration to DHCP-enabled clients in the form of a lease offer. The DHCP server stores the configuration information in a database that includes:
* Valid TCP/IP configuration parameters for all clients on the network.
* Valid IP addresses, maintained in a pool for assignment to clients, as well as excluded addresses.
* Reserved IP addresses associated with particular DHCP clients. This allows consistent assignment of a single IP address to a single DHCP client.
* The lease duration, or the length of time for which the IP address can be used before a lease renewal is required.

### DNS

Domain Name System (or Service or Server), an Internet service that translates domain names into IP addresses. Because domain names are alphabetic, they're easier to remember. The Internet however, is really based on IP addresses. Every time you use a domain name, therefore, a DNS service must translate the name into the corresponding IP address. For example, the domain namewww.example.com might translate to 198.105.232.4. The DNS system is, in fact, its own network. If one DNS server doesn't know how to translate a particular domain name, it asks another one, and so on, until the correct IP address is returned.

### Firewall

A firewall is a network security system, either hardware- or software-based, that controls incoming and outgoing network traffic based on a set of rules. Firewalls are used to protect both home and corporate networks. A typical firewall program or hardware device filters all information coming through the Internet to your network or computer system. There are several types of firewall techniques that will prevent potentially harmful information from getting through: Packet Filter Looks at each packet entering or leaving the network and accepts or rejects it based on user-defined rules. Packet filtering is fairly effective and transparent to users, but it is difficult to configure. In addition, it is susceptible to IP spoofing. Application Gateway Applies security mechanisms to specific applications, such as FTP and Telnet servers. This is very effective, but can impose a performance degradation. Circuit-level Gateway Applies security mechanisms when a TCP or UDP connection is established. Once the connection has been made, packets can flow between the hosts without further checking. Proxy Server Intercepts all messages entering and leaving the network. The proxy server effectively hides the true network addresses.

### Web Server

Web servers are computers that deliver (serves up) Web pages. Every Web server has an IP address and possibly a domain name. For example, if you enter theURLhttp://www.webopedia.com/index.html in your browser, this sends a request to the Web server whose domain name is webopedia.com. The server then fetches the page named index.html and sends it to your browser.Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet. There are many Web server software applications, including public domain software and commercial packages.

### Virtual Private Network

VPN means Virtual Private Network, a secure tunnel between two devices. Protect and free yourself online with just 1 click. Express VPN creates a secure tunnel between your computer and every website or application online allowing you to anonymously appear to be anywhere you choose.

### Network File System

NFS stands for Network File System, a file system developed by Sun Microsystems, Inc. It is a client/server system that allows users to access files across a network and treat them as if they resided in a local file directory.

### Network Time Protocol

Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in current use.

## Project Requirements

DHCP server [isc-dhcp-server]
DNS [bind9]
Web server [apache2]
Firewall [ip tables]
Back up [ssh server].

## Configuration Steps
### DHCP

1. Install DHCP Server
2. Install radvd package
3. Set the static IP address of the DHCP server
4. Configure the IPv6 and IPv4 forwarding
5. Make eth0 as the default interface
6. Configure the DHCP server for ipv4
7. Edit the resolv.conf file
8. Configure the DHCP server for ipv6
9. Configuration of the radvd module
10. Reboot the System
11.
12. Restart the DHCP server

### DNS

For DNS configuration the following steps are done • For IPv4
1) Initially the network-manager assigns a dynamic IP address to the port, but servers need to have a static IP address. This can be done changing the configuration in the “/etc/network/interfaces” file.
In this file we need to add the address for the port required and save it using cntrl + X followed by Y.
2) After changing the /network/interfaces file reboot the system by the following command
3) Restart the network-manger
4) Install the bind9 server
5) After installing the bind9 server we need to make changes in the configuration file in the Bind directory.
6) In the named.conf.options we need to add the forwarders
7) Configure forward and reverse lookup zones in the named.conf.local
8) Create a sub directory called ‘zones’ and create forward and reverse database files
9) Create the reverse lookup database file
10) Set the nameservers in the resolv.conf file
11) Restart the bind9 server
12) For the slave server repeat steps 1 to 6 and in the named.conf.local file include the following commands
13) Configure the resolv.conf file as in step 10 and restart the bind9 server.
* For IPv6
1) Set static IPv6 address to the master and slave server by the following commands
2) In the named.conf.local file add the reverse IPv6 domain for master and slave.
In the master configuration file add
In the slave configuration file add
3) In the zones directory add the IPv6 reverse zone database file in the master dns server
4) Restart both master and slave dns servers.

### Web Server

1. Install apache2
2. Check webserver is listening on which port
3. Recheck if the same port is removed from the list
4. Go to html directory and open index.HTML file present in var/www/html/index.html to edit the web page
5. HTML file can be edited as required.

### Firewall

1. Check from any client or device on the same network, whether it can ping to this device (using cmd). It should reach.
2. View the iptables listed
3. Block icmp requests to check protocol filtering
4. Blocks all HTTP requests from a particular client or device
4. Ping from any device connected to the same network. It will not be able to reach the device due to firewall.

### Backup Server

1. Install ssh server
2. Install ssh client on another VM
3. Generate public and private keys in the client
4. Copy the public key to ssh server
5. For executing backup.
6. For executing automatic backup

## Add-ons
### Virtual Private Network

1. Installating the pptpd server
2. Coniguring the pptpd file
In this file we need to update the IP of the server and the IP of the client
3.Configuring the DNS server
4. Updating the VPN users in the chap-secrets file
5. On configuring the pptp server,it has to be restarted so that all the settings can take effect.

### Mail Server

1. Update the Ubuntu OS with packages
2. Install Postfix & Dovecot
3. Restart the mail server
4. Check it using nslookup & dig tool
5. Moving the configuration file to dovecot-core
6. Restart the Apache server
7. Reconfigure Postfix
8. Editing the configuration file for apache & dovecot
9. Kill all the processes
10. Set the static IP address for the mail server
11. Restart all the processes
12. Add users & assign them passwords

### Network file System (NFS)

Steps to configure NFS Server
1. Update repository
2. Install NSF package
3. Create directory to share
4. Configuring /etc/exports for NFS
5. Start the service
6. Check the status of the NFS share status
7. Restart the server
Steps to configure NFS Client
1. Install NFS for client and its dependencies
2. Create a directory
3. Mounting the remote share /home on local directory /home/nfsclient

### Network Time Protocol (NTP)

1. Install NTP packages
2. Edit the ntp configuration file
3. To start, stop, restart the ntp server

## Future Scope

1. We could implement a secondary DNS server in the network so that if the first DNS server fails, then all the queries directed towards the first DNS server will be forwarded towards backup server and will be successfully resolved.
2. We would implement NIS which is a central directory of user and group information which acts as a global user client list.
3. Routers can be added to the present configuration to see the communication between two different hosts on two different subnets, which is a real life scenarios.