Here is some code...
Place in LoginNotification/When Login Notification is received...
This code adds a row to the AccessLog Business Object which holds an attribute for IPAddress.
If LoggedInCandidate.ID IS DEFINED Then
CREATE AccessLog WITH AccessLog.Candidate=LoggedInCandidate,AccessLog.UserName=LoggedInCandidate.FullName,AccessLog.LogInDateTime=CURRENT_TIMESTAMP,AccessLog.IPAddress=LoginNotification.RemoteAddress,AccessLog.LoginID=LoginNotification.LoginName,AccessLog.Organization=LoggedInCandidate.Organization
There is a similar Logout Notification in which you can place your rules.