# Data Networking/Fall 2013/Group-18 Linux project
## Team mates

1. Aniket Muchandi 2. Philippe Yameogo 3. Sai Krishna Jonnalagadda 4. Hemanth

## Motivation

Linux is one of the major and Popular Operating System Software's in the world. Mainly, because of its nature and structure this OS is adapted by many companies to create and manage their Products and Services. It was so successful from its inception because of its Open Source Nature. This is our motivation to create a Personal Area Network using this OS, to get familiarized with the LINUX and to acquire knowledge in that Software.

## Understanding the Protocol

The protocol Architecture and implementation learned in the theory should be able to implement practically

## The Requirements

The LINUX based OS workstations and bind9 for dns server, apache2 for web server and dhcp-server for the DHCP server.
Dynamic Host Control Protocol (DHCP):
Dynamic Host Control Protocol is a standard networking protocol that dynamically configures IP addresses from the pool of IP addresses it has.

## Steps to Perform the Initialization

Configuring and DHCP Server: * Step 1:Install DHCP Server
Commands:
* Step 2:Assign Static IP address to the interface Commands:
* Step 3:Restart the Network Interfaces Commands:
* Step 4:Configure the DHCP Server with required range of Leasable IP address Commands:
* Step 5:Edit the resolv.conf file Commands:
* Step 6:Start the DHCP Server Commands:
DHCP configuration for IPV6 ̈Step1ː Install radvd to build IPv6 DHCP server. Command
̈Step2ːEdit the files in /etc/dhcp/dhcp6.conf
̈Step3ː Edit the files in /etc/radvd.conf
Step4ː In order to enable forwarding in ipv6 command
DNS Server
A DNS server translates hostnames like www.myname.com into numerical IP addresses like 162.163.164.165 which computers understand. Here is how to configure a DNS server:
*Step1: Install bind9 Command:
*Step2: Assign a static IP to your network interface Commands:
*Step3: Restart your network interface Command:
*Step4:Change your default hostname to a hostname of your choice Command:
*Step4:Create a domain name for your server
Commands:
* the following lines are desirable for IPv6 capable hosts
*Step6: In named.conf.options assign some open DNS IPs to allow you to connect to some DNS servers outside your network Commands:
*Step7: In named.conf.local, create your forward lookup and reverse lookup zones Commands:
For IPv6 write the following commands
*Step8: Create the directory zones in /etc/bind/ Command:
Create the two files, let's start with the forward lookup zone first db.domain.com Command:
Now use the command below to edit the file Command:
Now create reverse lookup zone file Command:
Now use the command below to edit the file Command:
Now use the command below to edit the file Command:
check whether it is working correctly or not by entering the command below for forward zone file Command:
Now check the reverse zone file Command:
*Step9: Edit the file resolv.conf Command:
*Step10: Restart the bind Command:
After bind start check your setting in log file Command:
it must not have any error in the log
*Step 11: Checking forward zones
or
*Step12: Check the reverse zone
Command:
Use NSLOOKUP
Command:
Web Server
A web server is a hardware/software which is used to deliver the web content through the HTTP client server model which can be accessible through the Internet. In our project we used the apache2 web server for delivering our web contents in our private network.
Commands and Procedure to configure the web server is as follows:
* Step1: Installation of webserver
step2ːTo check whether the web server is on port 80
step3ː Restart the web server
* Step3: Configuring the basic HTML file of the server
Firewall
Firewall is a software or hardware-based network security system that controls the incoming and outgoing network traffic by analyzing the data packets and determining whether they should be allowed through or not, based on applied rule set *Step1: For blocking the ICMP requests
commands:
*Step2:For preventing ssh login Command:
Step3:In order to block FTP ports Commands:
Step4:In order to block Telnet Commands:
BackUp
Backup is the process of backing up, refers to the copying and archiving of data so it may be used to restore the original after a data loss event. *Step1:Installing Rsync and ssh. Usually it is preinstalled in ubuntu.If not
*Step2: We perform a simple backup over a network is to use rsync via SSH. Local backup only requires rsync and read/write access to the folders. Command: Local Backup
*step3: Backup over Network Command:
"'step4:"' Automating the backup using crontab
"'step5:"'Exchanging the keys to the hosts to whom we have to send the files and this can be done using
VPN
Virtual private network extends a private network across a public network, such as the Internet. Step1ː Install pptpd packagɛ command
step2ːEdit the files in /etc/pptpd.conf
commanɖ
step3ːConfigure DNS servers to use when clients connect to this PPTP server commanɖ
step4ːNow add a VPN user commanɖ
step5ːset username and password commanɖ
step6ːRestart the VPN serveɽ command
Step7ːFor IPv4 forwarding we change /etc/sysctl.conf file
Command

## Testing

Testing DHCPː
In order to check whether IP are leased to the clients Command
ifconfig command is used to check the ip address of the client wɟho is connected to the network.
Testing DNSː
We can use ping command to find the status of the network. we can use nslookup command to check the nameservers that are connected to the network.
we can use dig command as it in checks the DNS name servers and returns the solution provided by the name serve.
Testing Web Serverː
Go to any web browser and type any ip address or a host id if the page is opened then the web server is working properly.
Testing Firewallː
Testing Case The configurations made for the firewall using the iptables are tentative and so we should be wise to save the files and run the same configuration during the reboot of the system.
Go to root user on your computer where we have configured the firewall using
Sudo su
And then save the iptables using the following commands: iptables-save > /etc/iptables.rules
After that go to /etc/network/if-pre-up.d/iptables and then place the following commands
* !/bin/sh
iptables-restore < /etc.iptables.rules
exit 0
After this procedure go to /etc/network/if-post-down.d/iptables and put the following commands
* !/bin/sh
iptables-save –c > /etc/iptables.rules
if [-f /etc/iptables.rules]; then
iptables-restore < /etc/iptables.rules
fi
exit 0
After these commands we have to change the permission to the files so that changes can be edited to use
Sudo chmod +x /etc/network/if-post-down.d/iptables
Sudo chmod +x /etc/network/if-preup.d/iptables
Testing BackUpː
We can check whether the files are backedup or not by going to the file directory and to check whether those specific which needed to be backup are received.
Testing Case
Please be aware to copy the public keys to the systems where we have to store the backup’s otherwise the backup will not be performed as those hosts are unknown to the sender. Then try to create the appropriate directory at the receiver side so that he can easily access the files without any hassles.
Testing VPNː
We use ifconfig and check for the ip address of the PPP ip addresʂ