Thread: Detecting postgres servers

Detecting postgres servers

From
Murray Cumming
Date:
Is there any way, without a username and password, to
1. Detect whether a Postgres server is running on a certain host on a
certain port.
2. Detect whether a Postgres server is running on a certain host.
3. Detect whether a Postgres server is running somewhere on the local
network, via some bonjour/rendezvous/avahi/howl-type thing?

-- 
Murray Cumming
murrayc@murrayc.com
www.murrayc.com
www.openismus.com




Re: Detecting postgres servers

From
Murray Cumming
Date:
On Sat, 2005-11-19 at 18:34 +0100, Murray Cumming wrote:
> Is there any way, without a username and password, to
> 1. Detect whether a Postgres server is running on a certain host on a
> certain port.
> 2. Detect whether a Postgres server is running on a certain host.
> 3. Detect whether a Postgres server is running somewhere on the local
> network, via some bonjour/rendezvous/avahi/howl-type thing?

Does anybody have any ideas about this?

Is a patch to add discovery via avahi likely to be accepted?

-- 
Murray Cumming
murrayc@murrayc.com
www.murrayc.com
www.openismus.com



Re: Detecting postgres servers

From
Jaime Casanova
Date:
On 1/10/06, Murray Cumming <murrayc@murrayc.com> wrote:
> On Sat, 2005-11-19 at 18:34 +0100, Murray Cumming wrote:
> > Is there any way, without a username and password, to
> > 1. Detect whether a Postgres server is running on a certain host on a
> > certain port.
> > 2. Detect whether a Postgres server is running on a certain host.
> > 3. Detect whether a Postgres server is running somewhere on the local
> > network, via some bonjour/rendezvous/avahi/howl-type thing?
>
> Does anybody have any ideas about this?
>
> Is a patch to add discovery via avahi likely to be accepted?
>
> --
> Murray Cumming
> murrayc@murrayc.com
> www.murrayc.com
> www.openismus.com
>
>


imagine you can port scan, and try to connect on every open port
starting with default one for postgres (5432)...

but this sounds like an attack to me...

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)


Re: Detecting postgres servers

From
Tom Lane
Date:
Murray Cumming <murrayc@murrayc.com> writes:
> On Sat, 2005-11-19 at 18:34 +0100, Murray Cumming wrote:
>> Is there any way, without a username and password, to
>> 1. Detect whether a Postgres server is running on a certain host on a
>> certain port.
>> 2. Detect whether a Postgres server is running on a certain host.
>> 3. Detect whether a Postgres server is running somewhere on the local
>> network, via some bonjour/rendezvous/avahi/howl-type thing?

We have bonjour code, but it's written to Apple's API and hence only
works on Darwin.  There was some talk recently of revising that code
to be more portable ... dunno if anyone is actually working on it,
but check the archives.
        regards, tom lane