InformationThe Apache 'Listen' directive specifies the IP addresses and port numbers the Apache web server will listen on for requests. Rather than be unrestricted to listen on all IP addresses available to the system, the specific IP address or addresses intended should be explicitly specified. Specifically, a 'Listen' directive with no IP address specified or with an IP address of all zeroes should not be used.
Having multiple interfaces on web servers is fairly common, and without explicit 'Listen' directives, the web server is likely to be listening on an IP address or interface that was not intended for the web server. Single-homed systems with a single IP address are also required to have an explicit IP address in the 'Listen' directive, in case additional interfaces are added to the system at a later date.
SolutionPerform the following to implement the recommended state:
1. Find any 'Listen' directives in the Apache configuration file with no IP address specified or with an IP address of all zeroes similar to the examples below. Keep in mind there may be both IPv4 and IPv6 addresses on the system.
2. Modify the 'Listen' directives in the Apache configuration file to have explicit IP addresses according to the intended usage. Multiple 'Listen' directives may be specified for each IP address and port.