Is this possible on any modern day phone or tablet? Selfhosting as made me very privacy-consciouss and am concerned about my iphone.
Yes. Firewalls.
With an iPhone, however, you are screwed. Apple won’t let you do what you are looking for.
deleted by creator
The answer is mTLS.
But you will run into the key distribution problem. But if your number of devices is manageable, it could be the solution
Could you expand a little please? I read this https://www.cloudflare.com/learning/access-management/what-is-mutual-tls/
It seems this is mainly for reaching the server securely not blocking others, right?
You create a (self-signed) CA certificate, put its certificate as the client ca in your web server.
Then you can create certificates using this CA that you distribute to your devices, only devices that have a certificate signed by your CA are allowed to connect.
deleted by creator