I have 3 Azure webapps that need to be able to connect with each other.
One running the FE website - that needs to be accessed from the outside.
The other two i just running services that the FE site uses. There is no need for these to be open for public access and I would therefore like to restrict this.
What is the best way to restrict public acces to the two webapps, but still allow public acces to the FE site?
To have the web app restricted to public access you should either deploy it in Azure vlan that has no public access and has a firewall between public and private Azure or just restrict the access on web server level. The latter doesn't prevent you from Internet attacks while firewall does.
As the simplest solution you can restrict your web app on web server level wither by IP or by authentication.
Restrict access by IP
A possible option is to restrict access to your application by IP addresses. The IP addresses can be added as a allowed IP address within the web.config of your application. All other IP addresses will get a 403 Forbidden response from Azure.
Restrict access for specific Users
Another option is to restrict access by enabling Authentication on the web application. This can be done for several Authentication Providers like: Azure Active Directory, Google, Facebook, Twitter and Microsoft. The below steps will help you with the configuration of Azure Active Directory as a authentication provider.