• We did not send an email asking for donations - please read this post.

How to disable postgresql port for out-server connection?

mxcdh

New Member
Joined
Apr 14, 2022
Messages
1
Reaction score
0
Credits
14
I installed on my dedicated server ubuntu 20.04, docker, and container with postgressql. I have problem beacouse I want that ubuntu blocked all connection with postgressql, out-server from domain, ip server etc, which added to server.

At the moment I can connect with PostgreSQL:

via ssh
via server ip. ip.ip.ip:5432/...
via all domain which added to nginx like domain1.com:5432 etc.
I want disabled connection via server ip and all domain which added to nginx
 


jizzy

New Member
Joined
Jan 28, 2021
Messages
3
Reaction score
0
Credits
28
The easiest way is to make PostgreSQL listen only on localhost. The relevant parameter is set listen_addresses to localhost in postgresql.conf
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top