immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
354 stars 102 forks source link

Problems with gvmd.sh script #165

Closed wbwarnerb closed 1 year ago

wbwarnerb commented 1 year ago

I love what you've done here, making openvas a much easier install. I do have some issues though with the manager. While openvas runs on 9392 ->8080 just fine, I wanted to get 3rd party integration, which requires access to the Openvas manager that defaults to port 9390. I noticed that port wasn't listening, so I looked in this docker's container scripts folder. There is a gvmd.sh script, which tries to create the manager listening on 9390.

However, when I run it, the script threw a slew of errors. The first being that it couldn't find the path to the var-log folder. I fixed that.

After that I got more errors, like it couldn't find gvm-manage-certs, and then later on certtool not found, and libopts25 not found, etc.

I began to wonder about the script itself, as it seems it has not been successfully run. As gvmd.sh gets called each start/restart, is there an updated version that doesn't have these issues?

immauss commented 1 year ago

You shouldn't run that ... That script is actually used when the image is started in a multi-container environment.

gvmd should already be listening on 9390 in the container. If you want to use it with an external program, then you need to tell docker to expose the port. You will have to do this when you start the container. Just add this: "-p 9390:9390" to the start-up command. This forwards port 9390 on your host machine to port 9390 on the container. Now you should be able to send the connection to the IP of your host computer and they will connect to the container.

I hope this helps. If not, please let me know.

wbwarnerb commented 1 year ago

Thanks so much for the quick response. I'll try this out this weekend. :)