Can i restrict the ip login by any setting?

I want to restrict the ip login for specific location login, could you please help me to achieve this goal?