We kindly request your assistance in developing a script that can detect the public IP address of a client computer as soon as it connects to the internet. This script should then compare the detected public IP address with a pre-defined one, and if they differ on two consecutive checks, it should send an alert email to our designated email address. The primary objective here is to have the client computer notify us when it accesses the internet from a network other than the designated one.
It seems that the script needs to periodically check the IP address at short intervals, such as every 2 minutes, for the duration of the internet connection. If the public IP address is different from the predefined one twice in a row, we would like the script to send an alert email.
Your valuable assistance in this matter is highly appreciated.
This script is related to comparing the device’s public IP address with a specified IP address and triggering a notification if the IP addresses differ.
As for the other script request, “Disconnect Internet on IP Address Mismatch,” it pertains to disconnecting the internet connection if the IP address deviates from the expected one.
In the first scenario, the script monitors the IP address, and when a certain condition is met, it triggers a notification.
The second scenario is concerned with disconnecting the internet connection if the IP addresses are different.