check service on ipv6 if it is not found on ipv4

This commit is contained in:
KiekerJan 2021-05-28 23:36:25 +02:00
parent a52eb6bfb9
commit 28b828be12
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ def check_service(i, service, env):
# IPv4 failed. Try the private IP to see if the service is running but not accessible (except DNS because a different service runs on the private IP).
elif service["port"] != 53 and try_connect("127.0.0.1"):
output.print_error("%s is running but is not publicly accessible at %s:%d." % (service['name'], env['PUBLIC_IP'], service['port']))
elif try_connect(env["PUBLIC_IPV6"]):
output.print_warning("%s is only running on ipv6 (port %d)." % (service['name'], service['port']))
else:
output.print_error("%s is not running (port %d)." % (service['name'], service['port']))