Project 17: Making a Linux HTTPS Server (10 pts.)

What You Need

A Kali 2 Linux machine, real or virtual.

Troubleshooting

If you have Kali 1, use these instructions.

Starting the Linux Machine

Start your machine as usual. Open a Terminal window.

In a Terminal window, enter this command, and then press Enter:

ping samsclass.info

Make sure you are getting replies. If you are not, you need to correct your networking problems before proceeding.

Configuring Apache for SSL

In a Terminal window, enter these commands, pressing Enter after each one.

These commands enable the SSL module, activate the default SSL configuration, including a self-signed SSL certificate, and open the SSL configuration file for editing.

a2enmod ssl

ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf

nano /etc/apache2/sites-available/default-ssl.conf

In nano, change
<VirtualHost _Default_:443>
to
<VirtualHost *:443>
as shown below.

Save the file with Ctrl+X, Y, Enter.

Making a Demonstration Web Page

In a Terminal window, execute these commands:

echo > /var/www/html/index.html

nano /var/www/html/index.html

In the text editor, enter this code, replacing "YOUR NAME" with your own name:

<html>
<body>
<h1>Test Page on My HTTPS Server</h1>
<h2>by YOUR NAME</h2>
</body>
</html>

Your file should look like the image below:

Press Ctrl+X, Y, Enter to save the file.

Restarting Apache

In a Terminal window, enter this command, and then press Enter:

service apache2 restart

Viewing the Secure Web Page

At the top left of the Kali Linux desktop, click the round blue icon to open IceWeasel.

In IceWeasel, enter this URL, and then press Enter:

https://localhost

A warning page appears, saying "This Connection is Untrusted". That's happening because your SSL certificate is self-signed, rather than purchased from a real Certificate Authority like Verisign.

Click "I Understand the Risks".

Click the "Add Exception" button.

Click the "Confirm Security Exception" button.

Your secure web page opens, as shown below:

Press Ctrl+X, Y, Enter to save the file.

Saving the Screen Image

Make sure the URL begins with https:, and that the page has your name on it, as shown above.

Save a screen capture with a filename of "Proj 17 from YOUR NAME".

Turning In Your Project

Email the image to cnit.120@gmail.com with a subject of "Project 17 from YOUR NAME".


Sources

http://www.tc.umn.edu/~brams006/selfsign.html

https://wiki.debian.org/Self-Signed_Certificate

Last modified: 9-29-15 12:48 pm