Hello sna!
To redirect the traffic from an Azure Subnet to a security compliance VM (firewall), you would need to have an Azure Route Table attached to that subnet. Then, in the route table, you would need to add (a) route(s) type VirtualAppliance to the IP of your security compliance VM (firewall). If you want to send all the traffic to the security compliance VM (firewall), you can use 0.0.0.0/0.
For example, below, where 10.224.1.2 we can assume is the IP address of the security compliance VM (firewall)
More details can be found here.
Before doing the above, make sure that the security compliance VM (firewall) is accessible from the subnet (for example it is in the same VNET or in a peered VNET).
I hope this is helpful.
Please "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics.
Thank you!