sjh - mountain biking running linux vegan geek spice - mtb / vegan / running / linux / canberra / cycling / etc

Steven Hanley hackergotchi picture Steven




Other online diaries:

Aaron Broughton,
Andrew Pollock,
Anthony Towns,
Chris Yeoh,
Martijn van Oosterhout,
Michael Davies,
Michael Still,
Tony Breeds,


Linux Weekly News,
Girl Genius,
Planet Linux Australia,

Canberra Weather: forecast, radar.

Subscribe: rss, rss2.0, atom

Mon Tue Wed Thu Fri Sat Sun



Archive by month:

Fri, 29 Apr 2005

tcpdump into remote ethereal? - 21:32
So yesterday I was debugging a network thing and needed to run ethereal on a machine upon which I did not wish to have it installed. Thus the normal way to do this would be use "tcpdump -w somefile.tcpdump -s 1500 -i ethN not port 22" or similar and have the entire packets being dumped placed somefile.tcpdump, copy the file to a machine with ethereal installed and look at it there.

I think that is a bit of a pain in the arse to do, so I was thinking it would be neat to be able to run ethereal directly on the output coming back over a network link.

My initial thought to try this was to use netcat and output tcpdump over the wire that way. Something like "tcpdump -w - -s 1500 -i ethN not port 22 and not port 3000 | nc otherhost 3000" then on otherhost I could try typing "nc -l -p 3000 | ethereal -r -". So I tried that and ethereal balked at reading from stdin. The next one to try was a fifo, so using "mkfifo etherealdata ; nc -l -p 3000 > etherealdata" and running ethereal and telling it to open that file. However though I have not looked closely it appears ethereal probably tries to mmap files or read them all in at once or similar, thus opening a fifo just wont work.

Looking at the start capture option in ethereal there is currently no way to capture actively on anything but an ethernet device. I am thinking maybe ethereal needs a patch to be able to start and stop captures on some given file handle, ignoring the data on that filehandle at other times, and thus make it easy to capture on stdin or similar.

Of course there may be another solution to this I have not thought about yet. I notice over the last year or so I really have not done much in the way of cool or fun geeky stuff, I think maybe I should do some more fun geeky things again. Maybe this can be a gentle start back into it.

[/comp/software] link

home, email, rss, rss2.0, atom