LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-15-2004, 10:34 PM   #1
wswartz
Member
 
Registered: Nov 2003
Posts: 56

Rep: Reputation: 15
How to monitor tftp & telnet


I have a machine acting as a tftp and telnet server. I'd like a way to monitor (in real time if possible) connections made to the two services. For example, when a tftp transfer is occurring, I'd like some visual indication that the transfer is taking place (showing the bytes transmitted would be great). As for telnet, seeing when a connection is made and terminated would be fine. Any ideas?

Please, no lectures on the insecurity of these two services. The box is behind a firewall and even if some internal malicious mad hacker decided to go postal on my server, I don't care. I'll make more!

BS
 
Old 07-15-2004, 10:57 PM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
A simple command would be

tcpdump port 23 or port 69
 
Old 07-16-2004, 02:31 PM   #3
wswartz
Member
 
Registered: Nov 2003
Posts: 56

Original Poster
Rep: Reputation: 15
Sure, I guess that's one way to do it. I was looking for something a bit more user friendly.

Thanks,
BS
 
Old 07-20-2004, 10:47 AM   #4
markraem
Member
 
Registered: Nov 2003
Posts: 82

Rep: Reputation: 15
Not exactly what you want, but if you have nothing else, you can try this :

create a script, called :listen.bin
%cat listen.bin
netstat -an | grep ESTABLISHED | grep :23
netstat -an | grep ESTABLISHED | grep :69
%

This script will tell you whether or not a telnet or tftp session is CURRENTLY present.

now, in crontab create an entry that calls this script every minute (or 10 secs, ...), If this script generates output, then write a time stamp to a logfile.

I agree that this method will not give you the number of transferred bytes. you will only have the timestamps when a telnet / tftp session was active.

for the number of transfered bytes i indeed think you need to play with the ouput of tcpdump.

Hope it helps you a little bit.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MIB to monitor login or telnet, etc Xtiane_ze Linux - Security 1 09-22-2003 01:57 PM
TFTP & Syslog ...Skackware 9.0 <install> Mr Haole Linux - Newbie 0 09-19-2003 02:14 PM
TFTP-Problem: TFTP timed out Bikerpete Linux - General 2 08-14-2003 05:25 AM
Telnet & FTP dvong3 Solaris / OpenSolaris 2 07-09-2003 05:44 PM
WU-Ftp & Telnet TheVicar Linux - Software 2 07-12-2002 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration