API Request to Backup a Fortinet Firewall

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

ความคิดเห็น •

  • @liquathrushbane2003
    @liquathrushbane2003 2 ปีที่แล้ว

    Thank you Ali - needed to do this myself, but couldn't find the command in the API guides.

  • @danieltesonicassavara9731
    @danieltesonicassavara9731 3 หลายเดือนก่อน

    The backup file exported in this way does not export the "config system admin", do you know how I can make this item exported together with the API?

  • @anatchaisamretsin8770
    @anatchaisamretsin8770 2 ปีที่แล้ว

    Hi, Thank you for shared this video. It's help me.

  • @sahinaktas4693
    @sahinaktas4693 2 ปีที่แล้ว

    hello everyone, i cant post anything to fortigate. http status return 500 internal error. no problem with get request but post request doesnt work. can anyone please help me ?

    • @AliYounesGo4IT
      @AliYounesGo4IT  2 ปีที่แล้ว

      I read online that the most common causes are incorrect parameters, but will need more info to look into what's not working in your case

  • @iamramu111992
    @iamramu111992 3 ปีที่แล้ว

    That's the new feature on the new version of the Fortigate
    Only administrator account can take a backup, even professional_admin can't take a backup

  • @yarikvadila1266
    @yarikvadila1266 3 ปีที่แล้ว

    Hello, any ideas why I'm getting 401 error while trying to backup Fortigate?

    • @AliYounesGo4IT
      @AliYounesGo4IT  3 ปีที่แล้ว

      401 error is about proper authorization. Make sure you have the correct account access to the firewall/correct password/or machine running the script has access to the firewall (proper policy)

  • @jonathahernandez1
    @jonathahernandez1 3 ปีที่แล้ว

    Hello how is everything? I have tried the script in python and with cURL, but the request informs me that I do not have authorization, in the same way with ansible, do you know if it is because of something that I need to enable in the fortigate?
    "http_method":"GET",
    "status":"error",
    "http_status":403,
    "vdom":"root",
    "path":"system",
    "name":"config",
    "action":"backup",
    "serial":"FGVM02333333333",
    "version":"v6.2.7",
    "build":1190

    • @AliYounesGo4IT
      @AliYounesGo4IT  3 ปีที่แล้ว +1

      The HTTP 403 Forbidden means you have an issue with authorization. I can think of two things, either the token is incorrect (generate a new one with the admin account), or the machine running the script can't reach the IP of the Fortigate (make sure the right policy is in place to allow communication).
      Let me know if that helps, and I will keep thinking of something else.

    • @jonathahernandez1
      @jonathahernandez1 3 ปีที่แล้ว

      @@AliYounesGo4IT hello, the api key is functional and correct since when consulting objects (address, services) it works correctly, it only fails when using the backup, in fact I tried another firewall in another version and it generates the same error.

    • @AliYounesGo4IT
      @AliYounesGo4IT  3 ปีที่แล้ว

      @@jonathahernandez1 Another thing, try to put the API user under a read/write (full access) profile and see if it works

    • @jonathahernandez1
      @jonathahernandez1 3 ปีที่แล้ว +1

      @@AliYounesGo4IT I have found the problem, being such a large device you have to make the change in the timeout, at the ansible level you must modify the timeut, at the python level you would have to add that timeout so that it waits and does not cut the connection, also modify the acc profile so that it is in scope mode

    • @AliYounesGo4IT
      @AliYounesGo4IT  3 ปีที่แล้ว

      @@jonathahernandez1 That's great!

  • @dhatchinamoorthygovindan1041
    @dhatchinamoorthygovindan1041 3 ปีที่แล้ว +1

    Nice , Can you help me to take a backup of multiple firewalls with using the same api script and use dynamic name for each file based on hostname and timestamp in the flename.

    • @AliYounesGo4IT
      @AliYounesGo4IT  3 ปีที่แล้ว

      I have another video to backup the firewalls, I saved the files as the hostname of the device plus timestamp. It is using Netmiko library, but you can try with this API call and when you get the response save them as in this other video, check it out:
      th-cam.com/video/YXWHXTGM0FA/w-d-xo.html

  • @aleks.lambreca
    @aleks.lambreca 3 ปีที่แล้ว +2

    Hello, awesome video! Can you also make one to backup standalone fortiswitches via API?

    • @AliYounesGo4IT
      @AliYounesGo4IT  3 ปีที่แล้ว

      Thank you!
      I will work on the FortiSwitch one

  • @venkatesha3241
    @venkatesha3241 2 ปีที่แล้ว

    It was nice video. can you make video for restore Fortinet firewall via API?