My solution on the GitHub page above uses two static routes, one to 8.8.8.8 via the primary WAN gateway and a second is a blackhole route. Works fine. This troubleshooting was in response to the comment stating I could ping via an interface.
I can confirm that setting up the VRF with interfaces=none
/ip vrf
add interfaces=none name=testwan
and a route via the new route table testwan:
/ip route
add disabled=no distance=1 dst-address=8.8.8.8/32 gateway=10.31.0.2 routing-table=testwan suppress-hw-offload=no
you have to ping something via the main route table before the ping succeeds on the new VRF. Seems like a pretty major bug to me:
/[xxxx@RB5009] > ping 8.8.8.8 vrf=testwan
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
sent=3 received=0 packet-loss=100%
[xxxx@RB5009] > ping 8.8.8.8
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 58 123ms540us
1 8.8.8.8 56 58 123ms512us
2 8.8.8.8 56 58 123ms500us
sent=3 received=3 packet-loss=0% min-rtt=123ms500us avg-rtt=123ms517us max-rtt=123ms540us
[xxxx@RB5009] > ping 8.8.8.8 vrf=testwan
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 46 222ms540us
1 8.8.8.8 56 46 198ms653us
2 8.8.8.8 56 46 136ms761us
sent=3 received=3 packet-loss=0% min-rtt=136ms761us avg-rtt=185ms984us max-rtt=222ms540us