OpenVAS 在 CentOS7 Redis 没有开始

我正在努力制作 OpenVAS 按照以下文章工作。

https://www.atlantic.net/commu ... tos-7
但是,当我跑步时它不起作用 openvas-check-setup, 我在下面遇到这个错误,当我检查时 /var/log/redis/redis.log, 他说:“打开插座 Unix: bind: Permission denied»

openvas-check-setup 2.3.7   Test completeness and readiness of OpenVAS-8   (add '--v6' or '--v7' or '--v9'    if you want to check for another OpenVAS version)

Please report us any non-detected problems and help us to improve this check routine: [url=http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss]http://lists.wald.intevation.o ... scuss[/url]

Send us the log-file (/tmp/openvas-check-setup.log) to help analyze the problem.

Use the parameter --server to skip checks for client tools like GSD and OpenVAS-CLI.

Step 1: Checking OpenVAS Scanner ...
OK: OpenVAS Scanner is present in version 5.0.7.
OK: OpenVAS Scanner CA Certificate is present as /var/lib/openvas/CA/cacert.pem.
OK: redis-server is present in version v=3.0.7.
OK: scanner (kb_location setting) is configured properly using the redis-server socket: /tmp/redis.sock
ERROR: redis-server is not running or not listening on socket: /tmp/redis.sock
FIX: You should start the redis-server or configure it to listen on socket: /tmp/redis.sock

ERROR: Your OpenVAS-8 installation is not yet complete!
已邀请:

江南孤鹜

赞同来自:

恭喜,你在网上教程中找到了一个糟糕的在线教程。 看来这本教科书的作者从未测试过他以确保他工作,因为它不像它一样。 更糟糕的是,似乎本指南实际上有一个来自官方网站的联系。 OpenVAS, 什么会误导和扰乱很多人。

所以,原因 redis 不开始,在于 SELinux 禁止redis服务器写入

/tmp

. 您可以在您的审计杂志中看到它:

type=AVC msg=audit(1482284806.464:112): avc:  denied  { write } for  pid=1275 comm="redis-server" name="tmp" dev="dm-0" ino=33574981 scontext=system_u:system_r:redis_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir
type=SYSCALL msg=audit(1482284806.464:112): arch=c000003e syscall=49 success=no exit=-13 a0=5 a1=7ffe55938670 a2=6e a3=7ffe55938614 items=0 ppid=1 pid=1275 auid=4294967295 uid=997 gid=995 euid=997 suid=997 fsuid=997 egid=995 sgid=995 fsgid=995 tty=(none) ses=4294967295 comm="redis-server" exe="/usr/bin/redis-server" subj=system_u:system_r:redis_t:s0 key=(null)

比较可能

/tmp

, 套接字文件必须在

/run/redis

, 例如:

unixsocket /run/redis/redis.sock

这允许它在施加的局限内工作 SELinux.

编辑时

/etc/redis.conf

, 不要忘记检查文件的底部以进行可用性。

第二


unixsocket

指令补充说

openvas-setup

并将其删除为额外的。

当然,通常在具有支持的系统中 SELinux redis 必须配置为收听本地主机上的TCP端口,而不是使用套接字,因为可以禁止其他恶魔联系 redis 通过插座,但只有通过 TCP. 事实上,这不是一个问题,因为 OpenVAS (直到) 没有限制 SELinux, 但也不支持与之沟通 redis 穿过 TCP. 结果是这个安装 Redis 不能一起使用或重新使用本地副本以外的任何其他服务 OpenVAS.

但在这节课中有一些错误!

其次,无处 OpenVAS 未配置为实际使用 redis. 它依赖于默认编译,正如我们所看到的,那样错误地。 要解决它,需要
https://fossies.org/linux/open ... g.txt


/etc/openvas/openvassd.conf

, 从未提及的领导层是什么:

kb_location = /run/redis/redis.sock



第三

事实是他使用第三方呼叫 atomic, 它提供与普通存储库中的软件包冲突的软件包,例如 EPEL, 已经提供了 redis 和 OpenVAS! 莫名其妙 atomic 制作它,以及为什么在本指南中开始使用 atomic. 使用冲突包的存储库可能是危险的。 如果你继续使用原子包,你必须绝对确定这一点 (虚拟的) 机器永远不会用于

任何事物

否则,出于任何原因。

最后,一旦设置它,Web界面实际上会变得不可用,因为指定的端口在防火墙中未打开。 你还必须自己这样做。

firewall-cmd --add-port=9392/tcp    # though this opens it to the world
firewall-cmd --runtime-to-permanent

一旦你完成,

openvas-check-setup

我必须说,以及其他事情 ...

        OK: scanner (kb_location setting) is configured properly using the redis-server socket: /run/redis/redis.sock
OK: redis-server is running and listening on socket: /run/redis/redis.sock.
OK: redis-server configuration is OK and redis-server is running.

讽刺是他也会说:

        ERROR: SELinux is enabled. For a working OpenVAS installation you need to disable it.
FIX: Please disable SELinux.

什么似乎完全不必要和不必要,因为 OpenVAS 无论如何都没有工作有限 SELinux.

涵秋

赞同来自:

我遇到了同样的问题。 问题是 Kali Linux OpenVas 默认情况下没有文件: /etc/openvas/openvassd.conf.

因此,我创建了此文件并输入了下面的内容以覆盖默认值 Redis Server. kb_location = / var / run / redis / redis.sock

这消除了我的问题。 我在本网站上写了一个完整的指南:
https://waqasahmedkhan.com/ope ... -3-5/

要回复问题请先登录注册