-
|
Hello team, just wondering if anyone else is experiencing issues with the new Zone-Based Firewalls in version 9.0.108? I’m not getting firewall rules coming back with getRules() and wonder if that uses a different API endpoint? Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, yes in fact It doesn't use the same endpoints . Rules always exists, even if you migrate to zones, just, it returns an empty array . Here is how I handle it on another project (not included in this one, I wait some feedbacks on #711 before adding other things) . First detect if zone is enabled (or in fact, if rules are migrated to zones, never tried with new installation, directly to zones) : then, get external zone id (because I want only zone blocking external calls), and get firewall policies : https://github.com/thib3113/unifi-blockips-srv/blob/main/src/Blocker.ts#L41-L78 I never create policies, so I can't provide an example, neither know the way to do it, but you can create one on unifi, and check the endpoint called . |
Beta Was this translation helpful? Give feedback.
Hi,
yes in fact It doesn't use the same endpoints . Rules always exists, even if you migrate to zones, just, it returns an empty array .
Here is how I handle it on another project (not included in this one, I wait some feedbacks on #711 before adding other things) .
First detect if zone is enabled (or in fact, if rules are migrated to zones, never tried with new installation, directly to zones) :
https://github.com/thib3113/unifi-blockips-srv/blob/main/src/Blocker.ts#L15-L30
then, get external zone id (because I want only zone blocking external calls), and get firewall policies : https://github.com/thib3113/unifi-blockips-srv/blob/main/src/Blocker.ts#L41-L78
I never create policies, so I …