All Collections
Running HawkScan
'Unable to access http://<host>:<port>' error when running Docker-based HawkScan
'Unable to access http://<host>:<port>' error when running Docker-based HawkScan

Troubleshooting connectivity issues between the HawkScan container and target application.

Anthony Stinn avatar
Written by Anthony Stinn
Updated over a week ago

Applies To

Scans initiated in Docker-based HawkScan implementations.


Issue

When running HawkScan against a configured host, the scan terminates with an error along the lines of:

Error: Unable to access http://localhost:3333. 
Check if the web server is listening on the specified port.

At the same time, tests connections to the destination host via telnet, nc, or wget may be succeeding, or the destination application may be running on the same Docker host that the scanner is running on.


Cause

Connectivity issue between the docker container that HawkScan is running in and the destination host.

In a Docker context, the most common cause is that the container running HawkScan is unable to reach the endpoint based on the docker networking configuration.

Other possibilities include:

  • Endpoint is not running or is not listening on the configured destination port

  • Endpoint application is not reachable from the Docker host (routing issue, destination port is blocked by a firewall, etc)


Solution

  1. Validate that the destination app is indeed listening on the configured host:port combination of the target application.

  2. Validate that the destination host:port can be reached from the Docker host from which HawkScan runs.

  3. Add --network hostto the Docker command that is being used to initiate the scan

    • the scan container will then run using the Docker host's network rather than other Docker networks (e.g., bridge or overlay networks) to reach the endpoint application


Additional Information


Similar Issue

When encountering a similar error as above, except that it references https://null instead of an IP:PORT, see 'Unable to access https://null' error when running Docker-based HawkScan.


โ€‹

Did this answer your question?