The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
Google UNIX.COM


IP Networking Questions involving TCP/IP, Routers, Hubs, Network protocols, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ask Linux.com: Unix basics, old school network sniffing, and router madness iBot UNIX and Linux RSS News 0 06-05-2008 11:20 AM
Pcap.h Sniffing papabearcares Shell Programming and Scripting 0 04-16-2008 09:22 PM
Pcap.h Sniffing papabearcares High Level Programming 0 04-16-2008 09:21 PM
disabled telnet now need port 23 or port 22 panzerkw SUN Solaris 3 03-05-2007 12:08 PM
C Prog to close a socket in established state teledelux High Level Programming 1 10-03-2001 08:42 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-08-2005
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,609
Sniffing an established port

Hi All,

On a solaris box A port B
in which port B is established and receiving data.

My question is how do i listen on that established port ,
how can i get the data received at box A: port B through my application

I had searched the forum for the same, but i am unable to retrieve the required stuff

Any help would be greatly appreciated.

Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 06-09-2005
andryk's Avatar
Registered User
 

Join Date: Sep 2003
Posts: 448
I dont know if it is of any help but u could use a packet capture library libpcap (tcpdump.org) to ease coding ...
Reply With Quote
  #3  
Old 06-09-2005
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
http://ngrep.sourceforge.net/ - ngrep may be the tool you want....

Cheers
ZB
Reply With Quote
  #4  
Old 06-10-2005
Registered User
 

Join Date: Jun 2005
Posts: 3
I guess the setup is like this:

There's a client running on a solaris box, and is receiving data.

Please note that servers specify ports they send the data on. Client don't necessarily specify the port they want to listen to the server data on.

So you may or may not know the port on which this client is receiving data.

You may want to use a portscanner like ngrep or a packet capture utility like tcpdump or ethereal to know the port on which this client is receiving data.

Although you can "see" the data using your packet capture tools, to write your own application to read that data isn't that straightforward. This however might be necessary if you want to do some special processing on the data (decrypt it, for example).

In that case, you can
1. See if you can open a socket to the actual source from which the solaris box A is receiving data.
2. See if you can write a small server program that allows you to write a client to get this data. The server program would get data from this A:B client.

Kapil Sharma
Reply With Quote
  #5  
Old 06-10-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 629
see "man snoop" --- look for "port" option and check example line ...
Reply With Quote
  #6  
Old 06-16-2005
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,609
hi all

thanks for the reply

i cannot establish a connection to box A by any means

i have data being received at port B of A. that's it.

if i am able to establish a connection to box A and that would become easy for me and i am not authorised to do so.

Regarding ethereal i believe i need to have root permission and i dont have root permission also

let me try other options and let u know how i proceed

thanks once again for ur help
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0