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
*************************************

Comments

Popular posts from this blog

Navigating the College Application Labyrinth: A Parent's Journal from Junior Year

Empowering Sales Excellence: Gen AI-Driven Sales Call Planning

ATG Repository Exception | ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE