Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Install GVM (OpenVAS) Vulnerability Scanner on Ubuntu 24.04 Using Containers

Vulnerability scanning is a critical task in maintaining the security of a network or system. OpenVAS, a part of the Greenbone Vulnerability Management (GVM) suite, is a widely-used open-source tool that provides comprehensive vulnerability scanning capabilities. With Docker containers, setting up OpenVAS on your system has never been easier. In this guide, we will learn how to install the GVM Vulnerability Scanner on Ubuntu 24.04, so you can start scanning vulnerabilities in your environment.

Hardware Requirements

Before we dive into the installation, let’s first look at the hardware requirements:

  • Minimal Requirements:

CPU: 2 cores

RAM: 4 GB

Disk Space: 20 GB free

  • Recommended Requirements:

CPU: 4 cores

RAM: 8 GB

Disk Space: 60 GB free

These are the specs you’ll need to run OpenVAS efficiently using Docker.

Prerequisites

Install Docker & Docker-Compose : You’ll need Docker to run OpenVAS in a container. If Docker and Docker-Compose are not yet installed on your system, follow these steps to set them up:

Install Dependencies : Make sure you have curl, ca-certificates, and gnupg installed. You can do this by running the following command:

sudo apt-get install curl ca-certificates gnupg

Step 1: Set Up Docker’s APT Repository

First, we will add Docker’s official GPG key and repository to your system. This ensures that you can install Docker from trusted sources.

Add Docker’s GPG Key:

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Add Docker’s Official Repository:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

Step 2: Install Docker and Dependencies

Now that you’ve added Docker’s official repository, you can install Docker and related dependencies using command.

sudo apt-get install gnupg docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Step 3: Verify the Docker Installation

To ensure that Docker is installed correctly, run the hello-world container to check if everything is working:

sudo docker run hello-world

This command should display a message confirming that Docker is working properly.

Step 4: Manage Docker as a Non-Root User

To avoid running Docker commands with sudo, add your user to the Docker group:

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

Now, you can verify Docker functionality without using sudo:

docker run hello-world

Step 5: Download the Greenbone Community Edition Docker Compose File

Before you can start OpenVAS, we need to download the necessary Docker Compose file.

Create a destination directory:

export DOWNLOAD_DIR=$HOME/greenbone-community-container && mkdir -p $DOWNLOAD_DIR

Download the Docker Compose file:

cd $DOWNLOAD_DIR && curl -f -L https://greenbone.github.io/docs/latest/_static/docker-compose-22.4.yml -o docker-compose.yml

Step 6: Modify the Docker Compose File for Remote Access

By default, the Greenbone Security Assistant (GSA) web interface listens only on the local machine. To allow remote access, you need to modify the Docker Compose file.

Locate the gsa section in the docker-compose.yml file:

gsa:
  image: greenbone/gsa:stable
  restart: on-failure
  ports:
    - 127.0.0.1:9392:80    # Before
  volumes:
    - gvmd_socket_vol:/run/gvmd
  depends_on:
    - gvmd

Modify the ports section to allow external access:

gsa:
  image: greenbone/gsa:stable
  restart: on-failure
  ports:
    - 9392:80     # After
  volumes:
    - gvmd_socket_vol:/run/gvmd
  depends_on:
    - gvmd

This configuration change allows GSA to be accessed from any device on the network, not just localhost.

Step 7: Start the Greenbone Community Edition Container

Now that the configuration is ready, you can start the Greenbone Community Edition container with the following command:

docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition up -d

This command will start OpenVAS in the background.

Step 8: Accessing OpenVAS

Once the container is up and running, you can access the Greenbone Security Assistant (GSA) web interface by navigating to:

http://server_ipaddress:9392

Default Login Credentials

Username: admin

Password: admin

Once logged in, you’ll be able to start using OpenVAS to scan for vulnerabilities in your environment.

Conclusion

Successfully installed OpenVAS (GVM) using Docker containers on Ubuntu 24.04. This setup ensures that OpenVAS runs in an isolated environment, preventing conflicts with your host system and making it easier to manage. Now you can take advantage of OpenVAS’s powerful vulnerability scanning capabilities to keep your systems secure.

If you encounter any challenges while following the steps to install GVM Vulnerability Scanner on Ubuntu 24.04 using containers, or if you’re looking to enhance your server’s security posture through Web Server Hardening, our team is here to help. Contact us today for expert guidance, tailored solutions, or hands-on support to ensure your environment is both secure and compliant.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Let us know your requirement.

Can't get what you are looking for?

Get Support Right Away!

Thank You

We have received your query and will get back to you soon.