IP Address Fetching for the Client Machine
We had a legal requirement to fetch the IP address of the client machine sending the SMS from the website. There are multiple approaches and I was using the following methods to fetch the IP. We have public IP exposed to internet which is fetched by getip.com. The goal was to fetch this and also router IP. We had some challenges to get this information. I have written a simple JSP to test the IP address fetch from the server. There are some checks we need to ensure for this to work. If you have a Load Balancer than it should have the rules set to passthrough the client IP if not you would only get LB IP Address instead. Code Snippet - IPAddress.jsp ************************************* <br /><%@ page import="java.net.InetAddress" %><br /><HTML><br /><HEAD><br /><Title Fetch The Client IP><br /></HEAD><br /><BODY><br /><form method="post" action="" name="myform">&