alexelixir
Verified User
can i bind the ip's with the user account so that the particular user log in only their mentioned ip all other ip rejected even they have the valid username and password
#!/bin/sh
if ["${username}" = "USERNAME" ]; then
#repeat the following check on the IP as many times as desired.
if [ "$caller_ip" = "1.2.3.4" ]; then
exit 0;
fi
#end of ip check
echo "IP $caller_ip is not allowed to be logged in as an $username";
exit 1;
fi
exit 0;