Unix/Linux Go Back    

HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Get ip of client, not hostname


Thread Tools Search this Thread Display Modes
Old Unix and Linux 1 Week Ago
boltpower boltpower is offline
Registered User
Join Date: Sep 2017
Last Activity: 8 September 2017, 12:29 PM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Get ip of client, not hostname

Hello i'm trying to get the ip of a telnet session.

With who -u I get the hostname of the user connecting to my server, because it checks the reverse DNS. But I only want the ip.

Versions: HP-UX HP Release B.11.31
Who command: Hewlett-Packard Company - 4 - HP-UX 11i Version 3 Feb 2007

Do you know another command? Or how block the use of the reverse DNS?

Thank you!
Sponsored Links
Old Unix and Linux 1 Week Ago
rbatte1 rbatte1 is offline Forum Staff  
Root armed
Join Date: Jun 2007
Last Activity: 15 September 2017, 11:35 AM EDT
Location: Lancashire, UK
Posts: 3,256
Thanks: 1,389
Thanked 630 Times in 569 Posts
I think that the reverse DNS is looked up at login time and recorded. You would just need to look up the DNS name to get the IP again though.

You might use one of:- dig, host, nslookup or something else, even ping might do it for you.

I hope that this helps,
Sponsored Links
Old Unix and Linux 1 Week Ago
MadeInGermany MadeInGermany is offline Forum Staff  
Join Date: May 2012
Last Activity: 20 September 2017, 1:41 PM EDT
Location: Simplicity
Posts: 3,744
Thanks: 306
Thanked 1,257 Times in 1,136 Posts
There is the HP-UX specific getip command

who -u | while read line
  ip=$(getip "${line##* }")
  echo "$line  $ip"

The Following User Says Thank You to MadeInGermany For This Useful Post:
rbatte1 (1 Week Ago)
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Hostname -f hostname: Unknown host hce UNIX for Advanced & Expert Users 0 05-12-2014 08:01 AM
HP UX - ILO Console hostname different than Machine Hostname... zixzix01 Emergency UNIX and Linux Support 4 08-25-2011 07:25 PM
What hostname is a client using? mugambo UNIX for Advanced & Expert Users 1 10-10-2007 10:13 AM
Solaris - unknown hostname - how can I change hostname? XNOR UNIX for Dummies Questions & Answers 1 03-29-2007 10:52 PM

All times are GMT -4. The time now is 02:17 PM.