User:Pan.bo/TSMG5330-F13-Group2

TSMG 5330 Group2

-> Bojun Pan -> Yawei Hao -> Sukhraj Preet Kaur -> Dishen Mistry

Motivation
The LINUX Project has immensely created a motivation in the direction of networking. The project has not just been an academic assignment, it has become a thought process whenever we come across theses network components. Also along with network components, we have become quite familiar with the commands and the wide variety of tools that we use have used in Ubuntu. It has given us an intense hands-on training along with learning basic concepts and terminal commands that come into use. The project has also created a sense of vision so as to make the system more easily accessible.

DNS:
The DNS stands for Domain Name Server. The DNS protocol is used by the browser of the host (client) to usually obtain the IP address of the domain name (URL) of the website which is not cached. For an intranet system, the DNS will be able to resolve only those IP addresses whose host name must be stored in its local files. In an internet based system, the DNS sends a query to the internet which is further processed to extract the IP address using following processes: Depending on the query forwarded by the client, the DNS can perform two functions: There are three classes of DN servers. 
 * Recursive Process.
 * Iterative Process.
 * Forward DNS Query – Hostname to IP address.
 * Reverse DNS Query – IP address to Hostname.
 * Root DNS servers
 * TLD- top level domain DNS servers
 * Authoritative DNS servers

DHCP:
DHCP stands for Dynamic Host Configuration Protocol. The basic function of DHCP is to dynamically assign IP addresses from a reserved pool of address. The client which enters the network needs an IP address as well as the configurations in order to communicate with other clients in the network. The DHCP can assign the IP address to the client in two ways: The communication between the Client and the DHCP Server can be given as below: The DHCPv6 works on port number 546 for client and 547 for server. 
 * Dynamic – IP address is assigned automatically.
 * Static – The IP address is typed in manually in the client’s computer.
 * When a client (device) is connected to the Network, it sends DHCP-DISCOVER message to DHCP server. Since no network configuration is there, so source address is 0.0.0.0 and destination is 255.255.255.255. If server is in local subnet, it directly receives the message else a relay agent is used to pass request to DHCP server
 * When DHCP server receives DHCPDISCOVER, it replies with DHCP-OFFER providing all network configurations required to the client.
 * To indicate that client wants to accept the configuration sent in DHCPOFFER, it sends back DHCP-REQUEST message to server. If there were multiple DHCP servers that that received DHCPDISCOVER, then client would receive multiple DHCPOFFER but the client replies to only one of messages.
 * Once the server receives DHCPREQUEST, it sends back DHCP-ACK which indicates that client can use IP address assigned to it. And along with it the lease for IP address starts.

WEB Server:
A Web Server is a collection of Web pages. The basic function of the Web server is to deliver Web pages to the client. These web pages comprises of HTML documents which are customizable and can be transferred easily from server to client. In order to communicate between the server and client, a HTTP connection has to be established between them using the Three Way Handshake process. The HTTP connection can be of three types. The web server receives the request for HTTP connection from the client on port number 80 and is further directed to an empty port using forking in order to receive other pending requests. There are basically two versions of HTTP connection widely used. They are listed as below: A virtual private network (VPN) extends a private network across a public network, such as the Internet. It enables a computer to send and receive data across shared or public networks as if it were directly connected to the private network, while benefiting from the functionality, security and management policies of the private network. This is done by establishing a virtual point-to-point connection through the use of dedicated connections, encryption, or a combination of the two. 
 * Non Persistent HTTP: In this type of connection, the session breaks after transfer of data and needs to perform the handshake once again to do the data transfer.
 * Persistent HTTP: In persistent HTTP connection, the session continues to be going on even after data has been transferred and thus no new HTTP connection is required for multiple times data transfer.
 * Persistent with Pipelining: This is a special case of Persistent HTTP connection. In this connection, multiple objects can received in a fixed time interval. Thus the benefit of this type of connection is to save time and have more data transfer.
 * HTTP/1.0 – Supports Non Persistent Pipelining and uses basic headers such as GET, POST, EDIT and DELETE.
 * HTTP/1.1 – Supports Persistent Pipelining and helps in bandwidth optimization due to multiple data transfer.

Firewall:
A firewall can be a software as well as a hardware device. The basic function of the firewall is to protect the system from any unknown intruder as well as block any unknown request, which is not intended for the system. Thus a firewall acts as a barrier between the client and the web server, preventing any unwanted request to be processed. 

VPN (Virtual Private Network):
A VPN connection across the Internet is similar to a wide area network (WAN) link between the sites. From a user perspective, the extended network resources are accessed in the same way as resources available from the private network. The VPN implementation can be done by creating a new VPN connection by the remote client and enter the SSID and password assigned to it by the access network, thus enjoying the privileges of the network. 

NIS (Network Information Services):
The Network Information Services or NIS (originally called Yellow Pages or YP) is a client–server directory service protocol for distributing system configuration data such as usernames and host names between computers on a computer network. Administrators have the ability to configure NIS to serve password data to outside processes to authenticate users using various versions of the UNIX cryptography and hash algorithms. However in such cases, any NIS client can retrieve the entire password database for off line inspection. Kerberos was designed to handle authentication in a more secure manner. The NIS implemented in the project is used to map the address and the password file of all the users and thus it virtually shows the client that it is accessing the files of server but it is not. The client is in its own directory but only having read only features of the server directory. <BR>

NFS (Network File System):
Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The Network File System is an open standard defined in RFCs, allowing anyone to implement the protocol. In implementation of this add-on we use the RSA algorithm where two hosts exchange the public keys between them and only after that both can view specific files into each other’s system. These files are accessible only when the folders are mounted on the host’s computers.

Mail Server:
Electronic mail, most commonly referred to as email or e-mail since ca. 1993, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the same time, in common with instant messaging. Today's email systems are based on a store-and-forward model. Email servers accept, forward, deliver, and store messages. Neither the users nor their computers are required to be online simultaneously; they need connect only briefly, typically to a mail server, for as long as it takes to send or receive messages.

The Requirements
In order to complete the project, the basic requirements include a 32-bit or a 64-bit Linux machine. A switch to connect the Linux Machines and the connecting wires are the physical requirements.<BR><BR>

We also need satisfy the software needs in order to configure the Linux machines into one of the network components.Thus to accomplish the software requirements, we need to install some servers inside the Ubuntu 12.04, such as: bind9, dhcp3-server, radvd, wide-dhcp-server, mysql5, apache2, php5, phpmyadmin, php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl, rsync, pptp, nis portmap, nfs-kernel-server, nfs-common <BR>

DNS

 * install bind9: apt-get install bind9<BR>

DHCP

 * install dhcp3-server: apt-get install dhcp3-server<BR>
 * install radvd: apt-get install radvd<BR>
 * install wide-dhcp-server: apt-get install wide-dhcp-server<BR>

WEB
imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl<BR>
 * install mysql5: apt-get install mysql5<BR>
 * install apache2: apt-get install apache2<BR>
 * install php5: apt-get install php5<BR>
 * install phpmyadmin: apt-get install phpmyadmin<BR>
 * install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell     php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl: apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-

BACKUP

 * install rsync: apt-get install rsync

VPN

 * install pptp: apt-get install pptp<BR>

NIS

 * install nis portmap: apt-get install nis portmap<BR>

NFS

 * install nfs-kernel-server: apt-get install nfs-kernel-server<BR>
 * install nfs-common: apt-get install nfs-common<BR>

Tests Plan
<BR> '''DNS<BR>
 * step 1: use "host" in the DNS server to check the work status of DNS. <BR>
 * step 2: use "nslookup" to test on the client's computer. <BR>
 * step 3: use "ping" to ping the domain name of a specific host. <BR>

'''DHCP<BR>
 * step 1: use ipconfig/ifconfig to check the ipv4/ipv6 address of the DHCP server. <BR>
 * step 2: use ipconfig/ifconfig to check the ipv4/ipv6 address of a specific server. <BR>
 * step 3: use ipconfig/ifconfig to check the ipv4/ipv6 address of a random client. <BR>

'''WEB<BR>
 * step 1: use ip address to use browser to visit the web server. <BR>
 * step 2: use host name to use browser to visit the web server. <BR>

'''Firewall<BR>
 * step 1: use "ssh" to check if it blocks ssh protocol.<BR>
 * step 2: use "ping" to check if it blocks icmp.<BR>
 * step 3: use ip address to check if it can visit the web server.<BR>

'''Backup<BR>
 * step 1: set a time and to check if there exists a zipped file in the specified directory.<BR>
 * step 2: zip the file and check if the file is right.<BR>

'''VPN<BR>
 * step 1: establish a vpn connection and connect successfully.<BR>
 * step 2: using ipconfig/ifconfig to check PPP ip address.<BR>

'''NIS<BR>
 * step 1: use yptest to check if the NIS server works well. <BR>
 * step 2: use ypwhich to check the database negotiation between client and server.<BR>
 * step 3: use ypcat to check a user's information.<BR>

'''NFS<BR>
 * step 1: use showmount in the client's computer to show the shared file directory in the server. <BR>
 * step 2: use mount to mount the file from server to client. <BR>

'''Mail Server<BR>
 * step 1: use telnet SMTP, squirrelmail HTTP to send a email to a existed address. <BR>
 * step 2: use mailx to send a system email to the client. <BR>
 * step 3: use telnet POP3, IMAP and squirrelmail HTTP to receive the email. <BR>

Test Tools

 * Our teams' computer.
 * Ubuntu System.
 * Three servers and a client.
 * Switch & Cables or Ad-hoc Network.

Expansion
There are plenty of servers we can Install and configure in Ubuntu in the future. Such as OwnCloud server, Chat server, BitTorrent Sync server and so on. <BR>

Growth
After two months hard work, we finial make all basic ones come true and add some amazing add-ons. To be honest, we group 2 experienced tremendous troubles, which are really difficult. However, we gave up several weekends, we gave up thanksgiving vacation, just want to make the project perfect! Yes, we did! <BR>

Improvements
Although everything seems perfect now, we still have much more to learn and to implement. For instance, fault-tolerance of DHCP, notification of changes on the network to a client as well as an address retrieval by the DHCP server. <BR>

Reference
[1]. Alexander, S., & Droms, R. (1997). DHCP options and BOOTP Vendor Extensions.<BR> [2]. Welling, L., & Thomson, L. (2003). PHP and MySQL Web development. Sams Publishing.<BR> [3]. Van Wyngarden, A. (2000). U.S. Patent No. 6,038,597. Washington, DC: U.S. Patent and Trademark Office.<BR> [4]. Rankin, K., & Hill, B. (2009). The official Ubuntu server book. Pearson Education.<BR> [5]. van Vugt, S. (2009). Configuring Ubuntu Server As a Mail Server. Pro Ubuntu Server Administration, 249-280.<BR> [6]. https://help.ubuntu.com/lts/serverguide/firewall.html.<BR> [7]. http://manpages.ubuntu.com/manpages/precise/man8/ypinit.8.html.<BR> [8]. https://en.wikipedia.org/wiki/DNS<BR> [9]. https://en.wikipedia.org/wiki/DHCP<BR> [10].https://en.wikipedia.org/wiki/Web_server<BR> [11].https://en.wikipedia.org/wiki/Firewall<BR> [12].https://en.wikipedia.org/wiki/VPN<BR> [13].https://en.wikipedia.org/wiki/Network_Information_Service<BR> [14].https://en.wikipedia.org/wiki/Network_File_System<BR>

Updates
10/31/13: DNS Server configured and tested.<BR> 10/31/13: Web Sever configured and tested. <BR> 11/19/13: DHCP Sever configured and tested on the switch.<BR> 11/23/13: Backup Server configured and tested. <BR> 11/24/13: Firewall configured and tested. <BR> 11/25/13: VPN Server configured and tested. <BR> 11/26/13: NIS Server configured and tested. <BR> 11/26/13: NFS Server configured and tested. <BR> 11/27/13: DNS for ipv6 configured and tested. <BR> 11/28/13: DHCPv6 configured and tested. <BR> 11/29/13: Slave DNS configured and tested. <BR> 11/30/13: Mail Server configured but fail tested. <BR> 12/01/13: Mail Server configured and tested. <BR> 12/01/13: Report finished. <BR>

Problems Faced
1. General:<BR> a)It's hard for windows 8 to install dual boot ubuntu.--solved<BR>   b)Cannot install some packages in ubuntu system.--solved

2. DNS:<BR> a)Difficulties creating a Ad-hoc network.--solved<BR>   b)Server Fail error due wrong Master file creation in zone configuration.--solved<BR> c)Network icon disappearing from the tab.--solved<BR>   d)Destination host unreachable at client.--solved<BR> e)Request Timed Out on server.--solved

3. DHCP:<BR> a)When we change the wlan interfaces of the networks to assign a static address, the network seems to be broken.     Although we could see the ip address in the server, we could not even find the ad-hoc from other computer.(Static Routing).--solved<BR>   b)Radvd sometimes does not work well. If we stop the server, some problem occurs and then we can not even assign IPv4 address for client.--solved<BR> c)We don't know how to change every machines' nameserver to DNS server automatically.--solved<BR>  d)We don't know how to assign fixed ipv6 address for a specific client or server.--solved

4. Web Server:<BR> a)We cannot install extra function for extra support.--solved<BR>  b)We cannot access to the PHPMyAdmin page after install PHPMyAdmin.--solved

5. Backup Server:<BR> a)We cannot send file automatically without the permission of the receiver machine.--solved

6. Firewall:<BR> a)We cannot block the icmp using ufw firewall.--solved

7. VPN:<BR> a)We can directly connect to VPN using windows, but cannot directly connect using ubuntu.--solved

8. NIS:<BR> a)When client install the nis and portmap package, the client will automatically search NIS domain which makes our computer very slow.--solved<BR>  b)When client use yptest, there will be a warning in test 3.--solved

9. NFS:<BR> a)Once we mistakenly mount the share file to the home directory, we even lost our own user.--solved<BR>  b)Client is only allowed to read for the shared file when it mount to the client computer.--solved

10.Mail<BR> a)We meet a problem Sender address rejected: Access denied.--solved<BR>  b)When send an email use telnet SMTP, the sender's address could not be seen by the receiver.--solved<BR> c)When we send an email, the receiver could not receive it, it was filtered by the courier.--solved

11.Slave DNS<BR> a)We meet a problem that Slave DNS cannot update the master's zone file automatically after master changes it's zone file.--solved