-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[20.8.0] Service unavailable when verifying ospd-openvas scanner over tcp #341
Comments
Hi @wisukind, Also, in case you are using TLS1.3, the patch in PR greenbone/gvm-libs#394 can help in some cases. If you could try it and let me know if it works for you, I can consider to backport to 20.08 version. |
Hi Juan, I used the script built from gvmd 20.08, with MD5: 1762c7083fa9b1ad4b91d43ff74c3fa5 /opt/gvm/bin/gvm-manage-certs Is it up to date enough, or is there a new version ? Thanks |
If you used the one in the last stable gvmd-20.08 release, it is up to date. |
OK, so I'm good on this point. I'm currently installing gvm-libs/gvmd/ospd/ospd-openvas from the latest master branch, to see if the problem is fixed. |
Latest ospd-openvas master fails to run. I have the following error:
Any clue ? |
Hi Juan, I confirm upgrading gvm-libs to the master version fixes the problem. I kept my current gvmd / ospd / ospd-openvas 20.08 version, and upgraded only gvm-libs, recompiled, regenerated certificates and now it works. So the PR greenbone/gvm-libs#394 seems to be the fix. Any chance you could backport it to 20.08 ? I would defnitely owe you a beer ! Thanks |
Backported with PR greenbone/gvm-libs#404 to gvm-libs-20.08. This fix will be included in the next releases. |
Thanks a lot !!! |
Return an empty list in case of malformed host in the target list.
Problem: When running an ospd-openvas scanner on a TCP socket, gvmd fails to connect to it even though the certificates handshake is correct. Both GVMD and OSPD are running on the same system. Obviously same problem happens if ospd is run on a different IP. See below
Scanner is launched with the following command:
/opt/gvm/bin/ospd-scanner/bin/python3.7 /opt/gvm/bin/ospd-scanner/bin/ospd-openvas -s /opt/gvm/etc/openvas/ospd.conf --log-file /opt/gvm/var/log/gvm/ospd-scanner-remote.log -p 9392 -b 127.0.0.1 --pid-file /opt/gvm/var/run/ospd-openvas-remote.pid --lock-file-dir /opt/gvm/var/run/ -k /opt/gvm/var/lib/gvm/private/CA/serverkey.pem -c /opt/gvm/var/lib/gvm/CA/servercert.pem --ca-file /opt/gvm/var/lib/gvm/CA/cacert.pem -L DEBUG -f
On Gvmd, scanner is added using:
gvmd --create-scanner=TestRemoteScanner --scanner-type=OpenVAS --scanner-port=9392 --scanner-host=127.0.0.1 --scanner-ca-pub=/opt/gvm/var/lib/gvm/CA/cacert.pem --scanner-key-priv=/opt/gvm/var/lib/gvm/private/CA/clientkey.pem --scanner-key-pub=/opt/gvm/var/lib/gvm/CA/clientcert.pem
Scanner is created successfully. Now If I try to verify the scanner:
If I manually check the certificate handshake using:
openssl s_client -connect 127.0.0.1:9392 -cert /opt/gvm/var/lib/gvm/CA/clientcert.pem -key /opt/gvm/var/lib/gvm/private/CA/clientkey.pem -CAfile /opt/gvm/var/lib/gvm/CA/cacert.pem -reconnect -showcerts -debug
connects and sending <get_version/> manually with openssl gets answered with
<get_version_response status="200" status_text="OK"><protocol><name>OSP</nam
So the cert infrastructure created with gvm-manage-certs is correct and the initial dialog seems to work fine.
However, on GVMD side, I have the following logs:
The text was updated successfully, but these errors were encountered: