Installing OpenVAS

Categories: Scripts

A short script to install OpenVAS on Ubuntu 18.04 LTS.

apt install openvas openvas-cli openvas-manager openvas-manager-common openvas-nasl openvas-scanner greenbone-security-assistant greenbone-security-assistant-common libopenvas-dev libopenvas-doc libopenvas9 -y
openvas-setup
openvasmd –-user=admin –-new-password=$ADMINPASSWORD
openvasmd --create-user=$YOURUSER
openvasmd --user=$YOURUSER --new-password=$YOURPASSWORD
sed -i 's/^ExecStart=\/usr\/sbin\/gsad --foreground --listen=0.0.0.0 --port=9392 --mlisten=127.0.0.1 --mport=9390/ExecStart=\/usr\/sbin\/gsad --foreground --listen='$IPADDRESS' --port=9392 --mlisten='$vpnip' --mport=9390 --allow-header-host $IPADDRESS/' /lib/systemd/system/greenbone-security-assistant.service

systemctl daemon-reload
service greenbone-security-assistant restart
systemctl enable greenbone-security-assistant.service
systemctl enable openvas-scanner.service
systemctl enable openvas-manager.service
»