Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 15m
Published
Clock icon Mar 18, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install UFW.

    Run the commands sudo apt-get update and sudo apt-get install -y ufw.

  2. 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
  3. 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
  4. Challenge

    Enable UFW.

    Run the command sudo ufw enable.

  5. Challenge

    Install the Lighttpd web server.

    Run the following command: sudo apt-get install -y lighttpd

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

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.

Start learning by doing today

View Plans