Firewall Basic Understanding [Linux Firewall]

Prerequisites:

  1. Kali Linux access, either through a virtual machine or through a friend.
  2. Fresh Metasploitable Virtual Machine

Objectives:
The main purpose of this week’s exercise is to learn how to utilize basic firewall commands.

Resources:
https://www.howtogeek.com/177621/the-beginners-guide-to-iptables-the-linux-firewall/
https://www.garron.me/en/linux/iptables-manual.html

Call for Help:
Do your best to try the tasks below, if you’re confused, or need help, feel free to email or text me at any
point and I will gladly try to help you. If you’re having an Issue, chances are, other people are as well,
and I can update the instructions/comments/add content as necessary.

Tasks:

Setup

  1. You’ll need both Kali and Metasploitable Running simultaneously. You can do this by running a
    virtual machine, or by pairing with a friend and running metasploitable over the network (be
    careful here).
  2. Make sure you follow the instructions from lecture, and ensure the networks are setup
    accordingly with your layout.

Firewalls:

  1. Basic IP Tables Operation
    a. Perform an NMAP scan of your metasploitable virtual machine from your Kali Virtual
    Machine.
    Provide a screenshot.

b. List the current firewall rules associated with your metasploitable virtual machine.
Provide a screenshot.

c. Produce a command to block any single IP address.
Provide the command or a screenshot.

d. Produce a command to block a range of IP Addresses.
Provide the command or a screenshot.

e. Produce a command to block an incoming connection to SSH via a single port block.
Provide the command or a screenshot.

f. Produce a command to block all incoming traffic, but allow SSH
Provide the command, and a screenshot that proves you can still allow SSH

g. Delete all rules and return to the default state.
Provide the command and a screenshot showing the current ruleset.

Open chat
Hello 👋.
Tell me, how can I help you?