I have developed a website. Now i would like to monitor the IP address of machines who are accessing the server.
The simplest possible solution to this that comes first into my mind is to use jsp inbuilt tags.
out.print( request.getRemoteAddr() );
out.print( request.getRemoteHost() );
but it has given me some other IP address(May be a proxy server's ip address)
So i was left with one choice is to run netstat on host server .
Here is what i have done.
netstat -an | grep 8080 (As tomcat runs on port 8080).
Should i modify the command or there is any other way around to monitor the IP address?