-
check settings > network of both machines, check if both of them are nat
-
cd /etc/network
( navigating to the /etc/network ) -
cat interfaces
on metasploitable ( to show the content of interfaces ) -
copy what's in metasploitabe interfaces to kali machine /etc/network "interfaces" example:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.254.12
netmask 255.255.255.0
network 192.168.254.0
keep network and netmask the same but change the last octet in the address
-
comment the line
source /etc/network/interface.d/*
by adding a # before it. like this#source /etc/network/interface.d/*
-
restart both machines > login > type
/etc/init.d/networking restart
(on both machines)
sources: https://gist.github.com/dutchand/ddb9de7bd49f9fecb38a403716dc9187
machines:
metasploitable - username,password: msfadmin:msfadmin