- Lab
- A Cloud Guru
Configuring a Host Firewall on Ubuntu using UFW
In this lab, we will install and configure a firewall on an Ubuntu host using UFW. We will create the firewall rules to permit only VNC, HTTP, and SSH traffic inbound to the host and permit all outbound traffic from the host.
Path Info
Table of Contents
-
Challenge
Install UFW.
Run the commands
sudo apt-get update
andsudo apt-get install -y ufw
. -
Challenge
Configure the default rules to deny all inbound and permit all outbound.
Run the following commands:
sudo ufw default deny incoming
sudo ufw default allow outgoing
-
Challenge
Configure UFW to permit only VNC, HTTP, and SSH traffic to the Ubuntu host.
Run the following commands:
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 5900:5901/tcp
-
Challenge
Enable UFW.
Run the command
sudo ufw enable
. -
Challenge
Install the Lighttpd web server.
Run the following command:
sudo apt-get install -y lighttpd
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.