mikesplain / openvas-docker

A Docker container for Openvas
MIT License
762 stars 302 forks source link

Openvas manager management protocol #106

Closed udiromano closed 7 years ago

udiromano commented 7 years ago

Hi Mike! I have openvas 8 install on another machine and after installation openvas manager is listening on port 9390 for management protocol xml commands. I installed the openvas9 container successfully and the manager is running over there but does not listen on any port. Do you happen to know why?

Best regards,

Udi.

mikesplain commented 7 years ago

Hi Udi,

Since openvas9 is running in docker you'll need to expose the port. Most people never used that so I removed it from the docs. When starting up the container, simply add -p 9390:9390 as an argument, right after the port 4000 argument. This will forward the port to the severs port allowing you to access it.

udiromano commented 7 years ago

Mike, thank you for the quick response. I know that i should export the port, the problem is that the openvasmd deamon does not listen on any port at all.... If you'll attach to the container and run netstat you will see.

udiromano commented 7 years ago

I have openvas8 installed. I compared /etc/init.d/openvas-manager in v8,v9 installation, seems like DAEMON_ARGS="" environment variable in version 9 is empty unlike in version 8.

udiromano commented 7 years ago

?

mikesplain commented 7 years ago

Ahh gotcha. I never use that so you'd have to poke around at updating daemon args properly. These packages are not built by me so I have little control of that. That said, if you figure out the right DAEMON_ARGS to expose the port, I'm happy to accept a PR or help you figure out how we can add it to the container.

udiromano commented 7 years ago

I have just added this line to the Dockerfile before the start command:

RUN sed -i 's/.DAEMON_ARGS=./DAEMON_ARGS=\"-a 0.0.0.0 -p 9390\"/' /etc/init.d/openvas-manager

ciphercodes commented 7 years ago

@udiromano, replacing the daemon args fixes the omp issue but GSA login fails with "Login failed. Waiting for OMP service".

GSA login works again if I manually start openvasmd service. I now have two instances of openvasmd running.

root@ABCD:/# ps ax | grep openvas | grep -v grep

    28 ?        Ss     0:07 openvassd: Waiting for incoming connections
   324 ?        S+     0:00 tail -F /var/log/openvas/gsad.log /var/log/openvas/openvasmd.log /var/log/openvas/openvassd.dump /var/log/openvas/openvassd.messages
  1292 ?        SL     0:00 openvasmd
  1318 ?        SL     0:00 openvasmd

I compared this with my openvas8 set-up, I only see openvasmd service running once and both omp and GSA login are working fine.

mikesplain commented 7 years ago

Fixed in https://github.com/mikesplain/openvas-docker/pull/109

Please reopen if you see any issues!