8.3 Configure Web Server

9.1 Create Client virtual machine

8.4 Configure Firewall for Web service

• Make sure that the "Firewall" virtual machine is running (see 4.2 Startup Firewall virtual machine)

Now you could log in directly in the virtual machine as user root, but connecting through SSH from your host PC, makes it possible to copy and paste text into the console window

• Open "Command Prompt" on your host computer

Write what is highlighted in red

Instead of writing "teddy", then write the username you have created on the master virtual machine:

C:\Users\teddy>ssh teddy@

teddy@'s password:write your user's password here

Last login: Wed Jan 1 13:05:00 2020 from

[teddy@firewall ~]$ su

Password:write the root password here

Edit the firewall bash file:

[root@firewall teddy]# cd /var/firewall

[root@firewall firewall]# vim

Add these lines to the end of the document:

# Open ports for the mail services in the dmz zone

firewall-cmd -–zone=dmz -–add-service=http

firewall-cmd -–zone=dmz --add-service=https

# Forward web traffic from the external zone to the Web server

firewall-cmd --zone=external --add-forward-port=port=80:proto=tcp:toport=80:toaddr=

firewall-cmd --zone=external --add-forward-port=port=443:proto=tcp:toport=443:toaddr=

# Forward SSH traffic from the external zone to the Web server using a dedicated port

firewall-cmd --zone=external --add-forward-port=port=22005:proto=tcp:toport=22:toaddr=

Save the document and quit vim

Shutdown the system, and exit "Command Prompt":

[root@firewall firewall]# shutdown -h now

Connection to closed by remote host.

Connection to closed.


Return to the "Firewall" virtual machine

Click "X" to close the virtual machine