'pf: nat force packet out specific interface

I have a VM which is attached to the feth2 interface (L2 interface), en0 is my wifi card with internet access

I currently have the following pf rule in place:

nat on en0 from feth2:network to any -> en0

Which works well when our default route is to the upstream router, pinging from the VM actually gets the ping back.

When I add a route on the macos host to somewhere else which doesn't have internet (lets say 1.2.3.4), the nat follows that default route, and routes natted packets to 1.2.3.4, is there any way to force pfctl to route natted packets through en0 ?

I tried the following with no success:

nat on en0 from feth2:network to any tag "aaa" -> en0
[...]
pass out quick route-to en0 tagged "aaa"


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source