Port Scans and Firewalls (NETLAB)

Start your Kali32 Machine

Open the Kali32 virtual machine. Log in as root with the password toor

Finding the IP Address of Your Kali32 Machine

In a Terminal window, execute this command:
ifconfig
Make a note of your IP address. It should be 172.16.1.203

Start your Kali64 Machine

Open the Kali64 virtual machine. Log in as root with the password toor

Scanning from the Kali64 Machine

In your Kali64 machine, in a Terminal window, execute this command:
nmap 172.16.1.203
When the scan completes, you should see a list of open ports including "80/tcp", as shown below.

Turning on a Firewall

By default, Kali doesn't filter any packets with a firewall, because it's an attack distribution; not intended for defense.

Kali includes the iptables firewall, which is very powerful, but difficult to use.

However, for this project, we'll use "ufw" -- the Uncomplicated Firewall.

In your Kali32 machine, in a Terminal window, execute these commands:

ufw enable

ufw status verbose

As shown below, this firewall allows all outgoing connections, but blocks all incoming connections.

This makes your Kali32 machine a client, but never a server, which is the same thing the Windows firewall does by default on public networks.

Scanning from the Kali64 Machine

In your Kali64 machine, in a Terminal window, execute this command:
nmap 172.16.1.203
The scan is much slower now. When the scan completes, you see "All 1000 scanned ports ... are filtered", as shown below.

Sources

How to Install and Configure UFW – An Un-complicated FireWall in Debian/Ubuntu


Revised for NETLAB 6-16-16