Skip to content
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

VulnscanServerError: Connection refused (OpenVAS) #67

Closed
Xeyk opened this issue Aug 14, 2018 · 10 comments
Closed

VulnscanServerError: Connection refused (OpenVAS) #67

Xeyk opened this issue Aug 14, 2018 · 10 comments

Comments

@Xeyk
Copy link

Xeyk commented Aug 14, 2018

Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 765, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/nf3985/archerysec/networkscanners/views.py", line 177, in openvas_scanner
scanner = openvas.connect()
File "/home/nf3985/archerysec/scanners/scanner_plugin/network_scanner/openvas_plugin.py", line 56, in connect
str(lod_ov_pass))
File "/usr/lib/python2.7/site-packages/openvas_lib/init.py", line 511, in init
raise VulnscanServerError("Error while connecting to the server: %s" % e.message)
VulnscanServerError: Error while connecting to the server: [Errno 111] Connection refused

  • OS: CentOS7

I keep getting this even though I have Archerysec installed on the same server as OpenVas. I have verified correct username and password for admin as I am able to log in with GSAD.

I have tried using 127.0.0.1, localhost, 0.0.0.0, 10.0.1.15 (internal IP of server) but have not had any luck. Have you seen anyone have this issue before?

@anandtiwarics
Copy link
Collaborator

which version of OpenVAS are you using?

@faichelbaum
Copy link
Contributor

Hi

As I'm having the same error with a server using Ubuntu 16.04 and official deb packages:

ii openvas9 7.0.3-1 amd64 remote network security auditor - metapackage
ii openvas9-cli 1.4.5-1xenial amd64 remote network security auditor - cli
ii openvas9-gsa 7.0.3-1xenial2 amd64 remote network security auditor - web interface
ii openvas9-manager 7.0.3-1 amd64 remote network security auditor - manager
ii openvas9-scanner 5.1.2-1 amd64 remote network security auditor - scanner

@faichelbaum
Copy link
Contributor

faichelbaum commented Aug 20, 2018

Ok so, OpenVAS9 (version 7.0.3) on Ubuntu only use a socket file by default.
You need to explicitly update your OpenVAS Manager (not GSA) configuration to bind the default port (9390) and only that one
i.e. on Ubuntu, it's via /etc/default/openvas-manager:

LISTEN_ADDRESS="0.0.0.0"
PORT_NUMBER=9390

@faichelbaum
Copy link
Contributor

I guess you should update the configuration to point this configuration and also, allow the Archery admin to specify the TCP port to be used for each API (OpenVAS, ZAP, ...) to avoid this confusion

@anandtiwarics
Copy link
Collaborator

Hi @faichelbaum,

Thanks for your feedback. Is it possible for you to update the README file and create a pull request?

I really appreciate your contribution to the project and I hope you would help us in the future too.

@faichelbaum
Copy link
Contributor

@Xeyk the last PR that got merge will fix your issue:

  • more explicit about the OpenVAS daemon
  • possibility to change the TCP port

@Xeyk
Copy link
Author

Xeyk commented Sep 5, 2018

Sorry about the late response, guys. I had to put this project on hold at work for a while.
@anandtiwarics - I am running openvas 9

@faichelbaum - It looks like I'm still getting the error after updating. Here is the latest message:

Scan Launched IP: 10.0.1.147 [05/Sep/2018 14:06:22] "POST /networkscanners/launch_scan/ HTTP/1.1" 200 14161 Exception in thread Thread-14: Traceback (most recent call last): File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner self.run() File "/usr/lib64/python2.7/threading.py", line 765, in run self.__target(*self.__args, **self.__kwargs) File "/home/nf3985/archerysec/networkscanners/views.py", line 178, in openvas_scanner scanner = openvas.connect() File "/home/nf3985/archerysec/scanners/scanner_plugin/network_scanner/openvas_plugin.py", line 59, in connect int(lod_ov_port)) File "/usr/lib/python2.7/site-packages/openvas_lib/__init__.py", line 511, in __init__ raise VulnscanServerError("Error while connecting to the server: %s" % e.message) VulnscanServerError: Error while connecting to the server: [Errno 111] Connection refused

Here's a pic of my openvas settings. I made new user through openvasmd called "archery" with admin rights. Openvas and Archery are running on the same server.
https://i.imgur.com/9lrOMqr.png

@faichelbaum
Copy link
Contributor

Can you share your OpenVAS manager configuration (not the GSA one)

@anandtiwarics
Copy link
Collaborator

@Xeyk Please use docker-compose. Updated docker-compose.yml file which would allow you to create a OpenVAS & ZAP scanner.

@evgeniysgs3
Copy link

Please help me. I don't know how do me:
image
I'm rewrite settings in file /etc/default/openvas-manager and openvasmd --rebuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants