@Omer Cohen ,
We have established that the load balancer might be misconfigured, since the following workflow does work: vm-in-router-vm-vnet - > router-VM -> VPN gateway -> ... -> remote service
- I am afraid I cannot agree to this
- As it's quite possible that the routerVM is not forwarding the packets to the "remote service" or not resending the packets back to the "vm-in-router-vm-vnet"
The correct way to figure this out is by collecting captures at the router-VM and see whether or not the packet is received by the router-VM, and did it forward the packets and receive a response from the "remote service" or not.
From Azure side, you are correct - Route Tables and Enabling IP forwarding on NIC is enough.
Wrt, "I suspect that the iptables configuration on the router-VM, forwarding all incoming tcp:80
traffic to remote service's private IP, might not be compatible for the load balancer."
- I don't think so
- One thing you must note here is that return traffic does not pass via the LB (Direct Server Return (DSR) )
- What this means is once the LB sent the request traffic to the router-VM, LB's job is done
- During the response traffic, router-VM should send it back to the "vm-in-router-vm-vnet" directly
So,
- If we could do a packet capture and see the "request" traffic reaching the router-VM, I would say LB's job is done.
- And if we see the "response" traffic reaching the router-VM, the flow is fine.
Hope this adds more clarity.
Cheers,
Kapil