Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how does a server gets the IP address of a client

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody, I have a requirement.
how does the server gets the IP address or modem address or the processor number of the client. which method in java is used to get the client's IP address.

my requirement is that, if more than 3 requests come from one client to the serevr, then the sever must not provide any services for that particular client for some time. I want to get rid of denial of service attack. how to do this.

my system configurations:

operating system: windows xp.
java: 1.4
serevr: websphere application server
tool: eclipse
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do it this way inside a JSP/Servlet:



If you are talking of preventing DOS - Denial of Service Attack, there is a good write-up here:
http://qnatech.wordpress.com/2008/11/25/how-to-prevent-dos-denial-of-service-attack/


 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much sir. i will definitely try it.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DOS is a pretty significant topic. I'd suggest two things:

1. Look online for DOS attack solutions that have proven to work. You might save alot of time by leveraging code and techniques by some of the industry experts.

2. If you do invent a great DOS solution, patent it outside of your company and make millions for yourself.

Good luck!

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic