Re: Can't connect from computer on network.

From: "Mehlape, Makgati" <MMehlape1(at)fnb(dot)co(dot)za>
To: <nalini(at)nic(dot)in>
Cc: "Dan King" <danking12(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Can't connect from computer on network.
Date: 2008-02-19 10:30:09
Message-ID: 6A4EAA8FBBA19B4D840721B7A2419D4F44D179D3@fnbcolmx01.fnb.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Nalini, your quiet correct that, listen_addresses = * , implies that
your server must listen on all network interfaces. Dan does not have an
issue with his server listening on all network interfaces. His issue is
to restrict the client machines that connect to his server.

Now, he is trying to achieve the above by changing the listen_address
configuration parameter and I am saying he must leave it as it is (*)
and then modify his pg_hba.conf file (as stated in the previous e-mail).

In case he wants to specify that his server must listen on a specific ip
address (say - 201.111.223.222)

Then he must set listen_address = 201.111.223.222 in the postgresql
configuration file.

Dan, Do not forget to restart you server after performing any of the
above tasks

________________________________

From: nalini(at)nic(dot)in [mailto:nalini(at)nic(dot)in]
Sent: Tuesday, February 19, 2008 11:57 AM
To: Mehlape, Makgati
Cc: Dan King; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Can't connect from computer on network.

* in postgresql.conf actually denotes the network interfaces on the
machine on which the postgresql server is running.

If you wish to limit access to certain IPs do it in pg_hba.conf.

----- Original Message -----
From: "Mehlape, Makgati" <MMehlape1(at)fnb(dot)co(dot)za>
Date: Tuesday, February 19, 2008 3:12 pm
Subject: Re: [ADMIN] Can't connect from computer on network.
To: Dan King <danking12(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org

>

>
>
>
>
>
>
>
>
>
>
>
>

>
>

>
>

Hi.

>
>

>
>

I think setting Listen_address to *, does
> not necessary allows all connections but allows your PostgreSQL server
to
> support TCP/IP connections. So, leave it as it is.

>
>

>
>

In order to apply control over what
> machine IP addresses should connect remotely to your server; specify
the IP
> addresses in the pg_hba.conf file.

>
>

>
>

e.g

>
>

>
>

# TYPE DATABASE USER
> CIDR-ADDRESS METHOD

>
>

>
>

Host <DBname> DKing
> 192.168.2.102 <Specifies user Authentication>

>
>

>
>

Make sure you restart your PostgreSQL
> serve after performing the above.

>
>

>
>

Hope this helps.

>
>

>
>

Makgati.

>
>

>
>

>
>

>
>

________________________________

>
>

>
>

From:
> pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Dan King
>
> Sent: Tuesday, February 19, 2008
> 11:27 AM
>
> To: pgsql-admin(at)postgresql(dot)org
>
> Subject: [ADMIN] Can't connect
> from computer on network.

>
>

>
>

>
>

Hi list,
>
>
>
> I am using postgresql 8.2 on Ubuntu Gutsy. I am attempting to connect
to my
> database on one computer from another computer on my network. I can
connect to
> the database if I have:
>
>
>
> listen_addresses = '*'
>
>
>
> in my postgresql.conf file. But I can't connect if I have:
>
>
>
> listen_addresses = 'localhost, 192.168.2.102'
>
>
>
> in my postgresql.conf file. The computer that is assigned
192.168.2.102 is the computer I am attempting
> to connect from that works with the * but not with an assigned IP
address. I
> understand that having a * allows all connections but I am attempting
to
> restrict this so only a certain computer can access the database.
>
>
>
> Does anyone know why I can't connect to the database from another
computer when
> specifying the IP address in 'listen_addresses' and how to fix my
problem?
>
>
>
> Thanks a lot for the help.
>
>
>
> Dan <http://192.168.2.102> <http://192.168.2.102>

>
> <http://192.168.2.102>

>
>
>
> <http://192.168.2.102>

To read FirstRand
> Bank's Disclaimer for this email click on the following address or
copy into
> your Internet browser:
> https://www.fnb.co.za/disclaimer.html
>

<http://192.168.2.102>

> <http://192.168.2.102>

If you are unable to
> access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer(at)fnb(dot)co(dot)za
> and we will send you a copy of the Disclaimer. <http://192.168.2.102>

> <http://192.168.2.102>

>
>
>
>

Nalini S. Nautiyal
System Software Division
NIC HQ
New Delhi
Ph 24360324,24305121,24305131

<http://192.168.2.102>

To read FirstRand Bank's Disclaimer for this email click on the following address or copy into your Internet browser:
https://www.fnb.co.za/disclaimer.html

If you are unable to access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer(at)fnb(dot)co(dot)za and we will send you a copy of the Disclaimer.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message libra dba 2008-02-19 14:23:20 Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?
Previous Message Suresh Gupta VG 2008-02-19 10:17:15 Log details are displaying on the console