Disclaimer: I don't have in-depth knowledge of networking, so please pardon me if my question doesn't make sense at some places.
I wish to make my Pi a web server on the internet and restrict access to it. The server part is completed and it can be used on the internet (although I haven't started the service or connected the Pi to the internet). However, I am unable to figure out a major security aspect of it all - how to allow only selected IP addresses to connect to it?
The server is meant to be used only by family and friends, so the number of allowable IP addresses is not many. Is there a way I can say to the Pi "hey, allow only these IPs. Ignore every other connection"?
I've checked out UFW but I'm not sure if that is the right option for my case. I always have physical access to the Pi, so I plan to block/disable SSH port completely and allow only 8080 (http) as my server (ngrok based) uses that.
Please advice on what I can do.