Implementing Policy-based Routing on a Unifi USG
Configuring the Ubiquiti USG for policy based routing can be done through the config.gateway.json functionality or through the command line.
Refer to Ubiquiti support document 215458888 for details on how to translate command line configuratio to a persistant config.gateway.json file that will survive between provisions to the USG.
Unfortunately, Ubiquiti has basically given up on enhancing their USG line based on Vyatta, so we’re going to have to do this ourselves.