Determine IP address connect to IDS
Answered: amber (solid confidence) — Kern Doe's 'select hostname, username, pid, sid from syssessions' directly answers how to see the connecting host; Kern's initial claim that pid=-1 means a local session is corrected by Frank (it actually indicates a Java session), which Kern accepts. Never explicitly confirmed by the original asker.
Advisory only.
Posted in 2013
User asked how to determine client IP addresses connecting to Informix for audit purposes, since onstat -u only shows usernames. Responses suggested: querying syssessions table (select hostname, username, pid, sid from syssessions); using sysdbopen/sysdbclose procedures to log connection info; or using ping with the hostname from onstat output to find IP addresses. No single definitive resolution emerged.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Security, Permissions & Auditing
hi,
For audit security purpose, can informix determine ip address client/pc that
connect to informix database?
When use "onstat -u" we can only see username. maybe have another command to
check ip address that connect.
tq
I would look at using sysdbopen/sysdbclose procedure to save this
information to a table. You can look at
http://www.jfmiii.com/informix/?p=122
for an example.
John F. Miller III
STSM, Lead Architect
miller3@us.ibm.com
503-747-1336
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 02/22/2013 01:41:17 AM:
> From: "MOHD FADZIL JUSOH" <fadzil@isianpadu.com>
> To: ids@iiug.org,
> Date: 02/22/2013 01:42 AM
> Subject: Determine IP address connect to IDS [29566]
> Sent by: ids-bounces@iiug.org
>
> hi,
>
> For audit security purpose, can informix determine ip address client/pc
that
> connect to informix database?
>
> When use "onstat -u" we can only see username. maybe have another command
to
> check ip address that connect.
>
> tq
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Is it what you're looking for?
select hostname, username, pid, sid
from syssessions
* if your query returns value pid="-1" meaning the user session is local to
the host.
________________________________
From: John Miller iii <miller3@us.ibm.com>
To: ids@iiug.org
Sent: Friday, February 22, 2013 11:01 AM
Subject: Re: Determine IP address connect to IDS [29575]
I would look at using sysdbopen/sysdbclose procedure to save this
information to a table. You can look at
http://www.jfmiii.com/informix/?p=122
for an example.
John F. Miller III
STSM, Lead Architect
miller3@us.ibm.com
503-747-1336
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 02/22/2013 01:41:17 AM:
> From: "MOHD FADZIL JUSOH" <fadzil@isianpadu.com>
> To: ids@iiug.org,
> Date: 02/22/2013 01:42 AM
> Subject: Determine IP address connect to IDS [29566]
> Sent by: ids-bounces@iiug.org
>
> hi,
>
> For audit security purpose, can informix determine ip address client/pc
that
> connect to informix database?
>
> When use "onstat -u" we can only see username. maybe have another command
to
> check ip address that connect.
>
> tq
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
If you have access to /etc/ping:
From onstat -u:
c0000000ba069f68 Y--P--- 448444 kilaali DAY19901 c0000000b0075398 0 2 0 0
porsche:Prod:/home/dev/gentrym>/etc/ping -o DAY19901
PING DAY19901.staples.com: 64 byte packets
64 bytes from 10.31.85.165: icmp_seq=0. time=34. ms
64 bytes from 10.31.85.165: icmp_seq=1. time=0. ms
----DAY19901.staples.com PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/17/34
2 packets sent via:
10.31.85.165 - day19901.staples.com
10.31.85.24 - porsche.staples.com
So indirectly you may be able to see the IP of "DAY19901"
Kern,
pid = -1, normally means the seesion is a Java job session, not
necessarily a local job.
Frank
On Fri, Feb 22, 2013 at 12:17 PM, Kern Doe <kern_doe@yahoo.com> wrote:
> Is it what you're looking for?
>
> select hostname, username, pid, sid
> from syssessions>
> * if your query returns value pid="-1" meaning the user session is local to
> the host.
>
> ________________________________
> From: John Miller iii <miller3@us.ibm.com>
> To: ids@iiug.org
> Sent: Friday, February 22, 2013 11:01 AM
> Subject: Re: Determine IP address connect to IDS [29575]
>
> I would look at using sysdbopen/sysdbclose procedure to save this
> information to a table. You can look at
> http://www.jfmiii.com/informix/?p=122
> for an example.
>
> John F. Miller III
> STSM, Lead Architect
> miller3@us.ibm.com
> 503-747-1336
> IBM Informix Dynamic Server (IDS)
>
> ids-bounces@iiug.org wrote on 02/22/2013 01:41:17 AM:
>
> > From: "MOHD FADZIL JUSOH" <fadzil@isianpadu.com>
> > To: ids@iiug.org,
> > Date: 02/22/2013 01:42 AM
> > Subject: Determine IP address connect to IDS [29566]
> > Sent by: ids-bounces@iiug.org
> >
> > hi,
> >
> > For audit security purpose, can informix determine ip address client/pc
> that
> > connect to informix database?
> >
> > When use "onstat -u" we can only see username. maybe have another command
> to
> > check ip address that connect.
> >
> > tq
> >
> >
> >
>
>
>
>
*******************************************************************************
>
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5b472cb786604d654d150
That's true Frank, thank for your correction -- I meant to say the other way
around. If it's local then we should be able to see the process ID, my bad.
Thank you.
________________________________
From: FRANK <yunyaoqu@gmail.com>
To: ids@iiug.org
Sent: Friday, February 22, 2013 1:01 PM
Subject: Re: Determine IP address connect to IDS [29578]
Kern,
pid = -1, normally means the seesion is a Java job session, not
necessarily a local job.
Frank
On Fri, Feb 22, 2013 at 12:17 PM, Kern Doe <kern_doe@yahoo.com> wrote:
> Is it what you're looking for?
>
> select hostname, username, pid, sid
> from syssessions>
> * if your query returns value pid="-1" meaning the user session is local to
> the host.
>
> ________________________________
> From: John Miller iii <miller3@us.ibm.com>
> To: ids@iiug.org
> Sent: Friday, February 22, 2013 11:01 AM
> Subject: Re: Determine IP address connect to IDS [29575]
>
> I would look at using sysdbopen/sysdbclose procedure to save this
> information to a table. You can look at
> http://www.jfmiii.com/informix/?p=122
> for an example.
>
> John F. Miller III
> STSM, Lead Architect
> miller3@us.ibm.com
> 503-747-1336
> IBM Informix Dynamic Server (IDS)
>
> ids-bounces@iiug.org wrote on 02/22/2013 01:41:17 AM:
>
> > From: "MOHD FADZIL JUSOH" <fadzil@isianpadu.com>
> > To: ids@iiug.org,
> > Date: 02/22/2013 01:42 AM
> > Subject: Determine IP address connect to IDS [29566]
> > Sent by: ids-bounces@iiug.org
> >
> > hi,
> >
> > For audit security purpose, can informix determine ip address client/pc
> that
> > connect to informix database?
> >
> > When use "onstat -u" we can only see username. maybe have another command
> to
> > check ip address that connect.
> >
> > tq
> >
> >
> >
>
>
>
>
*******************************************************************************
>
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5b472cb786604d654d150
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.