Best way to emulate unifi's zone based firewall

I do like the way that ubiquiti implmements zone based firewall and wonder if there’s a way to emulate this in the SSH/CLI? I attached how mine looks in my cloud gateway ultra

Is there a reason you want to move from the Unifi gateway? I use one with my alta switches and alta aps and it works great.