Azure-Sentinel icon indicating copy to clipboard operation
Azure-Sentinel copied to clipboard

FortiGate IP blocking playbook

Open raj009970 opened this issue 4 years ago • 14 comments

Hi Team, Greetings..

i am deploying FortiGate IP blocking playbook from the below link. As a pre-request, i have below information: -

  1. Rest API ADMIN- A user created in Fortigate firewall and API key.
  2. Fortinet service end point i am using https://x.x.x.x:444/api OR should i use only https://x.x.x.x:444/ OR http://X.X.X.X:444/api/v2/cmdb/firewall/address?access_token=xxxxxxxxxxxxxxxxxxxxxxxx.
  3. i need to know what exact configuration we have to do for function app.
  4. do we have to open any port in firewall to run this playbook.
  5. we have three playbook in Github. i want only IP blocking playbook. so do i have to bind only ip blocking playbook in log analytic rule?
  6. is there any way to test the connectivity between firewall and logic app. if we have,, how we can verify that connectivity has been established. now we just need to configure the playbook.

if there is any other prerequisites then please let me know.

https://github.com/Azure/Azure-Sentinel/tree/master/Playbooks/Fortinet-FortiGate

Thanks in advance.

raj009970 avatar May 02 '22 06:05 raj009970

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] avatar May 02 '22 06:05 github-actions[bot]

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] avatar May 03 '22 22:05 github-actions[bot]

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] avatar May 04 '22 11:05 github-actions[bot]

Hi,

To try it's best to deploy existing Fortinet playbooks. Before deploying playbooks, you need first to deploy Logic App connector, and then playbooks. It's documented in link you shared.

This API is Fortinet API and they should have it documented if some port should be open, Sentinel is just adding IP to API. Please raise this with Fortinet.

To test connectivity you can use Postman or any tool like Postman to call that API. Playbook is doing the same. There is no special connection between Sentinel and FortiGate, it's just API call made from playbooks using authorization you created in Fortinet. Or you can deploy any existing playbook and test it using existing playbook.

If you want to use only one playbook, you can attach that playbook to analytic rule/automation rule (based on trigger, is it Alert trigger - attach using analytic rule, or Incident trigger - attach using automation rule).

BenjiSec avatar May 05 '22 09:05 BenjiSec

Hi BenijSec, Thanks for your support and response. This API is Fortinet API and they should have it documented if some port should be open, Sentinel is just adding IP to API. Please raise this with Fortinet.

like you mentioned above for API, do i get it from Fortinet support team. do you have any document, if yes kindly share it with me.. is there any format for API like https://ip/api/v2/user/token.? please give me more details here.

Thanks

raj009970 avatar May 07 '22 08:05 raj009970

Hello @raj009970

The FortiGate IP blocking playbook has been tested multiple times so that customers can deploy using the template provided to avoid having to confirm and configure pre-requisites or needing to know the API call format. However, if you wish to look at these you can see them in the JSON in the GitHub or you can look at the structure of the playbook in the Logic Apps editor after you have deployed the template.

In order for us to assist you further - as per @BenjiSec's recommendation - please deploy the template in a sandbox environment and then if you have any specific issues with the playbook not working we can work through those with you.

Thanks!

sarah-yo avatar May 10 '22 19:05 sarah-yo

hi sarah-yo Thank you for your response. I think I have an issue with my FortiOS REST API. could you please share the format of REST API. i will change it or create it similarly. or can i see the REST API used in playbook templates.

any help will he highly appreciated on this

raj009970 avatar May 13 '22 05:05 raj009970

Hi @raj009970

Please provide screenshots of the errors you are receiving when you deploy the template.

Thanks

sarah-yo avatar May 13 '22 18:05 sarah-yo

hi Sarah-yo,

i have deployed the playbook template successfully but i have two issues: -

  1. while it is playbook is triggering i cannot see any IP address information in that.
  2. logic app is throwing http 500 error.
  3. rest api that i am using is https://x.x.x.x:444/api/v2/cmdb/firewall/address?access_token=8hdskds457Gdc0Ndx7t68Q9nkqdj let me know the api that i am using is correct. how i can fix the issue when the playbook is triggering and does not extract the ip address information. Thanks

raj009970 avatar May 16 '22 04:05 raj009970

hi team,

could you please confirm the rest API that i am using is correct. rest api that i am using is https://x.x.x.x:444/api/v2/cmdb/firewall/address?access_token=8hdskds457Gdc0Ndx7t68Q9nkqdj my fortigate team does not have good knowledge of API. so if you share the rest api that you have used then it will be great. i will make changes in that REST API

raj009970 avatar May 25 '22 09:05 raj009970

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] avatar May 28 '22 04:05 github-actions[bot]

Hi, that API looks like examples I saw. Because I don't have FortiGate device, cannot test it on my own. To check more about Fortinet API you have to get access to Fortinet Developer Platform where you will have more info about APIs - https://docs.fortinet.com/document/fortigate/7.0.0/sd-wan-architecture-for-enterprise/631171/api-automation. To help out with Fortinet APIs, it's best to engage with Fortinet.

BenjiSec avatar Jun 09 '22 12:06 BenjiSec

Hi @raj009970, as per earlier comment, issue is related to Fortinet API, so closing this issue. Please raise a ticket in Fortinet support. Thanks!

v-amolpatil avatar Feb 07 '23 07:02 v-amolpatil

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] avatar Feb 07 '23 07:02 github-actions[bot]