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.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Install UFW.
Run the commands
sudo apt-get update
andsudo apt-get install -y ufw
.- 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
- 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
- Enable UFW.
Run the command
sudo ufw enable
.- Install the Lighttpd web server.
Run the following command:
sudo apt-get install -y lighttpd