Connecting to Metasploitable
- Shone Pious
- Aug 31, 2023
- 2 min read
Updated: Sep 29, 2023

In this blog:
This blog is one of a 4 part series on Metasploitable ➡️
Pre-text
This blog comes after the tutorial on creating a Metasploitable virtual machine and solving the kernel timer error.
Setting up a NAT Network
In our Linux machine, I checked the network interfaces on the system and I have a tunnel connection that I set up earlier for OpenVPN access.
To terminate this connection, type ➡️
sudo killall openvpn

Now to connect the metasploitable machine to the kali Linux machine we must create a NAT Network.
We want to make sure that the machine is not able to communicate with connections outside the host.
Go to file ➡️ tools ➡️ Network Manager

Go to NAT Networks and create a new one. I named mine NatNetwork10.
Change the IP address to ➡️
192.168.10.0/24
DHCP can then select IP addresses from this range.

Now go to Metasploitable and go to settings ➡️ Network and Attached to NAT Network with the name being the one we just created.
Mine was NatNetwork10. Do the same with the kali Linux machine too.


Connected
Typing
ifconfig
in Metasploitable gives us the previous IP address of ➡️
10.0.2.4
Type ➡️
sudo dhclient
This is the main method in Linux used to renew, obtain and release the client’s IP address, subnet mask and other network characteristics from the DHCP server.
The command can also be used to obtain the IP configuration information from the DHCP server.

Searching Metasploitable’s IP address in Kali Linux verifies our connection status.

What's next?
Now that your Metasploitable / Kali Linux machines are connected, you can start attacking and defending and learning along the way.
To see how to run a DOS attack against the vulnerable Metsploitable machine, check out this blog.
Comments