Critical

Ensure there is no unrestricted inbound access to TCP port 5432 (PostgreSQL)

Security & Compliance
Description

TCP port 5432 is the default port used by PostgreSQL, an open source relational database management system. It is used for client-server communication and allows clients to connect to the PostgreSQL server.Ensuring that there is no unrestricted inbound access to TCP port 5432 is important to prevent unauthorized access or attacks on the database server. If unrestricted inbound access is allowed, attackers could potentially exploit any vulnerabilities in the PostgreSQL server and gain access to sensitive data stored in the database.‍

Remediation

To remediate the issue of unrestricted inbound access to TCP port 5432 for PostgreSQL, you can take the following steps:

  1. Limit access to the port: Ensure that the port is only accessible by authorized users and services. This can be done by configuring firewall rules or network security groups to allow traffic only from trusted sources.
  2. Use encryption: Configure SSL/TLS encryption to secure the traffic over the network. This ensures that any data transferred between clients and the server is encrypted and cannot be intercepted by unauthorized parties.
  3. Use strong authentication: Ensure that only authenticated users and services can access the database. Use strong passwords and enforce policies that require password changes regularly.
  4. Disable unnecessary services: Disable any unnecessary services and applications that use the PostgreSQL database. This reduces the attack surface and limits the potential for security breaches.
  5. Regularly patch and update: Ensure that the PostgreSQL database is regularly patched and updated to address any known vulnerabilities or security issues.
  6. Monitor network activity: Monitor network traffic to detect any unauthorized access attempts or suspicious activity. Implement intrusion detection and prevention systems to alert you of any security incidents.
Enforced Resources
Note: Remediation steps provided by Lightlytics are meant to be suggestions and guidelines only. It is crucial to thoroughly verify and test any remediation steps before applying them to production environments. Each organization's infrastructure and security needs may differ, and blindly applying suggested remediation steps without proper testing could potentially cause unforeseen issues or vulnerabilities. Therefore, it is strongly recommended that you validate and customize any remediation steps to meet your organization's specific requirements and ensure that they align with your security policies and best practices.