- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Security

Performing Initial Firewall Configuration
In this lab, you will need to perform a few simple firewall configurations. These configurations include replacing all ports with services, adding the eth0 interface to the default zone, creating a firewalld service for flaskapp.py, changing the port of SSH service from 22 to 61613, and reloading firewalld to apply all the rules. By the end of the lab, it is important to not have any port definitions within the firewall configuration and to ensure that everything is defined with a service. The benefit of these services is that they have a name and a description by which you or anybody can know what the port is used for. Otherwise, you may find yourself in a situation where there are many opened ports and not know what the purpose of each port is. In order to be able to replace all ports with service, you first need to create a firewalld service for flaskapp.py. After that, you will need to change the port of SSH service from port 22 to port 61613. Finally, after all changes are made, you need to reload to apply all the rules.

Lab Info
Table of Contents
-
Challenge
Create a Firewalld Service for flaskapp: port 65535, Protocol tcp
Note: Please provide the lab an extra 1-2 minutes before logging in to make sure the lab is fully provisioned. A local SSH terminal must be used for this lab (This lab cannot use the Instant Terminal). You will find the necessary login credentials on the lab page.
-
Open and create the
flaskapp.xml
file. -
Populate the file with a definition of the flaskapp service, port, and protocol.
-
Save and close the
flaskapp.xml
file. -
Add the flaskapp service.
-
Reload firewalld.
-
-
Challenge
Edit SSH Firewalld Service and Reconfigure it for Port 61613
-
Open the
ssh.xml
file. -
Populate the
ssh.xml
file with a description, and change the port from 22 to 61613. -
Save and close the
ssh.xml
file. -
Add SSH service.
-
Reload firewalld.
-
-
Challenge
Add eth0 Interface to the Default Zone
-
Add the eth0 interface to the public zone.
-
Reload firewalld.
-
-
Challenge
Remove All Ports from Firewalld, Add http Firewalld Service, and Reload Firewalld
-
Remove port 80/protocol tcp.
-
Remove port 61613/protocol tcp.
-
Remove port 65535/protocol tcp.
-
Add http firewalld service.
-
Reload firewalld.
-
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.