Question
Royal Bank of Canada
CA
Last activity: 18 Nov 2024 14:07 EST
Client machine name and ip address
Hi All ,
I am trying to fetch client's machine name and IP address in Infinity'23 . Based on support articles , active x has been deprecated from 7.3 . Please let me know if there are any other ways to get this information
Thanks in advance
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 18 Nov 2024 14:07 EST
Collabpartnerz
AU
Hi @Archana Raja,
My search in google gemini ai, returned this response.
Question: how can we find the client machine name and ip address when the application is accessed by a browser?
Response: Unfortunately, it is not possible to reliably determine the client machine name and internal IP address when the application is accessed through a browser. This is due to security and privacy concerns.
Here's why:
- Security: Allowing servers to access sensitive information like machine names and internal IP addresses could be exploited for malicious purposes. Imagine a website collecting usernames and then using the machine name to track users across different devices or networks.
- Privacy: Users have a right to privacy, and knowing their internal IP address could be used to identify their location or network configuration. This raises privacy concerns and potential misuse.
However, there are some alternative options depending on your specific needs:
Client-side:
Hi @Archana Raja,
My search in google gemini ai, returned this response.
Question: how can we find the client machine name and ip address when the application is accessed by a browser?
Response: Unfortunately, it is not possible to reliably determine the client machine name and internal IP address when the application is accessed through a browser. This is due to security and privacy concerns.
Here's why:
- Security: Allowing servers to access sensitive information like machine names and internal IP addresses could be exploited for malicious purposes. Imagine a website collecting usernames and then using the machine name to track users across different devices or networks.
- Privacy: Users have a right to privacy, and knowing their internal IP address could be used to identify their location or network configuration. This raises privacy concerns and potential misuse.
However, there are some alternative options depending on your specific needs:
Client-side:
- Public IP address: You can access the client's public IP address, which is the address seen by the internet, through JavaScript using the
window.RTCPeerConnection
API. However, this is not entirely reliable as some users might be behind proxies or VPNs. - User agent: You can access the user agent string, which provides information about the browser and operating system, but it doesn't reveal the machine name.
Server-side:
- Server logs: Server logs can capture the client's IP address, but again, this is the public IP and not the internal one.
- Authentication: If you have a user authentication system, you can track user activity by associating it with their account information. However, this requires user login and won't work for anonymous users.
It's important to remember that any solution that attempts to identify users beyond what they explicitly share should be approached cautiously and ethically, respecting privacy and security best practices.
I hope this explanation clarifies the limitations of accessing client machine information through browsers.
Would it be possible for you to share the requirement to see if that can be acheived by any other means.
Thanks
Sundeep
Collabpartnerz
AU
Hi @Archana Raja,
Pega doesnt have any option/api to get the client name or IP directly.
But, you can use below code to get the details of the client name and IP. tried couple of methods to check the details.
try {
// get system name
String SystemName = java.net.InetAddress.getLocalHost().getHostName();
String HostAddress= java.net.InetAddress.getLocalHost().getHostAddress();
oLog.infoForced( "System Name : " + SystemName);
oLog.infoForced("Host Address : "+ HostAddress);
}
catch (Exception E) {
System.err.println(E.getMessage());
}
You can check below links for more information/reference
Getting system name using Java
Regards
Sundeep
Royal Bank of Canada
CA
Hi Sundeep ,
Thanks for your response
I tried this method . But it returns only the server name and ip address of the server. I am looking for a solution to get the machine name and ip address of the device being used to access the application .
Pegasystems Inc.
CA
Hi Archana,
Can you please check pxRequestor (clipboard page) and see if that helps you to gather the necessary information?
pyUserAgent (machine name)
pxReqRemoteAddr (ip address)
pxdeviceType
Accepted Solution
Updated: 18 Nov 2024 14:07 EST
Collabpartnerz
AU
Hi @Archana Raja,
My search in google gemini ai, returned this response.
Question: how can we find the client machine name and ip address when the application is accessed by a browser?
Response: Unfortunately, it is not possible to reliably determine the client machine name and internal IP address when the application is accessed through a browser. This is due to security and privacy concerns.
Here's why:
- Security: Allowing servers to access sensitive information like machine names and internal IP addresses could be exploited for malicious purposes. Imagine a website collecting usernames and then using the machine name to track users across different devices or networks.
- Privacy: Users have a right to privacy, and knowing their internal IP address could be used to identify their location or network configuration. This raises privacy concerns and potential misuse.
However, there are some alternative options depending on your specific needs:
Client-side:
Hi @Archana Raja,
My search in google gemini ai, returned this response.
Question: how can we find the client machine name and ip address when the application is accessed by a browser?
Response: Unfortunately, it is not possible to reliably determine the client machine name and internal IP address when the application is accessed through a browser. This is due to security and privacy concerns.
Here's why:
- Security: Allowing servers to access sensitive information like machine names and internal IP addresses could be exploited for malicious purposes. Imagine a website collecting usernames and then using the machine name to track users across different devices or networks.
- Privacy: Users have a right to privacy, and knowing their internal IP address could be used to identify their location or network configuration. This raises privacy concerns and potential misuse.
However, there are some alternative options depending on your specific needs:
Client-side:
- Public IP address: You can access the client's public IP address, which is the address seen by the internet, through JavaScript using the
window.RTCPeerConnection
API. However, this is not entirely reliable as some users might be behind proxies or VPNs. - User agent: You can access the user agent string, which provides information about the browser and operating system, but it doesn't reveal the machine name.
Server-side:
- Server logs: Server logs can capture the client's IP address, but again, this is the public IP and not the internal one.
- Authentication: If you have a user authentication system, you can track user activity by associating it with their account information. However, this requires user login and won't work for anonymous users.
It's important to remember that any solution that attempts to identify users beyond what they explicitly share should be approached cautiously and ethically, respecting privacy and security best practices.
I hope this explanation clarifies the limitations of accessing client machine information through browsers.
Would it be possible for you to share the requirement to see if that can be acheived by any other means.
Thanks
Sundeep