How to extract the IP address of a data packet and store it in the database?

5 pts.
Tags:
IP address
Java development
Network monitoring
Network security
packet analysis
Packet analyzers
Packet filtering
A client sends a data packet to the server machine, then how can the server extract the IP address of the data packet .Can you suggest a source code for this above query in JAVA? After extracting the IP address how can the IP address be stored in the database, where other IP addresses of other data packets, extracted in a similar way, be stored.What can be the suitable JAVA source code for this above query?
ASKED: January 25, 2009  5:25 AM
UPDATED: January 26, 2009  3:17 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

is the server window, linux sun?

If it’s a SUN server just use snoop. Type snoop at the command prompt and it will show you the packets as they pass through the server. Use grep to narrow things down a bit.

If it’s a linux box use tcpdump at the command prompt

If it’s a windows server use wireshark – install <a href=”http://www.wireshark.org/”>wireshark </a>and run it.. you’ll see all connection hitting the server. In the options of the packet capture set it to promiscuous mode

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following