FortiPower / PowerFGT

PowerShell module to manage Fortinet (FortiGate) Firewall
Apache License 2.0
104 stars 33 forks source link

Address : Known issue #36

Open alagoutte opened 5 years ago

alagoutte commented 5 years ago

There is some known issue with address cmdlet

This issues will be fixed on a next release...

alagoutte commented 4 years ago

Search/march is fixed on #58 and #62 and it will be available on next release

hlroudjehane commented 2 years ago

Your module has been incredibly helpful. Any chance an geography address update is coming out soon? Any way I can update the API myself for this is not supported yet?

alagoutte commented 2 years ago

Hi @hlroudjehane thanks for feedback !

I make a quick look of geography address and it will be easy to add ! (need to add a new parameter like -country with the country code...) if you have time, you can also update the API and make a PR !

What the use case ?

hlroudjehane commented 2 years ago

I want the provide the ability to add a new geography address and then add that address to an address member group. I’ll edit the API and see if I can add the new parameter and country code.

hlroudjehane commented 2 years ago

It looks like the change should be made in this file/location correct?

alagoutte commented 2 years ago

It looks like the change should be made in this file/location correct?

Yes !

alagoutte commented 2 years ago

after a very quick look a small PR for add #191

some example :

Add-FGTFirewallAddress -Name FGT-Country-FR -country FR

name                 : FGT-Country-FR
q_origin_key         : FGT-Country-FR
uuid                 : 33cf29c8-f7e3-51ec-6987-6871166d6ba9
type                 : geography
sub-type             : sdn
clearpass-spt        : unknown
macaddr              : {}
country              : FR
cache-ttl            : 0
sdn                  : 
fsso-group           : {}
interface            : 
obj-type             : ip
tag-detection-level  : 
tag-type             : 
dirty                : dirty
comment              : 
associated-interface : 
color                : 0
filter               : 
sdn-addr-type        : private
node-ip-only         : disable
obj-id               : 
list                 : {}
tagging              : {}
allow-routing        : disable
fabric-object        : disable

Add-FGTFirewallAddress -Name FGT-Country-US -country US

name                 : FGT-Country-US
q_origin_key         : FGT-Country-US
uuid                 : 610bc0b8-f7e3-51ec-5add-9d7c450d2e0f
type                 : geography
sub-type             : sdn
clearpass-spt        : unknown
macaddr              : {}
country              : US
cache-ttl            : 0
sdn                  : 
fsso-group           : {}
interface            : 
obj-type             : ip
tag-detection-level  : 
tag-type             : 
dirty                : dirty
comment              : 
associated-interface : 
color                : 0
filter               : 
sdn-addr-type        : private
node-ip-only         : disable
obj-id               : 
list                 : {}
tagging              : {}
allow-routing        : disable
fabric-object        : disable

Get-FGTFirewallAddress -filter_attribute type -filter_value geography | ft

name           q_origin_key   uuid                                 type      sub-type clearpass-spt macaddr country cache-ttl sdn
----           ------------   ----                                 ----      -------- ------------- ------- ------- --------- ---
FGT-Country-FR    FGT-Country-FR    33cf29c8-f7e3-51ec-6987-6871166d6ba9 geography sdn      unknown       {}      FR              0 
FGT-Country-US FGT-Country-US 610bc0b8-f7e3-51ec-5add-9d7c450d2e0f geography sdn      unknown       {}      US              0 
hlroudjehane commented 2 years ago

I updated the 12 lines of code highlighted in address.ps1 to no resolve unfortunately. Is there another file that needs updating?

alagoutte commented 2 years ago

I updated the 12 lines of code highlighted in address.ps1 to no resolve unfortunately. Is there another file that needs updating?

do you reforce the import after modified the file ? Import-Module PowerFGT -force

hlroudjehane commented 2 years ago

Yes in the screenshot I sent you I ran an import. It doesn’t seem to recognize the new parameters added as they don’t auto show while type.

alagoutte commented 2 years ago

Yes in the screenshot I sent you I ran an import. It doesn’t seem to recognize the new parameters added as they don’t auto show while type.

there is no screenshot on github issue...

you can try to clone my repo and use the feature branch

hlroudjehane commented 1 year ago

I was changing way more code than I needed to! Thank you Alexis. I will test on my side and see if I have any trouble.