Connecting Metasploitable to Kali Linux

 

Image showing two computers connecting.

In this blog:

  • Pre-text.
  • Setting up NAT Network.
  • Connected.
  • What's next?
This blog is one of a 4 part series in Metasploitable.

Click here to see how to run a DOS attack on Metasploitable.

Click here to see how to deface Metasploitable's webpage.


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.


Image showing network connection being killed.
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

Image showing VirtualBox.
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 so DHCP can select IP addresses from this range. 


Image showing VirtualBox.
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.


Image showing VirtualBox.
Changing adapter to NAT Network on Metasploitable.

Image showing VirtualBox.
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.


Image showing Metasploitable screen.
Running dhclient.

Searching metasploitable’s ip address in Kali Linux verifies our connection status. 


Image showing Metasploitable webpage.
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.

Too see how to run a DOS attack against the vulnerable Metsploitable machine, check out this blog.


Comments

Popular posts from this blog

Fixing kernel timer error in Metasploitable

Setting up Metasploitable lab