openvas-docker icon indicating copy to clipboard operation
openvas-docker copied to clipboard

There is a problem with HTTP access

Open SecReXus opened this issue 4 years ago • 3 comments

When visiting the page, you will be prompted as follows: The request contained an unknown or invalid Host header. If you are trying to access GSA via its hostname or a proxy, make sure GSA is set up to allow it.

SecReXus avatar Aug 06 '20 01:08 SecReXus

Screenshot_1 Same issue! This is my docker run: docker run -d -p 443:443 -e ALLOW_HEADER_HOST=openvas.xxx.xx -e PUBLIC_HOSTNAME=openvas.xxx.xx -v $(pwd)/data:/var/lib/openvas/mgr/ -e OV_PASSWORD=xxx -e OV_SMTP_HOSTNAME=smtp.gmail.com -e OV_SMTP_PORT=587 -e [email protected] -e OV_SMTP_KEY=xxx --name openvas mikesplain/openvas

investlab avatar Aug 28 '20 04:08 investlab

Solution:

  1. Access to container's bash: docker exec -it openvas bash
  2. Open file: /etc/default/openvas-gsa (note: apt update -y && apt install vim -y) vim /etc/default/openvas-gsa
  3. Add this line: ALLOW_HEADER_HOST=PUT YOUR HOST NAME or IPADDRESS HERE
  4. Restart /etc/init.d/openvas-gsa restart
  5. Check on browser -> Ok!.

Screenshot_2

investlab avatar Aug 28 '20 06:08 investlab

@wisoez if i wanted to open to everyone, i just put 0.0.0.0 or have another wildcard for this option?

costabh avatar Dec 30 '21 12:12 costabh