Is there a plugin or some other coding to restrict web

Is there a plugin or some other coding to restrict web users and visitors from coming to the site http://www.domain.com/restrict?
Or by IP or some other way?

I want that the site is used only by 2 or three different people and all others or locked out. I know the ip-s of devices...