top of page

Connecting to Metasploitable

Updated: Sep 29, 2023


Image showing computers connecting.

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
Killing OpenVPN connections.
Killing OpenVPN connections.

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

Open network manager.
Open 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.

Creating a NAT network.
Creating a NAT network.

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.

Changing adapter to NAT Network on Metasploitable.
Changing adapter to NAT Network on Metasploitable.
Changing adapter to NAT Network on Kali Linux.
Changing adapter to NAT Network on Kali Linux.

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.

Running dhclient.
Running dhclient.

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

Connection status success.
Connection status success.

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

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • GitHub
  • Twitter
  • LinkedIn
bottom of page