Re: Obtaining IP address or hostname of client
From: Ed Hew (eah_at_enigma.xenitec.on.ca)
Date: 06/21/05
- Next message: John DuBois: "Re: Obtaining IP address or hostname of client"
- Previous message: dpsims_at_virtualdave.com: "Re: Obtaining IP address or hostname of client"
- In reply to: dpsims_at_virtualdave.com: "Re: Obtaining IP address or hostname of client"
- Next in thread: John DuBois: "Re: Obtaining IP address or hostname of client"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 21 Jun 2005 21:20:43 GMT
In article <1119387677.595850.42680@g43g2000cwa.googlegroups.com>,
<dpsims@virtualdave.com> wrote:
>Hi and thanks to all who have responded.... To clarify:
>
> I am looking for a way to find the address of a 'telnet' client....
>and, yes, 'who -mx' must be my best friend (since I can find no other
>way fo doing this :).... The problem is that I have a number of login
>accounts that automatically execute some program when the person logs
>in.... The programs involved are written in Thoroughbred Basic... If I
>break out of a basic program I can give the 'SYSTEM' command to the
>interpreter and the result is a shell prompt.... however, I do not seem
>to be able to issue the who -mx command as the return is blank.... who
>-x works OK but lists all of the currently logged in users....
>
> I would really like to find some simple system call to obtain the IP
>address of a client or at least get an idea how to write a program to
>provide this info....
This general need annoyed me enough a few years ago to hack away
and find a solution.
who -mxu|sed '/^.* ............ /s///'|sed '/ .*$/s///'
I run this inline of a larger expression in my client user .profile
inline to set my DISPLAY environment variable - which of course breaks
down when the client is in private address space (NAT). It may however
help you, since it does report where your nameserver says you're
coming from at the publicly-addressible entry point.
It is of course by nature intended to be run within the _client_
login, _not_ on the server the client logs in to. That's easily
do-able too, but not your question as I understand it, ok?
Cheers,
--ed
-- Ed Hew <edhew@xenitec.ca> www.registry.ca Canada: XeniTec Consulting Services; CA Registry Philippines: GNUPRO Systems, Inc.; HappyWorks Internet Cafe
- Next message: John DuBois: "Re: Obtaining IP address or hostname of client"
- Previous message: dpsims_at_virtualdave.com: "Re: Obtaining IP address or hostname of client"
- In reply to: dpsims_at_virtualdave.com: "Re: Obtaining IP address or hostname of client"
- Next in thread: John DuBois: "Re: Obtaining IP address or hostname of client"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|