Problems setting up a docker pentesting-lab

Hello everyone,

I’m not sure, if this is the right category, but I need help configuring my local lab with docker.

I pulled and ran both, the kalilinux/kali-rolling and the tleemcjr/metasploitable2 repo. I also created a new virtual docker network to give them IP-addresses and keep them both separate from the outside world.

Yet if I want to to do a simple port scan with nmap (from the kali, of the metasploitable-machine) all I get “All 1000 scanned ports are closed”, which is clearly wrong as the metasploitable-machine should be as open as it can be. This also occours, if I keep away my custom network settings.

My guess is that some network configuration of the docker container is wrong, but I can’t figure out which one.

Does anyone has a good tutorial or experience with his own virtual lab? Or an idea, what could be wrong?

Thank you guys in advance for your reply.

I found the solution:

You need to start the services with the bash when you start the image. As explained in Docker Hub Page auf the image.

docker run --name container-name -it tleemcjr/metasploitable2:latest sh -c "/bin/ && bash"

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.