Hello @Lilly ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you've setup 'Routing and Remote Access' in an Azure VM and added an inbound rule for Routing and Remote Access (L2TP-In). You also opened the required ports on Azure and Windows firewall, but you still cannot connect your machine to the L2TP server in the Azure VM.
Is the RRAS (Routing and Remote Access Service) not supported to use in Azure VM?
Yes. RRAS is NOT supported in the Microsoft Azure Virtual Machine environment.
If you are trying to configure a Point-to-site connection in Azure, then the recommended way is to use an Azure VPN gateway and configure a VPN connection over SSTP (Secure Socket Tunneling Protocol) or IKEv2.
Refer: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-about
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.