Not sure why you want all the traffic from your local PC to go through the VPN gateway. Perhaps, you just want to restrict to access Azure resources via the VPN gateway, if so, that is the VPN gateway itself that can do it. You just need to access azure resources with the VPN client's private IP address with a VPN connection.
Essentially, a VPN gateway sends encrypted traffic between your virtual network and your on-premises location across a public connection. By default, the outbound traffic from your local PC goes through to the Internet with a default route via the local network gateway. Before you can connect to the VPN gateway, you need to ensure that there is networking connectivity from the local PC to the Azure VPN gateway public IP address.
Update
Unfortunately, Azure P2S VPN by default uses split tunneling. it's not supported to route all the traffic from your PC to go through the VPN gateway. See this and you could vote up this feedback.
Here is a suggestion from the Azure feedback team.
- Use default route or forced tunneling on P2S client rather than split tunneling.
- Enable Azure VPN gateway as a forward proxy to the Internet.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…