Operating System - HP-UX
1833871 Members
1805 Online
110063 Solutions
New Discussion

How to log IP address of telnet or ftp session manually?

 
SOLVED
Go to solution
Abdullah Al-Ashry
Occasional Contributor

How to log IP address of telnet or ftp session manually?

Hi..

We know that the IP address is logged into syslog.log when a telnet of ftp(using -l option) seesion is established.

Does anybody have a script to log the IP address of telnet of ftp session?(i.e. when a user is logged on a script will be executed and log its IP address)

3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to log IP address of telnet or ftp session manually?

Hi:

You might consider capturing this information from the user $HOME/.profile process at login. Redirect the output of "who -mR" into a log file of your choice.

...JRF...
Abdullah Al-Ashry
Occasional Contributor

Re: How to log IP address of telnet or ftp session manually?

Thanks!

This will work with telnet session.
But, what is about the ftp session.

Regards;
L Gehl
Occasional Advisor

Re: How to log IP address of telnet or ftp session manually?

Check out the -l flag for ftpd. It will log each ftp session in the system log. Then it's only a matter of

grep ftpd /var/adm/syslog/syslog.log

L