vaibhav
vaibhav

Reputation: 784

How to know the IP address of the page visitor using Javascripts without using any external site/responder

I am developing a application in which I need to know the IP address of the person who hit the submit button of form (Javascript, jQuery etc are allowed) .

I have tried a lot of scripts that use the external hosts to do this but I can't use the same as there is masking of IP address used in the org.

This application is internal and hence I want a method to know the IP address in LAN as the request going out of the org gateway returns the gateway IP.

Kindly provide the support.

Upvotes: 0

Views: 79

Answers (1)

osteenbergen
osteenbergen

Reputation: 66

You can't access local network information via the browser.

A user could have multiple network cards each having multiple IP addresses. The browser only knows if the user is online via navigator.onLine.

The only way to get the IP address of the user is to use a server within your organizations network. And depending on the network layout (LAN/WiFi) it could still be a problem.

Upvotes: 1

Related Questions