Skip to content
Discussion options

You must be logged in to vote

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 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nmuldoon
Comment options

Answer selected by nmuldoon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants