Can Drupal site logout user when he change IP Address? Can Drupal site logout user when he change IP Address or ask user to confirm password again?

I need to implement follow requirements:


Log source IP address changes during application sessions. 
Notify the user of potentially suspicious activity. 
When IP address changed, ask user to confirm password again.
I'm not aware of any contrib module providing all these features out-of-the-box.

If you are on Drupal 7, you might want to give the IP Address Manager module a try, which provides user-based IP address logging and can be extended programmatically with your own module.

For Drupal 8 you may have to create it from the scratch. Which shouldn't be too hard, if you have appropriate knowledge of Drupal 8 programming.

Btw., I also strongly suggest adding another feature to your requirements: Save the previous IP into the active session (cookie) and check, whether the user just switched the IP during the session (e.g. by means of VPNs), but is still using the same device/browser. - I always find it quite annoying and a bad user experience getting captchas/password dialogs when trying to access sites securely with switching IP addresses. (Which I need to when working from within China. ;)