In this lab, you’ll learn to set up, configure, and secure routers and firewalls, essential components for managing and protecting network traffic. You’ll explore firewall configuration, including creating and applying rules to control access, assigning network interfaces to zones, and optimizing traffic policies for three different firewalls, UFW, iptables, and Firewalld. Additionally, you’ll configure routers to enable communication between multiple networks, set up NAT for internet access, and implement security measures to block malicious traffic and prevent network attacks.
You will be working with:
Since your machines do not currently have internet access, you will need to configure the network as follows:
Lab-5-router
Machine:
ens18
interface):
172.18.x.6/16
172.18.0.1
172.18.0.1
External
ens19
interface):
192.168.x.1/16
192.168.x.3
Internal
Note the addition of Zone
for the router machine. These will place the interfaces into preset zones within firewalld.
Lab-5-website
Machine:
192.168.x.2/16
192.168.x.1
192.168.x.3
172.18.0.1
Lab-5-dns
Machine:
192.168.x.3/16
192.168.x.1
172.18.0.1
8.8.8.8
You can hover over each specific arrow, and a tooltip will appear with a hint on what is wrong or not working.
blueteam
abc123
Lab-5-router
machine.Make sure the VM Scoring
Arrow is green before continuing past this point.
Lab-5-router
machine set it up as a router. When it is properly configured the internal machines should be able to access the internet.CentOS 7 Router Setup Guide
in Lecture 8 - Routers Resources & Readings
to help you with the setup.Lab-5-router
Machinefirewalld
firewalld
servicefirewalld
service. Enter the line firewalld:<command>
into the file /home/blueteam/P2/P2.txt
.Lab-5-website
Machineufw
serviceufw
service. Enter the line ufw:<command>
into the file /home/blueteam/P2/P2.txt
on the router.Note: The dashboard will mark your VMs as not scoring until the ssh
rules have been added in P3.
deny
incoming and allow
outgoing for all machines and applicable zonesICMP
in on the WAN
address of Lab-5-router
WAN
interfaceallow
for the LAN
address of Lab-5-router
SSH
traffic over TCP
IN
on Lab-5-website
HTTP
traffic over TCP
IN
on Lab-5-website
HTTPS
traffic over TCP
IN
on Lab-5-website
Lab-5-router
Machinefirewalld
. Enter the line firewalld:<command>
into the file /home/blueteam/P4/P4.txt
.Lab-5-website
Machineufw
. Enter the line ufw:<command>
into the file /home/blueteam/P4/P4.txt
on the router.Lab-5-dns
Machineiptables
. Enter the line iptables:<command>
into the file /home/blueteam/P4/P4.txt
on the router.By default, some firewalls may not log traffic.
UFW has 5 options for log levels
Firewalld also has 5 options:
Lab-5-website
machine enable logging for all blocked packets and some allowed connections.Locate the UFW
traffic logs on the machine. Enter the line ufw-filepath:<Full Absolute Filepath>
into the file /home/blueteam/P5/P5.txt
on the router.
Lab-5-router
machine enable logging for all denied packets.firewalld
traffic logs on the machine. Enter the line firewalld-filepath:<Full Absolute Filepath>
into the file /home/blueteam/P5/P5.txt
.To complete P5
P1-P4
must have a green arrow before starting.
Implement your rules on the Lab-5-website
machine. Consider the order the rules will need to be in to be effective. You may have to alter or remove existing rules.
192.168.0.0/16
network that has the destination ports for SSH
, HTTP
, and HTTPS
traffic.TCP
then UDP
should not be allowed and vice versa.192.168.0.15
for HTTP
and HTTPS
traffic172.18.0.16
for HTTP
and HTTPS
traffic192.168.99.0/24
for SSH
traffic172.18.0.0/16
network that has the destination ports for, HTTP
, and HTTPS
traffic.Lab-5-router
and Lab-5-website
. Identify the IP of the scoring engine. Enter the line scoring:<IP>
into the file /home/blueteam/M2/M2.txt
on the router.Implement your rules on theLab-5-router
machine. Consider the order the rules will need to be in to be effective.
80
and 443
from the Lab-5-router
to Lab-5-website
53
from the Lab-5-router
to Lab-5-dns
Lab-5-dns
machine. Install iptables
and configure it.deny
incoming and allow
outgoing for the Lab-5-dns
machine.SSH
traffic over TCP
IN
from anywhere on Lab-5-dns
DNS
traffic over UDP
IN
from anywhere on Lab-5-dns
You don’t need to submit anything for this lab. All of the above criteria will be auto-graded unless stated otherwise. Once you have finished the lab you will have to do a verbal pass off with a TA.
You will be asked two of these questions at random during your verbal pass-off.
firewalld
, and how you assigned a network interface to a specific zone.permanent
and temporary
rule in firewalld
.firewalld
, ufw
and iptables
?