Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets.

Similar presentations


Presentation on theme: "INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets."— Presentation transcript:

1 INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets

2 Instructor: Omnia Alwazzan Office:1 st floor, room127 Lab: lab 113 Office Hours: Sun: 9:00 - 9:50 AM Tue: 9:00 - 10:50 AM Thur: 9:00 - 9:50 AM Group link: https://groups.yahoo.com/neo/groups/NetApp_405/info https://groups.yahoo.com/neo/groups/NetApp_405/info e-Mail:omnia.alwazzan@gmail.com

3 Outline of this lab Web Server:  Installation of Apache Tomcat Server Installation  Test the connectivity with the web server and others using Telnet and Wireshark.

4 Install a Web Server: 1. Download the Apache Tomcat Web server installable binary file from Tomcat website. (http://tomcat.apache.org/download-80.cgi)http://tomcat.apache.org/download-80.cgi 2. The Apache web server installation requires the JRE (Java Runtime Environment) to be installed in the machine. In order to do this, install the JDK from the same page which includes the JRE. (http://www.oracle.com/technetwork/java/javase/downloads/index.html)http://www.oracle.com/technetwork/java/javase/downloads/index.html 3. After installing the JRE, unzip the Apache Tomcat downloaded software (there is no installation rather just unzipping the package only) 4. Then, locate the unzipped folder in the C:\\ drive ( or somewhere else easy to access). 5. Open the command prompt and do the following:

5 1. Set the JAVA_HOME environment variable in the machine as it is required for JRE to take effect. set JAVA_HOME = path to JDK folder (for example: C:\Program Files\Java\jdk1.7.0_40) 2. Access the bin folder of the Tomcat server and run the startup batch. Check the image below:

6 Set JAVA_HOME -Method 1

7 Set JAVA_HOME -Method 2 1) Right-click the My Computer icon on your desktop and select Properties. 2) Click the Advanced tab. 3) Click the Environment Variables button. 4) Under System Variables, click New. 5) Enter the variable name as JAVA_HOME. 6) Enter the variable value as the installation path for the Java Development Kit. path to JDK folder (for example: C:\Program Files\Java\jdk1.7.0_40) 1) Click OK. 2) Click Apply Changes.

8 6. Open a browser and type the following in the address bar http://127.0.0.1:8080/ 7. The default page will open from your PC. This page also can be reached by others in the network (if the machine is connected in the network) by using the IP of the machine instead of 127.0.0.1

9

10 8. Try to locate the default file displayed by the server and do some basic content modification on it. 9. Now if you see the modified page in the browser by typing the address http://127.0.0.1:8080/ then you have successfully installed and run the web server. 10. To shutdown the server, locate the file shutdown.bat in the bin folder and run it. The server will be shutdown.

11 Install and Examine TCP/IP services: a. Enable TCP/IP Services: Note that the steps provided here might vary from one version of Windows to another. Telnet client is identified as Telnet Client  To install some of the TCP/IP services in Windows platform use Start  Control Panel  Programs  Programs and Features  Turn Windows Features on or off. This displays the dialogs shown in the following Figure. Select Telnet Client and Telnet Server and Simple TCPIP Services and click on OK. The process will automatically install the necessary services.

12

13  To verify, stop and resume any of these service use Start  Control Panel  System and Security  Administrative Tools  Services, which displays the Services Window shown below.

14 b. Enable TelNet client: Finally, one can use Telnet client to interact with any of these services. If you open a command prompt and type telnet, you will find that the command executes and provides you with various options available in telnet command.  For example, to access chargen (which listens on TCP port 19), type the following at the Start  Command Prompt: telnet 127.0.0.1 19  Note: Sometimes, you need to use the IP address of your PC.  Write down the command to access the Daytime service [Port number 13]. What is the output?

15 Capturing HTTP traffic using WireShark:  Have WireShark software run on Station A (web client) and try to capture the HTTP traffic data during a web session between stations A (web browser) and station B (web server). Open the web page from the client using web browser.

16

17  As the above figure shows there are three TCP packet exchanges (three-way hand shake used to open a TCP connection) preceding the TCP packet containing the actual GET request. Note that HTTP data immediately follows the TCP header and is readable in the ASCII interpretation of the hex dump (right-bottom view).

18 Connecting to an FTP Server using commands and Capturing the FTP packets using WireShark The following is a sample interaction with an FTP server using the FTP command. Note that in this example we are connecting to a website that already exits on the local machine, not a remote one. C:\>ftp 127.0.0.1 [Note: Sometimes you need to use the IP address] Connected to 192.168.230.1. 220 Microsoft FTP service User (192.168.230.1:(none)): anonymous Anonymous access allowed, send identity (e-mail name) as password. Password: a@b.c 230 anonymous user logged in. ftp> cat Invalid command. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 02-25-04 02:00PM images 226 Transfer complete. ftp: 258 bytes received in 0.06Seconds 4.10Kbytes/sec.

19 ftp> help Commands may be abbreviated. Commands are: !deleteliteralpromptsend ?debuglsputstatus appenddirmdeletepwdtrace asciidisconnectmdir quittype bellgetmget quoteuser binaryglobmkdirrecvverbose byehashmlsremotehelp cdhelpmputrename closelcdopenrmdir ftp> cd images 250 CWD command successful. ftp> dir … ftp> get index.html index.html 200 PORT command successful. 150 ASCII data connection for index.html (196.1.65.148,1209) (211 bytes). 226 ASCII Transfer complete. ftp: 219 bytes received in 0.01Seconds 14.60Kbytes/sec. ftp> …….. ftp> get RemoteFile LocalFile …….. ftp> put Localfile RemoteFile ftp> quit 221 Goodbye

20

21 How to do it? 1. Capture the FTP packets using WireShark. 2. In the Run dialog box, type cmd and click OK 3. The Windows Command Prompt will open. Type the following command to connect to your server: ftp yourdomain.com so, the command will be like: ftp open ftp.serverintellect.com, or ftp ftp.microsoft.comftp.microsoft.com note: yourdomain.com is your domain or the FTP Server IP Address found in the HELM Control Panel under the FTP Account Details. 4. Once you hit Enter it will attempt to connect to the server. If it is successful, you will be prompted for a Username and Password. Enter the FTP username and password information to login. 5. Once you have Logged in, you should see a line like ftp> 6. To list the Directory Contents, use the command dir More FTP Commands: Check the following website for more commands and examples: http://www.cs.colostate.edu/helpdocs/ftp.html

22 Assignment 1 1. Capture the FTP packets using WireShark. 2. Connect to ftp.dell.com, you’ll be asked to enter a username and a password, use the following:ftp.dell.com Enter “anonymous” as a username and create any password. 3. Use different commands to list, display and transfer files from the remote site. Like: dir, ls, get, then answer the following questions: 1) What is the protocol does FTP uses? 2) What is the port number that is used for control and data transfer in FTP? 3) How is the interaction between the FTP client and the FTP server when you issue the ‘ls’ command? 4) How is the interaction between the FTP client and the FTP server when you issue the ‘get’ command? 5) Is there any difference between the above two? why.


Download ppt "INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets."

Similar presentations


Ads by Google