"the same location" is a problem. Many people use a laptop or a tablet or iPod or smartphone with WiFi or 3G to browse the net. And their IP-address is dependent on where they are. I don't even mention Internet cafe's and such where you can use the internet on their machines after a paying a fee, or using a PC at work, school or with friends or family.
So that's an assumption that only would be valid in a homework environment. Assuming it dates from before the days of laptops and tablets and iPod and smartphones and 3G and 4G, even then an IP-address wouldn't have been useful, because back in the days of dial-up connections, all dial-up connections had a dynamic IP-address. They gave you another address every time you dialled in. And even then there was work and school and friends and family where that 'certain group of users' could want to get access.
So any other way to handle this would be better than a way using the IP-address.
I'll be up front, this is a question for homework help. I'm not asking for an answer (that'd be cheating), more like direction to where I can find an answer (or if I'm on the right track with my hunch).
I want to create a website but only allow a certain user or group of users access to that website. Assuming that user or users will be from the same location, and likely the same static IP, can I throw a firewall between my internet connection and web server and only allow that specific IP address access to my web server by a rule?
If there is a better way to handle that, I'd appreciate being pointed in the right direction. Thanks!