More Info:

Determines if TCP port 8020 for HDFS NameNode metadata service is open to the public.

Risk Level

Medium

Address

Security

Compliance Standards

CBP

Triage and Remediation

Remediation

To remediate the misconfiguration “Hadoop HDFS NameNode Metadata Service Port Should Not Be Open” for GCP using GCP console, please follow the below steps:

  1. Open the GCP console and navigate to the Compute Engine section.

  2. Click on the VM instances tab and select the instance where the Hadoop HDFS NameNode Metadata Service Port is open.

  3. Click on the Edit button to edit the instance settings.

  4. Scroll down to the “Firewall” section and click on the “Network tags” drop-down menu.

  5. Add a new network tag and give it a name, for example, “no-namenode-port”.

  6. Click on the “Save” button to save the changes.

  7. Navigate to the “VPC network” section and click on the “Firewall rules” tab.

  8. Click on the “Create Firewall Rule” button to create a new firewall rule.

  9. Give the firewall rule a name, for example, “no-namenode-port”.

  10. In the “Targets” section, select “Specified target tags” and enter the tag name “no-namenode-port”.

  11. In the “Source filter” section, select “IP ranges” and enter the IP address range of the network that should not have access to the Hadoop HDFS NameNode Metadata Service Port.

  12. In the “Protocols and ports” section, select “Specified protocols and ports” and enter the protocol and port number of the Hadoop HDFS NameNode Metadata Service Port (default is TCP port 8020).

  13. Click on the “Create” button to create the firewall rule.

  14. Verify that the firewall rule is applied to the instance by checking the “Firewall rules” section on the instance details page.

  15. Test the configuration by attempting to access the Hadoop HDFS NameNode Metadata Service Port from a network that is not allowed. The connection should be refused.

By following these steps, you will remediate the misconfiguration “Hadoop HDFS NameNode Metadata Service Port Should Not Be Open” for GCP using GCP console.

Additional Reading: