Postgres database port 5432. Is it connecting to the internet?

901 Views Asked by At

I am a newbie to connections. I ran the following command on my ubuntu server: lsof -nP -iTCP -sTCP:LISTEN and this came up, among other connections:

postgres  29826        postgres    7u  IPv6 192275      0t0  TCP [::1]:5432 (LISTEN)
postgres  29826        postgres    8u  IPv4 192276      0t0  TCP 127.0.0.1:5432 (LISTEN)

I am configuring my "ufw" firewall and trying to understand what is connecting to my server. Question is the following: Is this connecting in some way to the internet? I am assuming it is not, since the IP address is local. Another question, is there a command to check only incoming and outcoming connections to the internet? Somewhat simplified so I can understand it better?

Thank you very much

1

There are 1 best solutions below

0
On

You are right, that server is only listening on the loopback interface.

You'll have to change the listen_addresses parameter and restart PostgreSQL.