Making a Linux HTTPS Server (NETLAB)

Use your Kali64 Machine

Open the Kali64 virtual machine. Log in as root with the password toor

Configuring Apache for SSL

In a Terminal window, execute these commands.

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>
<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:

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

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:


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.

Proceed to the HTTPS-DoS Project

This machine is now a good target for that attack.
Last modified: 9-24-15
Modified for NETLAB 6-16-16