Automatically exclude traffic by IP from login

I support this feature as well. it is a frustrating side effect of remote work. could this be done by blocking the email referring domain, or would that block direct traffic between web papges as well?