Question

add line to host all all 0.0.0.0/0 md5

Im having trouble connecting to the postgresql server via npgsql on .net maui. I added the crt certificate but i connect from windows and cant connect from android. I read that adding this line to the server pg_hba file last line can help


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.

The error is “Exception while performing SSL handshake”

innerExeption “Exception of type ‘Interop+AndroidCrypto+SslException’ was thrown.”

Windows has no problem but the same connection string doesnt work in android.

I downloaded the crt ssl certificate thats available in the connection page of the control panel of the website and im trying to use that but its not working :(

Bobby Iliev
Site Moderator
Site Moderator badge
May 11, 2023

Hi there,

What is the exact error that you get when you try to connect? If you’ve locked down your database cluster using the trusted sources, you would need to make sure that your IP address is actually added there in order to be able to connect.

The line you’re referring to in the pg_hba.conf file is used to define client authentication rules for PostgreSQL. You don’t need to worry about it if you are using a managed cluster as this is already pre-configured for you and you don’t have access to change it.

As a reference the line host all all 0.0.0.0/0 md5 means:

  • host: The connection type, which is a TCP/IP connection in this case.
  • all: The database(s) this rule applies to. In this case, it applies to all databases.
  • all: The user(s) this rule applies to. In this case, it applies to all users.
  • 0.0.0.0/0: The IP address(es) this rule applies to. In this case, it applies to all IP addresses.
  • md5: The authentication method to use. In this case, it’s MD5 password encryption.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel