I want to enable SSL for PostgreSQL DB.
I have generated certificates and Key also.
By trying multiple ways, I have enabled it on default port i.e 5432.
But I want to enable SSL on new port.
Please help me with exact working solution.
I want to enable SSL for PostgreSQL DB.
I have generated certificates and Key also.
By trying multiple ways, I have enabled it on default port i.e 5432.
But I want to enable SSL on new port.
Please help me with exact working solution.
The PostgreSQL protocol uses the same port for plain-text and SSL/TLS connections.
(The upgrade is done on an existing connection using an SSLRequest
message, part of PostgreSQL communication protocol. This is very similar to the use of STARTTLS
in other protocols.)
As such, you can't really have one port listening to plain connections and another listening to SSL/TLS connections.
If you really want them on a different port, you could use a tool like pgBouncer in front of your PostgreSQL server and configure it to handle the SSL/TLS settings.