Re: tracing users ip address

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: tracing users ip address
Date: 2002-12-18 00:00:23
Message-ID: 20021218000023.GE20180@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Johnson, Shaunn wrote:
> I don't know who this is, but, I'd like to know. Is there a way
> I can track down the IP address of users trying to access
> the database? I would imagine the debug that is running - currently
> I'm running debug level 2 ... seems that any higher would
> slow my server down.

PostgreSQL listens on port 5432 by default. So at the time the perp
is connected, you can do:

netstat -an | grep ':5432.*ESTABLISHED'

and get a list of every IP address connected to your server at the
time.

This works for netstat under Linux, at the very least. I expect the
output format under other flavors of Unix is close enough for the
above to work, but you may have to adjust it if your netstat output is
too different.

This won't tell you which one is the 'Admin' connection, but it may
help you to track down the perp anyway...

--
Kevin Brown kevin(at)sysexperts(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2002-12-18 00:02:36 Re: [NOVICE] [JDBC] JDBC - Open Office
Previous Message Luke Van 2002-12-17 23:50:37 test--please disregard