Web Server Internal IP Address/Internal Network Name Disclosure Vulnerability

My server is hosted in aws elastic beanstalk.

Amazon Linux (Amazon Linux AMI release 2017.09 Kernel \r on an \m) with apache webserver ( Apache/2.4.27 (Amazon)

I got below vulnerability from McAfee PCI scan.

**Some Web servers contain a vulnerability giving remote attackers the ability to attain your internal IP address or internal network name. An attacker connected to a host on your network using HTTPS (typically on port 443) could craft a specially formed GET request from the Web server resulting in a 3XX Object Moved error message containing the internal IP address or internal network name of the Web server. A target host using HTTP may also be vulnerable to this issue.

QID Detection Logic:

The remote check for the web server internal IP address sends a HTTP GET request to the target web server. The QID is flagged if a “Content-location:” header or a 3xx redirect address in an HTTP response contains an RFC1918 IP address. PCI DSS 3.2 requirement 1.3.7 “do not disclose private IP addresses and routing information to unauthorized parties”. This is an “automatic failure” per ASV Program Guide 6.3.3, #4 (page 32). ** FIX:- I searched internet and found that the fix for this issue is to provide Fully Qualified Domain name for config value “ServerName” in apache config found at /etc/httpd/conf/httpd.conf

I made necessary changes. Also changed the /etc/host file with proper host name.

Still issue is not resolve. Kindly help me to solve this issue…

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


In case you are using Plesk, you can follow the steps here:

  • Create the file /etc/sw-cp-server/conf.d/
touch /etc/sw-cp-server/conf.d/
  • Edit the file and add the following content:
server_name_in_redirect on;
  • Finally restart the sw-cp-server service:
service sw-cp-server restart


I believe that to fix this you can just define your server name in your Nginx or Apache Vhost to match your domain name.