im trying to get the GSA Webfrontend to autmaticly redirect from IP.IP.IP.IP to https://IP.IP.IP.IP:9390
with an normal apache its not an problem, but with the gsa i dont understand how i should do that…
i already changed this in the gsad file in /etc/default/gsad
#
# The address the Greenbone Security Assistant daemon will listen on.
#
GSA_ADDRESS=10.80.1.194
#
# The port the Greenbone Security Assistant daemon will listen on.
#
GSA_PORT=9390
#
# Should HTTP get redirected to HTTPS
# If $GSA_REDIRECT_PORT is not set it will redirect port 80.
#
GSA_REDIRECT=1
#
# Redirect HTTP from this port to $GSA_PORT
# For this being effective $GSA_REDIRECT has to be set to 1.
#
GSA_REDIRECT_PORT=80
Please ask the maintainer of your start script/default file/systemd unit file how this is supposed to work. The mentioned file isn’t provided by Greenbone.
i installed lighttpd and addet this lines in /etc/lighttpd/lighttpd.conf
$HTTP[“scheme”] == “http” {
# capture vhost name with regex conditiona -> %0 in redirect pattern
# must be the most inner block to the redirect rule
$HTTP[“host”] =~ “." {
url.redirect = (".” => “https://%0$0”)
}
}
i dont know where i have change sth too… but i think i have to say somewhere that it should redirect the gsad… but there so much config files and i dont find a good docu…
By default gsad redirects from the http port to the https port. This can only be deactivated by not using https at all with --http-only or disabling the redirect with --no-redirect.
Please use our source, we can´t support any 3rd party packets here. And this is obviously the case here. If you wanna play with a fast and reliable GVM installation i strongly suggest to use our community edition GCE.
Please note nigher 9392 nor 9390 are well known HTTP(s) ports, so you should use 443 and 80 for https and http.
i dont know what 3rd party packets you mean, i installed all on this ubuntu server from the source in github. https://github.com/greenbone
i know that 9392 and 9390 are no https ports, but when i make gsad–listen --port 443 i get this error in the gsad.log:
gsad main:MESSAGE:2019-09-11 08h12.39 utc:10062: Starting GSAD version 8.0.1
gsad main:WARNING:2019-09-11 08h12.39 utc:10073: MHD: Failed to bind to port 443: Permission denied
gsad main:CRITICAL:2019-09-11 08h12.39 utc:10073: main: start_https_daemon failed!
gsad main:WARNING:2019-09-11 08h12.39 utc:10074: MHD: Failed to bind to port 80: Permission denied
gsad main:WARNING:2019-09-11 08h12.39 utc:10074: main: start_http_daemon redirect failed !
If you use the -r and -p flags you can choose the listening ports for gsad. E.g. gsad -p 9390 -r 9392 will listen on port 9392 for http and redirect to port 9390 which provides https.