index
int64 0
4.08k
| text
stringlengths 34
4.9k
⌀ | url
stringclasses 38
values |
|---|---|---|
3,655
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
4. Click OK.
5. In NSX-T, create a cURL request to trigger the automation stitch on the FortiGate:
root@pc56:/home# curl -k -X POST -H 'Authorization: Bearer
3fdxNG08mgNg0fh4NQ51g1NQ1QHcxx' --data '{ "srcip": "10.1.30.242"}'
https://172.16.116.230/api/v2/monitor/system/automation-stitch/webhook/auto_webhook
{
"http_method":"POST",
"status":"success",
"http_status":200,
"serial":"FGVM08TM20000000",
"version":"v6.4.0",
"build":1608
}
The automation stitch is triggered and the configured tag is added to the NSX-T VM.
In FortiOS, the Security Fabric > Automation page shows the last trigger time.
FortiOS 7.6.2 Administration Guide 3656
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,656
|
Fortinet Security Fabric
To configure an automation stitch to assign a security tag to NSX-T VMs in the CLI:
1. Configure the NSX SDN connector:
config system sdn-connector
edit "nsx_t25"
set type nsx
set server "172.18.64.205"
set username "admin"
set password xxxxxxxxxxxx
set vcenter-server "172.18.64.201"
set vcenter-username "administrator@vsphere.local"
set vcenter-password xxxxxxxxxxxx
next
end
2. Configure the automation stitch:
config system automation-trigger
edit "auto_webhook"
set trigger-type event-based
set event-type incoming-webhook
next
end
config system automation-action
edit "auto_webhook_quarantine-nsx"
set action-type quarantine-nsx
set security-tag "automation_tag"
set sdn-connector "nsx_t25"
next
end
config system automation-stitch
edit "auto_webhook"
set trigger "auto_webhook"
config actions
edit 1
set action "auto_webhook_quarantine-nsx"
set required enable
next
end
next
end
3. In NSX-T, create a cURL request to trigger the automation stitch on the FortiGate:
root@pc56:/home# curl -k -X POST -H 'Authorization: Bearer
3fdxNG08mgNg0fh4NQ51g1NQ1QHcxx' --data '{ "srcip": "10.1.30.242"}'
https://172.16.116.230/api/v2/monitor/system/automation-stitch/webhook/auto_webhook
FortiOS 7.6.2 Administration Guide 3657
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,657
|
Fortinet Security Fabric
{
"http_method":"POST",
"status":"success",
"http_status":200,
"serial":"FGVM08TM20000000",
"version":"v6.4.0",
"build":1608
}
To verify the automation stitch is triggered and the action is executed:
# diagnose test application autod 2
csf: enabled root:yes
version:1586883541 sync time:Tue Apr 14 11:04:05 2020
total stitches activated: 1
stitch: auto_webhook
destinations: all
trigger: auto_webhook
(id:15)service=auto_webhook
local hit: 1 relayed to: 0 relayed from: 0
actions:
auto_webhook_quarantine-nsx type:quarantine-nsx interval:0
security tag:automation_tag
sdn connector:
nsx_t25;
Replacement messages for email alerts
Automation stitches with an Email action can leverage the formatting options provided by replacement messages to
create branded email alerts.
You can enable a replacement message and edit the message body or select a customized replacement message group
when you configure the automation action. When the automation stitch is triggered, the FortiGate will send the email with
the defined replacement message.
In this example, a Security Rating report triggers an Email notification action. The email uses a customized replacement
message group.
To configure the replacement message group in the GUI:
1. Go to System > Replacement Message Groups and click Create New.
2. Enter the following:
Name group-sec1
Group Type Security
3. Click OK.
4. Select the group in the list and click Edit.
FortiOS 7.6.2 Administration Guide 3658
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,658
|
Fortinet Security Fabric
5. Select Automation Alert Email and click Edit.
6. Edit the HTML code as needed, then click Save.
To configure the email action in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name email-group1
To Enter an email address
Subject CSF stitch alert group1
Replacement message Enable
Customize messages Enable and select group-sec1 from the dropdown
FortiOS 7.6.2 Administration Guide 3659
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,659
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
6. Right-click the automation stitch, and click Test Automation Stitch.
After the Security Rating report is finished, the automation is triggered, and the email is delivered with the
customized replacement message in the email body.
To configure the replacement message group in the CLI:
config system replacemsg-group
edit "group-sec1"
set comment ""
set group-type utm
config automation
edit "automation-email"
set buffer "...<h1> Security Fabric Automation rating trigger </h1>..."
...
next
end
next
end
FortiOS 7.6.2 Administration Guide 3660
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,660
|
Fortinet Security Fabric
To configure the email action in the CLI:
1. Configure the automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Configure the automation action:
config system automation-action
edit "email-group1"
set action-type email
set email-to "admin@fortinet.com"
set email-subject "CSF stitch alert group1"
set replacement-message enable
set replacemsg-group "group-sec1"
next
end
3. Configure the automation stitch:
config system automation-stitch
edit "auto_rating"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "email-group1"
set required enable
next
end
next
end
4. To view the automation stitch information after it is triggered:
# diagnose test application autod 3
stitch: auto_rating
local hit: 1 relayed to: 0 relayed from: 0
last trigger:Tue Mar 16 15:11:29 2021
last relay:
actions:
email-group1:
done: 1 relayed to: 0 relayed from: 0
last trigger:Tue Mar 16 15:11:29 2021
last relay:
logid2stitch mapping:
id:52000 local hit: 1 relayed hits: 0
auto_rating
FortiOS 7.6.2 Administration Guide 3661
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,661
|
Fortinet Security Fabric
Slack Notification action
To configure an automation stitch with a Slack Notification action, you first need to configure an incoming webhook in
Slack. Then you can enter the webhook URL when you configure the Slack Notification action.
This example uses the default Any Security Rating Notification trigger in the automation stitch with two Slack Notification
actions with different notification messages. One message is a custom message, and the other is for the Security Rating
Summary log with a 90 second delay.
To create an Incoming Webhook in Slack:
1. Go to the Slack website, and create a workspace.
2. Create a Slack application for the workspace.
3. Add an Incoming Webhook to a channel in the workspace (see Sending messages using Incoming Webhooks for
more details).
4. Activate the Incoming Webhook, and copy the Webhook URL to the clipboard.
FortiOS 7.6.2 Administration Guide 3662
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,662
|
Fortinet Security Fabric
To configure an automation stitch with Slack Notification actions in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the first Slack Notification action:
a. Click Add Action.
b. Click Create and select Slack Notification.
c. Enter the following:
Name slack1
URL Paste the webhook URL from the clipboard
Message Text
Message text This is test for slack notification.
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the second Slack Notification action:
a. Click Add Action.
b. Click Create and select Slack Notification.
c. Enter the following:
Name slack2
FortiOS 7.6.2 Administration Guide 3663
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,663
|
Fortinet Security Fabric
URL Paste the webhook URL from the clipboard
Message Text
Message text %%log%%
d. Click OK.
e. Select the action in the list and click Apply.
f. Click the Add delay located between both actions. Enter 90 and click OK.
6. Click OK.
FortiOS 7.6.2 Administration Guide 3664
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,664
|
Fortinet Security Fabric
7. Trigger the automation stitch:
a. Right-click the automation stitch and select Test Automation Stitch.
After the Security Rating report is finished, the automation is triggered and an event log is created by the
FortiGate. The two notifications are sent to the Slack channel.
To configure an automation stitch with Slack Notification actions in the CLI:
1. Configure the automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Configure the automation actions:
config system automation-action
edit "slack1"
set action-type slack-notification
set message "This is test for slack notification."
set uri "hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"
next
edit "slack2"
set action-type slack-notification
set uri "hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"
next
end
3. Configure the automation stitch:
config system automation-stitch
edit "auto_rating"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "slack1"
set required enable
next
FortiOS 7.6.2 Administration Guide 3665
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,665
|
Fortinet Security Fabric
edit 2
set action "slack2"
set delay 90
set required enable
next
end
next
end
4. Verify that the automation action was triggered:
# diagnose test application autod 3
stitch: auto-rating
local hit: 1 relayed to: 0 relayed from: 0
last trigger:Wed Feb 05 11:10:23 2020
last relay:
actions:
slack1:
done: 1 relayed to: 0 relayed from: 0
last trigger:Wed Feb 11:10:23 2020
last relay:
slack2:
done: 1 relayed to: 0 relayed from: 0
last trigger:Wed Feb 05 11:10:23 2020
last relay:
Microsoft Teams Notification action
Microsoft Teams Notification actions can be configured to send notifications to channels in Microsoft Teams. To trigger
the notifications, you need to add an Incoming Webhook connector to a channel in Microsoft Teams, then you can
configure the automation stitch with the webhook URL.
In the following example, you will configure an automation stitch with the default Any Security Rating Notification trigger
and two Microsoft Teams Notification actions with different notification messages. One message is for the Security
Rating Summary log, and the other is a custom message with a ten second delay.
To add the Incoming Webhook connector in a Microsoft Teams channel:
1. In Microsoft Teams, click the ... (More options) beside the channel name, and select Connectors.
2. Search for Incoming Webhook and click Configure.
3. Enter a name for the webhook, upload an image for the webhook, and click Create.
4. Copy the webhook to the clipboard and save it.
FortiOS 7.6.2 Administration Guide 3666
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,666
|
Fortinet Security Fabric
5. Click Done.
To configure an automation stitch with Microsoft Teams Notification actions in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the first Microsoft Teams Notification action:
a. Click Add Action.
b. Click Create and select Microsoft Teams Notification.
c. Enter the following:
Name teams_1
URL Paste the webhook URI from the clipboard
Message Text
Message text %%log%%
FortiOS 7.6.2 Administration Guide 3667
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,667
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the second Microsoft Teams Notification action:
a. Click Add Action.
b. Click Create and select Microsoft Teams Notification.
c. Enter the following:
Name teams_2
URL Paste the webhook URI from the clipboard
Message Text
Message text This is for test.
FortiOS 7.6.2 Administration Guide 3668
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,668
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
f. Click the Add delay located between both actions. Enter 10 and click OK.
6. Click OK.
7. Trigger the automation stitch:
a. Right-click the automation stitch and select Test Automation Stitch.
After the Security Rating report is finished, the automation is triggered and an event log is created by the
FortiOS 7.6.2 Administration Guide 3669
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,669
|
Fortinet Security Fabric
FortiGate. The two notifications are sent to the Microsoft Teams channel.
To configure an automation stitch with Microsoft Teams Notification actions in the CLI:
1. Configure the automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Configure the automation actions:
config system automation-action
edit "teams_1"
set action-type microsoft-teams-notification
set uri "outlook.office.com/webhook/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx@xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx/IncomingWebhook/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx"
next
edit "teams_2"
set action-type microsoft-teams-notification
set message "This is for test."
set uri "outlook.office.com/webhook/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx@xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx/IncomingWebhook/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx"
next
end
3. Configure the automation stitch:
FortiOS 7.6.2 Administration Guide 3670
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,670
|
Fortinet Security Fabric
config system automation-stitch
edit "Teams_action"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "teams_1"
set required enable
next
edit 2
set action "teams_2"
set delay 10
set required enable
next
end
next
end
4. Verify that the automation action was triggered:
# diagnose test application autod 3
stitch: Teams_action
local hit: 2 relayed to: 0 relayed from: 0
last trigger:Mon Nov 16 10:28:08 2020
last relay:
actions:
teams_1:
done: 2 relayed to: 0 relayed from: 0
last trigger:Mon Nov 16 10:28:08 2020
last relay:
teams_2:
done: 2 relayed to: 0 relayed from: 0
last trigger:Mon Nov 16 10:28:08 2020
last relay:
logid2stitch mapping:
id:52000 local hit: 22 relayed hits: 0
Teams_action
AWS Lambda action
AWS Lambda functions can be called when an automation stitch is triggered. This example uses the default Any
Security Rating Notification trigger in the automation stitch.
To configure an AWS Lambda function automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the AWS Lambda function action:
a. Click Add Action.
b. Click Create and select AWS Lambda.
FortiOS 7.6.2 Administration Guide 3671
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,671
|
Fortinet Security Fabric
c. Enter the following:
Name aws-action-1
URL Enter the request API URI
API key Enter the API key
HTTP header header2 : header2_value
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
To configure an AWS Lambda function automation stitch in the CLI:
1. Create the automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Create the automation action:
config system automation-action
edit "aws-action-1"
set action-type aws-lambda
set aws-api-key *************
set uri "0100000000.execute-api.us-east-2.amazonaws.com/default/xxxxxautobatoon-XXX-lambdaXXX"
config http-headers
edit 1
set key "header2"
set value "header2_value"
next
end
next
end
3. Create the automation stitch:
config system automation-stitch
edit "auto-aws"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "aws-action-1"
set required enable
next
end
next
end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In AWS, the
log shows that the function was called, executed, and finished.
FortiOS 7.6.2 Administration Guide 3672
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,672
|
Fortinet Security Fabric
Azure Function action
Azure functions can be called when an automation stitch is triggered. This example uses the default Any Security Rating
Notification trigger in the automation stitch.
To configure an Azure function automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the Azure Function action:
a. Click Add Action.
b. Click Create and select Azure Function.
c. Enter the following:
Name azure_function
URL Enter the request API URI
Authorization Function
API key Enter the API key
HTTP header header1 : value1
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
To configure an Azure function automation stitch in the CLI:
1. Create an automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Create an automation action:
config system automation-action
edit "azure_function"
set action-type azure-function
set azure-function-authorization function
set azure-api-key **********
set uri "xxxxx00-no-delete-xxxx.azurewebsites.net/api/headersResponse"
config http-headers
edit 1
FortiOS 7.6.2 Administration Guide 3673
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,673
|
Fortinet Security Fabric
set key "header1"
set value "value1"
next
end
next
end
3. Create the automation stitch:
config system automation-stitch
edit "auto-azure"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "azure_function"
set required enable
next
end
next
end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Azure,
the function log shows that the function was called, executed, and finished:
Google Cloud Function action
Google Cloud functions can be called when an automation stitch is triggered. This example uses the default Any Security
Rating Notification trigger in the automation stitch.
To configure a Google Cloud function automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
FortiOS 7.6.2 Administration Guide 3674
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,674
|
Fortinet Security Fabric
c. Click Apply.
4. Configure the Google Cloud Function action:
a. Click Add Action.
b. Click Create and select Google Cloud Function.
c. Enter the following:
Name google-echo
URL Enter the request API URI
HTTP header echo-header : echo-value
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
To configure a Google Cloud function automation stitch in the CLI:
1. Create an automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Create an automation action:
config system automation-action
edit "google-echo"
set action-type google-cloud-function
set uri "us-central1-xxx-xxxxxxx-000-000000.cloudfunctions.net/xxxx-echo"
config http-headers
edit 1
set key "echo-header"
set value "echo-value"
next
end
next
end
3. Create the automation stitch:
config system automation-stitch
edit "auto-google1"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "google-echo"
set required enable
next
end
next
end
FortiOS 7.6.2 Administration Guide 3675
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,675
|
Fortinet Security Fabric
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Google
Cloud, go to Logs to see the function log showing that the configured function was called, executed, and finished:
AliCloud Function action
AliCloud functions can be called when an automation stitch is triggered. This example uses the default Any Security
Rating Notification trigger in the automation stitch.
To configure an AliCloud function automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name.
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the AliCloud Function action:
a. Click Add Action.
b. Click Create and select AliCloud Function.
c. Enter the following:
Name Ali-Action-1
URL Enter the request API URI
Authorization Function
AccessKey ID Enter the access key ID
AccessKey Secret Enter the access key secret
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
FortiOS 7.6.2 Administration Guide 3676
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,676
|
Fortinet Security Fabric
To configure an AliCloud function automation stitch in the CLI:
1. Create an automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Create an automation action:
config system automation-action
edit "Ali-Action-1"
set action-type alicloud-function
set alicloud-function-authorization function
set alicloud-access-key-id "XXXXXxXXXXxxxxxx"
set alicloud-access-key-secret xxxxxx
set uri "0000000000000000.us-east-1.fc.aliyuncs.com/2099-99-99/proxy/testfunction/echoBodyAuth/"
next
end
3. Create the automation stitch:
config system automation-stitch
edit "auto-ali"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "Ali-Action-1"
set required enable
next
end
next
end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In AliCloud,
the function log shows that the function was called, executed, and finished:
FortiOS 7.6.2 Administration Guide 3677
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,677
|
Fortinet Security Fabric
CLI script action
The CLI script action can run when an automation stitch is triggered. It executes a series of commands in the CLI, as
defined by the administrator. The scripts commands can be entered manually, uploaded as a file, or recorded in the CLI
console. The output of the script can be fed as a variable (%%results%%) into the next action in the stitch. This could
then be sent as an email using the email action, for example.
The CLI script action utilizes the auto-script feature to perform the execution of the script
commands. The output size of the auto-script feature controls the size of the output for the
script execution (10MB by default). This output is read into a buffer for use by the automation
stitch action, and that buffer is limited to 192K characters for the email action. This means that
the total allowable limit for CLI script output that is used in an email action is 192K characters.
The buffer sizes for other actions may vary, for example the buffer to use the results in a
webhook action could be a different size.
config system automation-action
edit <name>
set action-type cli-script
set minimum-interval <integer>
set script <string>
set output-size <integer>
set timeout <integer>
set execute-security-fabric {enable | disable}
set accprofile <profile>
next
end
minimum-interval
<integer>
Limit execution to no more than once in this interval, in seconds (0 - 2592000, 0 =
no minimum, default = 0).
script <string> The commands to be run by this CLI script action.
output-size <integer> Set the size to limit the script output, in megabytes (1 - 1024, default = 10).
timeout <integer> Set the maximum running time for this script, in seconds (0 - 300, 0 = no timeout,
default = 0).
execute-security-fabric
{enable | disable}
Enable/disable execution of CLI script on all or only one FortiGate unit in the
Security Fabric.
l enable: the action will run on all fabric devices.
l disable (default): the action will run only on the device where the action
was triggered.
accprofile <profile> Access profile for CLI script action to access FortiGate features.
Certain diagnostic commands may not function as expected with CLI scripts and result in no
output. For example, when used in a CLI script, the diagnostic command dia test
application dnsproxy 6 fails to produce any output because the cli-script feature does
not support daemon message() prints.
FortiOS 7.6.2 Administration Guide 3678
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,678
|
Fortinet Security Fabric
Execute on Security Fabric (execute-security-fabric enable) can be used in a way where an
event triggered on a device causes all devices to take the same action.
Some actions, such as execute backup config ftp, when taken on multiple devices
could cause an overwrite on the FTP server when multiple devices run the same action at the
same time.
Example
In this example, the script sets the idle timeout value to 479 minutes, and sends an email with the script output.
To configure a stitch with a CLI script action in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name (auto-cli-1).
3. Configure the trigger:
a. Click Add Trigger.
b. Select Any Security Rating Notification.
c. Click Apply.
4. Configure the CLI Script action:
a. Click Add Action.
b. Click Create and select CLI Script.
c. Enter the following:
Name admintimeout
Script config system global
set admintimeout 479
end
Alternatively, click Upload to upload a file, or click >_Record in CLI console
and enter the CLI commands.
Administrator profile Select a profile
FortiOS 7.6.2 Administration Guide 3679
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,679
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name auto-cli-1_email
To Enter an email address
Subject CSF stitch alert
Body %%results%%
FortiOS 7.6.2 Administration Guide 3680
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,680
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
To configure a stitch with a CLI script action in the CLI:
1. Create the automation trigger:
config system automation-trigger
edit "Any Security Rating Notification"
set event-type security-rating-summary
set report-type any
next
end
2. Create the automation actions:
config system automation-action
edit "admintimeout"
set action-type cli-script
set script "config system global
set admintimeout 479
end"
set output-size 10
set timeout 0
set accprofile "super_admin"
next
edit "auto-cli-1_email"
set action-type email
set email-to "admin@fortinet.com"
set email-subject "CSF stitch alert"
set message "%%results%%"
next
end
FortiOS 7.6.2 Administration Guide 3681
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,681
|
Fortinet Security Fabric
3. Create the automation stitch:
config system automation-stitch
edit "auto-cli-1"
set trigger "Any Security Rating Notification"
config actions
edit 1
set action "admintimeout"
set required enable
next
edit 2
set action "auto-cli-1_email"
set required enable
next
end
next
end
Sample email
The email sent by the action will look similar to the following:
Execute a CLI script based on memory and CPU thresholds
Automation stitches can be created to run a CLI script and send an email message when memory or CPU usage
exceeds specified thresholds.
CLI script action output that exceeds 64KB is sent as an attachment in the next email action.
To define memory and CPU usage thresholds:
config system global
set cpu-use-threshold <percent>
set memory-use-threshold-extreme <percent>
set memory-use-threshold-green <percent>
set memory-use-threshold-red <percent>
end
Where:
cpu-use-threshold Threshold at which CPU usage is reported, in percent of total possible CPU
utilization (default = 90).
FortiOS 7.6.2 Administration Guide 3682
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,682
|
Fortinet Security Fabric
memory-use-thresholdextreme
Threshold at which memory usage is considered extreme, and new sessions are
dropped, in percent of total RAM (default = 95).
memory-use-thresholdgreen
Threshold at which memory usage forces the FortiGate to exit conserve mode, in
percent of total RAM (default = 82).
memory-use-threshold-red Threshold at which memory usage forces the FortiGate to enter conserve mode,
in percent of total RAM (default = 88).
Configuring a high memory usage stitch
In this example, an automation stitch is created that runs a CLI script to collect debug information, and then email the
results of the script to a specified email address when the memory usage causes the FortiGate to enter conserve mode.
To create an automation stitch for high memory usage in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name (auto_high_memory).
3. Configure the trigger:
a. Click Add Trigger.
b. Select Conserve Mode.
c. Click Apply.
4. Configure the CLI Script action:
a. Click Add Action.
b. Click Create and select CLI Script.
c. Enter the following:
Name high_memory_debug
Script diagnose sys top 5 20 3
diagnose sys session full-stat
get system performance status
diagnose sys session full-stat
diagnose hardware sysinfo shm
diagnose hardware sysinfo memory
Administrator profile Select a profile
FortiOS 7.6.2 Administration Guide 3683
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,683
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the Email notification action:
a. Click Add Action.
b. Click Create and select Email.
c. Enter the following:
Name auto_high_memory_email
To Enter an email address
Subject CSF stitch alert: high_memory
Body %%results%%
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
To create an automation stitch for high memory usage in the CLI:
1. Create the automation trigger:
config system automation-trigger
edit "Conserve Mode"
set event-type low-memory
next
end
2. Create the automation actions:
config system automation-action
edit "high_memory_debug"
set action-type cli-script
set script "diagnose sys top 5 20 3
diagnose sys session full-stat
FortiOS 7.6.2 Administration Guide 3684
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,684
|
Fortinet Security Fabric
get system performance status
diagnose sys session full-stat
diagnose hardware sysinfo shm
diagnose hardware sysinfo memory"
set output-size 10
set timeout 0
set accprofile "super_admin"
next
edit "auto_high_memory_email"
set action-type email
set email-to "person@fortinet.com"
set email-subject "CSF stitch alert: high_memory"
set message "%%results%%"
next
end
3. Create the automation stitch:
config system automation-stitch
edit "auto_high_memory"
set trigger "Conserve Mode"
config actions
edit 1
set action "high_memory_debug"
set required enable
next
edit 2
set action "auto_high_memory_email"
set required enable
next
end
next
end
Results
When the FortiGate enters conserve mode due to the memory-use-threshold-red being exceeded, the GUI
displays a notice, and the auto_high_memory automation stitch is triggered. This causes the CLI script to run and the
script results are emailed to the specified address.
Here is sample text from the email message:
FortiOS 7.6.2 Administration Guide 3685
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,685
|
Fortinet Security Fabric
CSF stitch alert: high_memory
DoNotReply@fortinet-notifications.com
Tue 05/16/2023 5:34 PM
########## script name: autod.0 ##########
========== #1, 2023-05-16 17:34:17 ==========
Client_Fgt $ diagnose sys top 5 20 3
Run Time: 0 days, 0 hours and 0 minutes 61U, 0N, 6S, 33I, 0WA, 0HI, 0SI, 0ST; 1356T, 129F
ipshelper 2601 S < 61.6 8.0 0
ipsengine 2745 S < 4.9 8.5 0
cmdbsvr 2528 S N 0.0 7.9 0
cmdbsvr 2529 S 0.0 5.0 0
scanunitd 2610 S < 0.0 3.8 0
miglogd 2603 S 0.0 3.6 0
cw_acd 2634 S 0.0 3.4 0
node 2574 S 0.0 3.3 0
forticron 2584 S 0.0 2.9 0
miglogd 2693 S 0.0 2.8 0
reportd 2604 S 0.0 2.5 0
httpsd 2573 S 0.0 2.4 0
...
Configuring a high CPU usage stitch
Similar to the previous example, an automation stitch can be created that runs a CLI script to collect debug information,
and then email the results of the script to a specified email address when CPU usage threshold is exceeded (High CPU
trigger).
The following commands are recommended for collecting debug information, but they are not the only options. Other
commands can be used.
diagnose sys cmdb info
diagnose sys vd list | grep fib
diagnose sys top 5 20 2
diagnose sys session full-stat
diagnose sys session list | grep "\<dirty\>" –c
get system performance status
diagnose sys session full-stat
diagnose hardware sysinfo memory
diagnose sys cmdb info
diagnose sys vd list | grep fib
Webhook action
The webhook automation stitch action makes HTTP and HTTPS requests to a specified server, with custom headers,
bodies, ports, and methods. It can be used to leverage the ubiquity of HTML requests and APIs to integrate with other
tools.
The URI and HTTP body can use parameters from logs or previous action results. Wrapping
the parameter with %% will replace the expression with the JSON value for the parameter, for
example: %%results.source%% is the source property from the previous action.
FortiOS 7.6.2 Administration Guide 3686
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,686
|
Fortinet Security Fabric
In this example, a specific log message (failed administrator log in attempt) triggers the FortiGate to send the contents of
the log to a server. The server responds with a generic reply. This example assumes that the server is already
configured and able to communicate with the FortiGate.
To configure the webhook automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name (badLogin).
3. Configure the trigger:
a. Click Add Trigger.
b. Click Create and select FortiOS Event Log.
c. Enter the following:
Name badLogin
Event Admin login failed
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the automation stitch action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
Name Send Log To Server
Protocol HTTP
URL 172.16.200.44
Custom port Enable and enter 80
Method POST
HTTP body %%log%%
HTTP header Header : 1st Action
FortiOS 7.6.2 Administration Guide 3687
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,687
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK.
To configure the webhook automation stitch in the CLI:
1. Create an automation trigger:
config system automation-trigger
edit "badLogin"
set event-type event-log
set logid 32002
next
end
2. Create the automation action:
config system automation-action
edit "Send Log To Server"
set action-type webhook
set uri "172.16.200.44"
set http-body "%%log%%"
set port 80
config http-headers
edit 1
set key "Header"
set value "1st Action"
next
end
next
end
3. Create the automation stitch:
config system automation-stitch
edit "badLogin"
set trigger "badLogin"
config actions
FortiOS 7.6.2 Administration Guide 3688
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,688
|
Fortinet Security Fabric
edit 1
set action "Send Log To Server"
set required enable
next
end
next
end
To test the automation stitch:
1. Attempt to log in to the FortiGate with an incorrect username or password.
2. On the server, check the log to see that its contents were sent by the FortiGate.
The body content is replaced with the log from the trigger.
3. On the FortiGate, go to Log & Report > System Events to confirm that the stitch was activated.
4. Go to Security Fabric > Automation to see the last time that the stitch was triggered.
Diagnose commands
To enable log dumping:
# diagnose test application autod 1
autod dumped total:1 logs, num of logids:1
autod log dumping is enabled
vdom:root(0) logid:32002 len:408 log:
date=2019-05-30 time=17:41:03 logid="0100032002" type="event" subtype="system" level="alert"
vd="root" eventtime=1559263263858888451 tz="-0700" logdesc="Admin login failed" sn="0"
user="admin" ui="http(10.6.30.254)" method="http" srcip=10.6.30.254 dstip=10.6.30.5
action="login" status="failed" reason="passwd_invalid" msg="Administrator admin login failed
from http(10.6.30.254) because of invalid password"
autod log dumping is disabled
autod logs dumping summary:
logid:32002 count:1
autod dumped total:1 logs, num of logids:1
To show the automation settings:
# diagnose test application autod 2
csf: enabled root:yes
total stitches activated: 2
stitch: badLogin
FortiOS 7.6.2 Administration Guide 3689
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,689
|
Fortinet Security Fabric
destinations: all
trigger: badLogin
local hit: 6 relayed to: 6 relayed from: 6
actions:
Send Log To Server type:webhook interval:0
delay:0 required:no
proto:0 method:0 port:80
uri: 172.16.200.44
http body: %%log%%
headers:
0. Header:1st Action
To show the automation statistics:
# diagnose test application autod 3
stitch: badLogin
local hit: 1 relayed to: 1 relayed from: 1
last trigger:Wed Jul 10 12:14:14 2019
last relay:Wed Jul 10 12:14:14 2019
actions:
Send Log To Server:
done: 1 relayed to: 1 relayed from: 1
last trigger:Wed Jul 10 12:14:14 2019
last relay:Wed Jul 10 12:14:14 2019
logid2stitch mapping:
id:32002 local hit: 3 relayed to: 3 relayed from: 3
badLogin
action run cfg&stats:
total:55 cur:0 done:55 drop:0
email:
flags:10
stats: total:4 cur:0 done:4 drop:0
fortiexplorer-notification:
flags:1
stats: total:0 cur:0 done:0 drop:0
alert:
flags:0
stats: total:0 cur:0 done:0 drop:0
disable-ssid:
flags:7
stats: total:0 cur:0 done:0 drop:0
quarantine:
flags:7
stats: total:0 cur:0 done:0 drop:0
quarantine-forticlient:
flags:4
stats: total:0 cur:0 done:0 drop:0
quarantine-nsx:
flags:4
stats: total:0 cur:0 done:0 drop:0
FortiOS 7.6.2 Administration Guide 3690
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,690
|
Fortinet Security Fabric
ban-ip:
flags:7
stats: total:0 cur:0 done:0 drop:0
aws-lambda:
flags:11
stats: total:21 cur:0 done:21 drop:0
webhook:
flags:11
stats: total:6 cur:0 done:6 drop:0
cli-script:
flags:10
stats: total:4 cur:0 done:4 drop:0
azure-function:
flags:11
stats: total:0 cur:0 done:0 drop:0
google-cloud-function:
flags:11
stats: total:0 cur:0 done:0 drop:0
alicloud-function:
flags:11
stats: total:20 cur:0 done:20 drop:0
To enable debug output and turn on automation debug messages for about 30 minutes:
# diagnose debug enable
# diagnose debug application autod -1
__auto_generate_generic_curl_request()-358: Generating generic automation CURL request for
action (Send Log To Server).
__auto_generate_generic_curl_request()-406: Generic automation CURL request POST data for
action (Send Log To Server):
date=2019-05-30 time=16:44:43 logid="0100032002" type="event" subtype="system" level="alert"
vd="root" eventtime=1559259884209355090 tz="-0700" logdesc="Admin login failed" sn="0"
user="admin" ui="http(10.6.30.254)" method="http" srcip=10.6.30.254 dstip=10.6.30.5
action="login" status="failed" reason="passwd_invalid" msg="Administrator admin login failed
from http(10.6.30.254) because of invalid password"
__auto_generic_curl_request_close()-512: Generic CURL request response body from
http://172.16.200.44:
{
"userId": 1,
"id": 1,
"title": "Test Response",
"body": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
Webhook action with Twilio for SMS text messages
The FortiGate automation stitch framework can be used to interact with third-party services with webhooks to perform
various tasks. A webhook action to Twilio can be used to automate tasks that send alerts and information to
administrators by SMS text messages.
This topic includes two examples where the FortiGate uses webhooks to trigger Twilio to send SMS text messages to an
administrator.
FortiOS 7.6.2 Administration Guide 3691
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,691
|
Fortinet Security Fabric
l Example 1: using an SD-WAN heath check to trigger a Twilio webhook action
l Example 2: using an incoming webhook to trigger a Twilio webhook action
Prerequisites
l An active Twilio account with a virtual phone number that is able to send SMS text messages to the receiver in the
desired region
l A valid Twilio Account SID and Auth token for sending SMS text messages
These examples assume that the Twilio account is already configured. For more information,
see Creating or Updating Resources with the POST Method in the Twilio documentation.
Example 1: using an SD-WAN heath check to trigger a Twilio webhook action
In this example, an administrator wants to monitor the FortiGate’s SD-WAN health, particularly when a dead health
check is reported. An automation stitch will trigger the alert based on an SD-WAN log event (log ID 0113022931, SDWAN SLA information warning) and perform a webhook action to inform Twilio to send an SMS message.
Sample SD-WAN log event
date=2023-01-13 time=10:39:26 eventtime=1673635167489361827 tz="-0800" logid="0113022931"
type="event" subtype="sdwan" level="warning" vd="root" logdesc="SDWAN SLA information
warning" eventtype="Health Check" healthcheck="Google" interface="VLAN1101"
probeproto="ping" oldvalue="alive" newvalue="dead" msg="SD-WAN health-check member changed
state."
To configure the automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name (SD-WAN-HC-Down-SMS).
3. Configure the FortiOS event log trigger:
a. Click Add Trigger.
b. Click Create and select FortiOS Event Log.
c. Enter the following:
FortiOS 7.6.2 Administration Guide 3692
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,692
|
Fortinet Security Fabric
Name SD-WAN-HC-Down
Event SDWAN SLA information warning
Field filter(s) Set Field name to newvalue.
Set Value to dead.
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the webhook action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
Name Twilio-SMS-HC
Protocol HTTPS
URL Enter the URL provided by Twilio for sending SMS messages using the
POST method. The URL can be found in the cURL code sample in the
following format: https://api.twilio.com/2010-04-01/Accounts/<Twilio _
Account_SID>/Messages.json.
Method POST
HTTP body Body=%%log%%&From=%2B1360x*******&To=%2B1604*******
This string for the body text includes the SD-WAN log message, and the
Twilio from and to phone numbers.
HTTP header Content-Type : application/x-www-form-urlencoded
Authorization : Basic <Base64_encoded_authentication_code>
FortiOS 7.6.2 Administration Guide 3693
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,693
|
Fortinet Security Fabric
d. Click OK.
e. Select the action in the list and click Apply.
5. Click OK to save the stitch.
To configure the automation stitch in the CLI:
1. Configure the automation trigger:
config system automation-trigger
edit "SD-WAN-HC-Down"
set event-type event-log
set logid 22931
config fields
edit 1
set name "newvalue"
set value "dead"
next
end
next
end
2. Configure the automation action:
config system automation-action
edit "Twilio-SMS-HC"
set action-type webhook
set protocol https
set uri "api.twilio.com/2010-04-
01/Accounts/**********************************/Messages.json"
set http-body "Body=%%log%%&From=%2B1360*******&To=%2B1604*******"
set port 443
FortiOS 7.6.2 Administration Guide 3694
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,694
|
Fortinet Security Fabric
config http-headers
edit 1
set key "Content-Type"
set value "application/x-www-form-urlencoded"
next
edit 2
set key "Authorization"
set value "Basic ************"
next
end
next
end
3. Configure the automation stitch:
config system automation-stitch
edit "SD-WAN-HC-Down-SMS"
set trigger "SD-WAN-HC-Down"
config actions
edit 1
set action "Twilio-SMS-HC"
set required enable
next
end
next
end
Verification:
1. Simulate an SD-WAN health check failure to trigger the automation stitch.
2. Twilio sends an SMS message to the administrator.
3. Go to Security Fabric > Automation and locate the SD-WAN-HC-Down-SMS stitch. The Trigger Count value has
increased by one.
System log after the stitch was triggered:
date=2023-01-13 time=10:51:47 eventtime=1673635907720476287 tz="-0800" logid="0100046600"
type="event" subtype="system" level="notice" vd="root" logdesc="Automation stitch triggered"
stitch="SD-WAN-HC-Down-SMS" trigger="SD-WAN-HC-Down" stitchaction="Twilio-SMS-HC" from="log"
msg="stitch:SD-WAN-HC-Down-SMS is triggered."
FortiOS 7.6.2 Administration Guide 3695
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,695
|
Fortinet Security Fabric
Example 2: using an incoming webhook to trigger a Twilio webhook action
In this example, an administrator wants to trigger an automation stitch remotely to retrieve the device uptime with an
SMS text message. An incoming webhook will be used to send an HTTP POST request to trigger the event to occur.
Subsequently, the FortiGate performs a CLI action followed by a webhook action to inform Twilio to send an SMS text
message.
A REST API administrator with write privileges must be configured to apply an API key to this
incoming webhook. See REST API administrator on page 2984 for more information.
To configure the automation stitch in the GUI:
1. Go to Security Fabric > Automation and click Create New.
2. Enter the stitch name (Check-Uptime).
3. Configure the incoming webhook trigger:
a. Click Add Trigger.
b. Click Create and select Incoming Webhook.
c. Enter the trigger name (Check-Uptime-Webhook).
d. Click OK.
e. Select the trigger in the list and click Apply.
4. Configure the CLI script action:
a. Click Add Action.
b. Click Create and select CLI Script.
c. Enter the following:
Name Uptime
Script get system performance status | grep Uptime
Administrator profile Select a profile with REST API write privileges (prof_admin)
d. Click OK.
e. Select the action in the list and click Apply.
5. Configure the webhook action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
FortiOS 7.6.2 Administration Guide 3696
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,696
|
Fortinet Security Fabric
Name Twilio-SMS-Uptime
Protocol HTTPS
URL Enter the URL provided by Twilio for sending SMS messages using the
POST method. The URL can be found in the cURL code sample in the
following format: https://api.twilio.com/2010-04-01/Accounts/<Twilio _
Account_SID>/Messages.json.
Method POST
HTTP body Body=%%results%%&From=%2B1360x*******&To=%2B1604*******
This string for the body text includes the results from the preceding CLI
script action.
HTTP header Content-Type : application/x-www-form-urlencoded
Authorization : Basic <Base64_encoded_authentication_code>
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK to save the stitch.
To configure the automation stitch in the CLI:
1. Configure the automation trigger:
config system automation-trigger
edit "Check-Uptime-Webhook"
set event-type incoming-webhook
next
end
2. Configure the automation actions:
config system automation-action
edit "Uptime"
set action-type cli-script
set script "get system performance status | grep Uptime"
set accprofile "prof_admin"
next
edit "Twilio-SMS-Uptime"
set action-type webhook
set protocol https
set uri "api.twilio.com/2010-04-
01/Accounts/**********************************/Messages.json"
set http-body "Body=%%results%%&From=%2B1360*******&To=%2B1604*******"
set port 443
config http-headers
edit 1
set key "Content-Type"
set value "application/x-www-form-urlencoded"
next
edit 2
set key "Authorization"
set value "Basic ************"
next
FortiOS 7.6.2 Administration Guide 3697
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,697
|
Fortinet Security Fabric
end
next
end
3. Configure the automation stitch:
config system automation-stitch
edit "Check-Uptime"
set trigger "Check-Uptime-Webhook"
config actions
edit 1
set action "Uptime"
set required enable
next
edit 2
set action "Twilio-SMS-Uptime"
set required enable
next
end
next
end
Verification:
1. From a command prompt, issue the sample cURL command as recommended by the Check-Uptime-Webhook
incoming webhook:
>curl -k -X POST -H "Authorization: Bearer <API_token>" --data "{ 'srcip': '1.1.1.1',
'mac':'11:11:11:11:11:11', 'fctuid': '********************************'}"
https://x.x.x.x/api/v2/monitor/system/automation-stitch/webhook/Check-Uptime-Webhook
Response:
{
"http_method":"POST",
"status":"success",
"http_status":200,
"serial":"FGVM04TM20000000",
"version":"v7.2.4",
"build":1368
}
2. This triggers the automation stitch on the FortiGate to send a HTTP POST request to Twilio. In response, Twilio
sends an SMS text message to the recipient.
FortiOS 7.6.2 Administration Guide 3698
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,698
|
Fortinet Security Fabric
3. From the Twilio dashboard, go to Messaging > Overview and verify the Recent Messages section to confirm that the
SMS text message was delivered.
To view automation stitch diagnostics:
# diagnose debug enable
# diagnose debug application autod -1
2023-01-13 11:23:19 __action_cli_script_open()-180: cli script action:Uptime is called. svc
ctx:0x10b4d5c0
accprof:prof_admin script:
get system performance status | grep Uptime
2023-01-13 11:23:19 0: get system performance status | grep Uptime
2023-01-13 11:23:20 __cli_script_close()-115: cli script:
autod.569
output:
########## script name: autod.569 ##########
========== #1, 2023-01-13 11:23:19 ==========
FGDocs $ get system performance status | grep Uptime
Uptime: 49 days, 2 hours, 14 minutes
FortiOS 7.6.2 Administration Guide 3699
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,699
|
Fortinet Security Fabric
2023-01-13 11:23:20 0: config system auto-script
2023-01-13 11:23:20 0: delete "autod.569"
2023-01-13 11:23:20 0: end
2023-01-13 11:23:20 __action_cli_script_close()-207: cli script action is done. script:
get system performance status | grep Uptime
output:
########## script name: autod.569 ##########
========== #1, 2023-01-13 11:23:19 ==========
FGDocs $ get system performance status | grep Uptime
Uptime: 49 days, 2 hours, 14 minutes
2023-01-13 11:23:20 auto_generate_generic_curl_request()-443: Generating generic automation
CURL request for action (Twilio-SMS-Uptime).
2023-01-13 11:23:20 auto_generate_generic_curl_request()-462: Formatting HTTP body with
action parameters.
2023-01-13 11:23:20 auto_generate_generic_curl_request()-495: Generic automation CURL
request POST data for action (Twilio-SMS-Uptime):
Body=########## script name: autod.569 ##########
========== #1, 2023-01-13 11:23:19 ==========
FGDocs $ get system performance status | grep Uptime
Uptime: 49 days, 2 hours, 14 minutes
&From=%2B1360*******&To=%2B1604*******
2023-01-13 11:23:20 auto_generate_generic_curl_request()-550: Generic automation CURL
request Host header: api.twilio.com
2023-01-13 11:23:20 auto_generate_generic_curl_request()-553: Adding 2 user defined headers
2023-01-13 11:23:23 auto_curl_perform()-114: Failed to send curl request. http status code:
201
Although the final line in this debug output shows Failed to send curl request. http status code: 201,
the HTTP status code 201 indicates that the request was successful and a response code was created.
Slack integration webhook
A webhook can be created to post messages and notifications to Slack.
In this example, a configuration change triggers the FortiGate to post a message to Slack.
To create a webhook automation stitch for Slack integration in the GUI:
1. Create an incoming webhook in Slack. See Sending messages using Incoming Webhooks for more information.
2. Go to Security Fabric > Automation and click Create New.
3. Enter the stitch name.
4. Configure the trigger:
a. Click Add Trigger.
b. Select Configuration Change.
c. Click Apply.
5. Configure the action:
FortiOS 7.6.2 Administration Guide 3700
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,700
|
Fortinet Security Fabric
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
Name send to Slack
Protocol HTTPS
URL Enter the incoming webhook URL created in Slack
Custom port Enable and enter 443
Method POST
HTTP body {\"channel\": \"#delivery\", \"username\": \"tleela\", \"text\": \"Configuration
changed\", \"icon_emoji\": \":worried:\"}
HTTP header Content-type : application/json
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
To create a webhook automation stitch for Slack integration in the CLI:
1. Create an incoming webhook in Slack. See Sending messages using Incoming Webhooks for more information.
2. Create the automation trigger:
config system automation-trigger
edit "Configuration Change"
set event-type config-change
next
end
3. Create the automation action:
FortiOS 7.6.2 Administration Guide 3701
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,701
|
Fortinet Security Fabric
config system automation-action
edit "send to Slack"
set action-type webhook
set protocol https
set uri "hooks.slack.com/services/XXXXXXXX"
set http-body "{\"channel\": \"#delivery\", \"username\": \"tleela\", \"text\":
\"Configuration changed\", \"icon_emoji\": \":worried:\"}"
set port 443
config http-headers
edit 1
set key "Content-type"
set value "application/json"
next
end
next
end
4. Create the automation stitch:
config system automation-stitch
edit "Slack"
set trigger "Configuration Change"
config actions
edit 1
set action "send to Slack"
set required enable
next
end
next
end
Microsoft Teams integration webhook
A webhook can be created to post messages and notifications to Microsoft Teams.
In this example, a configuration change triggers the FortiGate to post a message to Teams.
To create a webhook automation stitch for Teams integration in the GUI:
1. Create an incoming webhook in Teams. See Create an incoming webhook for information.
2. Go to Security Fabric > Automation and click Create New.
3. Enter the stitch name.
4. Configure the trigger:
a. Click Add Trigger.
b. Select Configuration Change.
c. Click Apply.
5. Configure the action:
a. Click Add Action.
b. Click Create and select Webhook.
c. Enter the following:
FortiOS 7.6.2 Administration Guide 3702
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,702
|
Fortinet Security Fabric
Name send to Teams
Protocol HTTPS
URL Enter the incoming webhook URL created in Teams
Custom port Enable and enter 443
Method POST
HTTP body { \"text\": \"<message to send>\" }
HTTP header Content-type : application/json
d. Click OK.
e. Select the action in the list and click Apply.
6. Click OK.
To create a webhook automation stitch for Teams integration in the CLI:
1. Create an incoming webhook in Teams. See Create an incoming webhook for information.
2. Create the automation trigger:
config system automation-trigger
edit "Configuration Change"
set event-type config-change
next
end
3. Create the automation action:
config system automation-action
edit "send to Teams"
set action-type webhook
set protocol https
FortiOS 7.6.2 Administration Guide 3703
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,703
|
Fortinet Security Fabric
set uri
"outlook.office.com/webhook/XXXXXXXXXXXX/IncomingWebhook/XXXXXXXXXXXX/XXXXXXXXXXXX"
set http-body "{ \"text\": \"<message to send>\" }"
set port 443
config http-headers
edit 1
set key "Content-type"
set value "application/json"
next
end
next
end
4. Create the automation stitch:
config system automation-stitch
edit "Teams"
set trigger "Configuration Change"
config actions
edit 1
set action "send to Teams"
set required enable
next
end
next
end
For information about more advanced messages that can be configured and sent to the
Teams incoming webhook, see Sending messages to connectors and webhooks.
System actions
The system actions can be used to back up the configuration of the FortiGate, reboot the FortiGate, or shut down the
FortiGate.
These actions can occur even if the FortiGate is in conserve mode, and allows the automation stitch to bypass the CLI
user confirmation prompts, which the CLI script action does not support.
config system automation-action
edit "Backup Config Disk"
set action-type system-actions
set system-action backup-config
next
edit "Reboot FortiGate"
set action-type system-actions
set system-action reboot
next
edit "Shutdown FortiGate"
set action-type system-actions
set system-action shutdown
next
end
FortiOS 7.6.2 Administration Guide 3704
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,704
|
Fortinet Security Fabric
Example
In this example, an automation stitch is created that uses the Conserve Mode trigger, a Backup Config Disk action to
back up the configuration to the FortiGate's disk (see Configuration backups and reset on page 3427 for more details),
and then a Reboot FortiGate action. There is a 120-second delay between the two actions.
To configure an automation stitch with system actions in the GUI:
1. Go to Security Fabric > Automation, select the Stitch tab, and click Create New.
2. Enter the name, system-action-stitch.
3. Click Add Trigger. Select Conserve Mode and click Apply.
4. Click Add Action. Select Backup Config Disk and click Apply.
5. Click Add Action. Select Reboot FortiGate and click Apply.
6. Click Add delay (between the actions). Enter 120 and click OK.
7. Click OK.
To configure an automation stitch with system actions in the CLI:
1. Configure the trigger:
config system automation-trigger
edit "Conserve Mode"
set event-type low-memory
next
end
2. Configure the back up and reboot actions:
FortiOS 7.6.2 Administration Guide 3705
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,705
|
Fortinet Security Fabric
config system automation-action
edit "Backup Config Disk"
set description "Backup the configuration on disk."
set action-type system-actions
set system-action backup-config
next
edit "Reboot FortiGate"
set description "Reboot this FortiGate unit."
set action-type system-actions
set system-action reboot
set minimum-interval 300
next
end
3. Configure the stitch:
config system automation-stitch
edit "system-action-stitch"
set trigger "Conserve Mode"
config actions
edit 1
set action "Backup Config Disk"
set required enable
next
edit 2
set action "Reboot FortiGate"
set delay 120
set required enable
next
end
next
end
Verification
When the FortiGate enters conserve mode due to low memory, the automation stitch will be triggered and it will back up
the configuration to the FortiGate disk, then reboot the FortiGate.
To confirm that the stitch was triggered in the GUI:
1. Go to Security Fabric > Automation and select the Stitch tab.
2. Verify the Last Triggered column.
To confirm that the stitch was triggered in the CLI:
# diagnose test application autod 3
alert mail log count: 0
stitch: system-action-stitch
local hit: 1 relayed to: 0 relayed from: 0
last trigger:Thu Jun 23 11:31:25 2022
last relay:
actions:
Backup Config Disk:
done: 1 relayed to: 0 relayed from: 0
FortiOS 7.6.2 Administration Guide 3706
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,706
|
Fortinet Security Fabric
last trigger:Thu Jun 23 11:31:25 2022
last relay:
Reboot FortiGate:
done: 0 relayed to: 0 relayed from: 0
last trigger:Thu Jun 23 11:31:25 2022
last relay:
logid to stitch mapping:
id:22011 local hit: 1 relayed hits: 0
system-action-stitch
log category to stitch mapping:
To locate the backed up configuration in the GUI:
1. Click on the user name in the upper right-hand corner of the screen and select Configuration > Revisions.
2. Click the + in the table to expand and view more details.
To locate the backed up configuration in the CLI:
# execute revision list config
Last Firmware Version: V0.0.0-build000-REL0
1 2022-04-01 09:27:26 daemon_admin V7.2.0-build1157-REL0 Automatic backup
(upgrade)
2 2022-06-20 13:41:02 daemon_admin V7.2.1-build1254-REL0 Automatic backup
(upgrade)
3 2022-06-23 11:31:25 daemon_admin V7.2.1-build1254-REL0 Autod backup config
by stitch: system-action-stitch
Public and private SDN connectors
Cloud SDN connectors provide integration and orchestration of Fortinet products with public and private cloud solutions.
In a typical cloud environment, resources are dynamic and often provisioned and scaled on-demand. By using an SDN
connector, you can ensure that changes to cloud environment attributes are automatically updated in the Security
Fabric.
To protect the East-West or North-South traffic in these environments, the FortiGate uses the SDN connector to sync the
dynamic addresses that these volatile environments use. You can then configure the dynamic address objects as
sources or destinations for firewall policies. When you make changes to cloud environment resources, such as moving
them to a new location or assigning different IP addresses to them, you do not need to modify the policy in FortiOS, as
the SDN connector syncs changes to the cloud address objects.
These configurations consist of three primary steps:
1. Configure the cloud SDN connector to connect your FortiGate and public or private cloud account.
2. Create dynamic address objects to use the SDN connector. Use filters to sync only cloud address objects that you
require.
3. Apply the dynamic address objects to your firewall policy to protect your traffic.
FortiOS 7.6.2 Administration Guide 3707
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,707
|
Fortinet Security Fabric
This chapter explores the steps in detail and describes how to connect to each currently supported cloud platform. This
chapter does not discuss cloud account role-based or permission requirements. The respective cloud documents
contain this information.
The following external connectors are available in the Security Fabric:
Category Connector Example configuration
Public SDN
Amazon Web Services
(AWS)
AWS SDN connector using access keys on page 3715
Microsoft Azure Azure SDN connector using service principal on page 3721
Google Cloud Platform
(GCP)
GCP SDN connector using service account on page 3730
Oracle Cloud
Infrastructure (OCI)
OCI SDN connector using certificates on page 3755
IBM Cloud IBM Cloud SDN connector using API keys on page 3732
AliCloud AliCloud SDN connector using access key on page 3713
Private SDN
Kubernetes Kubernetes (K8s) SDN connectors on page 3735
VMware ESXi VMware ESXi SDN connector using server credentials on page 3764
VMware NSX VMware NSX-T Manager SDN connector using NSX-T Manager
credentials on page 3766
OpenStack (Horizon) OpenStack SDN connector using node credentials on page 3757
Application Centric
Infrastructure (ACI)
Cisco ACI SDN connector using a standalone connector on page
3723
Nuage Virtualized
Services Platform
Nuage SDN connector using server credentials on page 3751
Nutanix Nutanix SDN connector using server credentials on page 3753
SAP SAP SDN connector on page 3761
Endpoint/Identity
FSSO Agent on Windows
AD
Fortinet single sign-on agent on page 3777
Symantec Endpoint
Protection
Symantec endpoint connector on page 3779
Poll Active Directory
Server
Poll Active Directory server on page 3778
RADIUS Single Sign-On
Agent
RADIUS single sign-on agent on page 3786
FortiOS 7.6.2 Administration Guide 3708
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,708
|
Fortinet Security Fabric
Category Connector Example configuration
Exchange Server Exchange Server connector on page 3789
Threat Feeds
FortiGuard Category Threat feeds on page 3792
IP Address IP address threat feed on page 3807
Domain Name Domain name threat feed on page 3810
MAC Address MAC address threat feed on page 3812
Malware Hash Malware hash threat feed on page 3814
Generic Object Importer
Generic Address Generic connector for importing addresses on page 3829
If VDOMs are enabled, SDN and Threat Feeds connectors are in the global settings, and
Endpoint/Identity connectors are per VDOM.
Getting started with public and private SDN connectors
You can use SDN connectors to connect your FortiGate to public and private cloud solutions. By using an SDN
connector, you can ensure that changes to cloud environment attributes are automatically updated in the Security
Fabric. You can use SDN connector address objects to create policies that provide dynamic access control based on
cloud environment attribute changes. There is no need to manually reconfigure addresses and policies whenever
changes to the cloud environment occur.
There are four steps to creating and using an SDN connector:
1. Gather the required information. The required information depends on which public or private cloud solution
SDN connector you are configuring.
2. Creating the SDN connector on page 3709
3. Creating an SDN connector address on page 3710
4. Adding the address to a firewall policy on page 3712
The following provides general instructions for creating an SDN connector and using the dynamic address object in a
firewall policy. For instructions for specific public and private cloud solutions, see the relevant topic in this guide. For
advanced scenarios regarding SDN connectors, see the appropriate FortiOS 7.6 cloud platform guide.
Creating the SDN connector
To create an SDN connector in the GUI:
1. Go to Security Fabric > External Connectors.
2. Click Create New.
3. Click the desired public or private cloud.
4. Enter the Name, Status, and Update Interval for the connector.
FortiOS 7.6.2 Administration Guide 3709
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,709
|
Fortinet Security Fabric
5. Enter previously collected information for the connector as needed.
6. Click OK.
To create an SDN connector in the CLI:
config system sdn-connector
edit <name>
set status {enable | disable}
set type {connector type}
...
set update-interval <integer>
next
end
The available CLI commands vary depending on the selected SDN connector type.
Creating an SDN connector address
You can use an SDN connector address in the following ways:
l As the source or destination address for firewall policies.
l To automatically update changes to addresses in the public or private cloud environment, based on specified filters.
l To automatically apply changes to firewall policies that use the address, based on specified filters.
To create an SDN connector address in the GUI:
1. Go to Policy & Objects > Addresses and select Address.
2. Click Create new.
3. Configure the address:
a. Set the Type to Dynamic.
b. From the Sub Type dropdown list, select Fabric Connector Address.
c. From the SDN Connector dropdown list, select the desired SDN connector.
d. From the Filter dropdown list, configure the desired filter. The filters available depend on the selected SDN
connector type. The SDN connector automatically populates and updates IP addresses only for instances that
satisfy the filter requirements. In this example, the address will automatically populate and update IP addresses
only for AliCloud instances that belong to the specified security group:
FortiOS 7.6.2 Administration Guide 3710
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,710
|
Fortinet Security Fabric
You can set filtering conditions using multiple entries with AND ("&") or OR ("|"). When both AND and OR are
specified, AND is interpreted first, then OR.
e. Configure other settings as desired.
f. Click OK.
4. Ensure that the SDN connector resolves dynamic firewall IP addresses as configured:
a. Go to Policy & Objects > Addresses and select Address.
b. Hover over the address that you created to see a list of IP addresses for instances that satisfy the filter that you
configured. In this case, the IP addresses of instances that belong to the specified security group display:
To create an SDN connector address in the CLI:
1. Create the address:
config firewall address
edit <name>
set type dynamic
set sdn <sdn_connector>
set visibility enable
set associated-interface <interface_name>
set color <integer>
...
set comment <comment>
config tagging
edit <name>
set category <string>
set tags <strings>
next
end
next
end
FortiOS 7.6.2 Administration Guide 3711
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,711
|
Fortinet Security Fabric
2. Ensure that the SDN connector resolves dynamic firewall IP addresses as configured by running show. The
following shows example output:
config firewall address
edit "ali-address-security"
set type dynamic
config list
edit "10.0.0.16"
next
edit "10.0.0.17"
next
edit "10.0.20.20"
next
end
...
next
end
The available CLI commands vary depending on the selected SDN connector type.
Adding the address to a firewall policy
You can use an SDN connector address as the source or destination address in a policy.
To add the address to a firewall policy in the GUI:
1. Go to Policy & Objects > Firewall Policy.
2. Click Create New.
3. Use the SDN connector address as the source or destination address.
4. Configure the remaining settings as needed.
5. Click OK.
To add the address to a firewall policy in the CLI:
config firewall policy
edit 0
set name <name>
set srcintf <port_name>
set dstintf <port_name>
set srcaddr <firewall_address>
set dstaddr <firewall_address>
set action accept
set schedule <schedule>
set service <service>
next
end
FortiOS 7.6.2 Administration Guide 3712
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,712
|
Fortinet Security Fabric
Connector tooltips
In Security Fabric > External Connectors, hover over an SDN connector to view a tooltip that shows basic configuration
information.
Three buttons provide additional information:
Button Information
View Connector Objects Connector's dynamic objects, such as filters and instances.
View Policies List of policies that use the dynamic addresses from the connector.
View Automation Rules List of automation actions that use the connector.
AliCloud SDN connector using access key
FortiOS automatically updates dynamic addresses for AliCloud using an AliCloud SDN connector, including mapping the
following attributes from AliCloud instances to dynamic address groups in FortiOS:
l ImageId
l InstanceId
l SecurityGroupId
l VpcId
l VSwitchId
l TagKey
l TagValue
To configure AliCloud SDN connector using the GUI:
1. Configure the AliCloud SDN connector:
a. Go to Security Fabric > External Connectors.
b. Click Create New, and select AliCloud.
c. Configure as shown, substituting the access key, secret, and region ID for your deployment. The update
FortiOS 7.6.2 Administration Guide 3713
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,713
|
Fortinet Security Fabric
interval is in seconds.
2. Create a dynamic firewall address for the configured AliCloud SDN connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. Configure the address as shown, selecting the desired filter in the Filter dropdown list. In this example, the
address will automatically populate and update IP addresses only for AliCloud instances that belong to the
specified security group:
3. Ensure that the AliCloud SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses and select Address.
b. Hover over the address created in step 2 to see a list of IP addresses for instances that belong to the security
group configured in step 2:
FortiOS 7.6.2 Administration Guide 3714
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,714
|
Fortinet Security Fabric
To configure AliCloud SDN connector using CLI commands:
1. Configure the AliCloud SDN connector:
config system sdn-connector
edit "ali1"
set type acs
set access-key "LTAIKmERWEuEOChg"
set secret-key xxxxx
set region "us-west-1"
set update-interval 30
next
end
2. Create a dynamic firewall address for the configured AliCloud SDN connector with the supported AliCloud filter. In
this example, the AliCloud SDN Connector will automatically populate and update IP addresses only for instances
that belong to the specified security group:
config firewall address
edit "ali-address-security"
set type dynamic
set sdn "ali1"
set filter "SecurityGroupId=sg-rj9bp5ax5kwy3gqdizqb"
next
end
3. Confirm that the AliCloud SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "ali-address-security"
set type dynamic
set sdn "ali1"
set filter "SecurityGroupId=sg-rj9bp5ax5kwy3gqdizqb"
config list
edit "10.0.0.16"
next
edit "10.0.0.17"
next
edit "10.0.0.20"
next
end
next
end
AWS SDN connector using access keys
FortiOS automatically updates dynamic addresses for AWS using an AWS SDN connector, including mapping attributes
from AWS instances to dynamic address groups in FortiOS.
Configuring the SDN connector using the GUI, then checking the configuration using the CLI is recommended.
To configure an AWS SDN connector using the GUI:
1. Configure the AWS SDN connector:
a. Go to Security Fabric > External Connectors.
b. Click Create New, and select Amazon Web Services (AWS).
c. In the Access key ID field, enter the key created in the AWS management portal.
FortiOS 7.6.2 Administration Guide 3715
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,715
|
Fortinet Security Fabric
d. In the Secret access key field, enter the secret access key accompanying the above access key.
e. In the Region name field, enter the region name. Refer to AWS service endpoints for the desired region name.
f. If desired, enable VPC ID. In the VPC ID field, enter the VPC ID within the specified region you desire to cover
with the SDN connector.
g. Click OK.
2. Check the configuration using the CLI:
config system sdn-connector
edit "<connector-name>"
show
The output resembles the following:
config system sdn-connector
edit "<connector-name>"
set access-key "<example-access-key>"
set secret-key ENC <example-secret-key>
set region "us-west-2"
set vpc-id "vpc-e1e4b587"
set update-interval 1
next
end
If you see that the SDN connector is disabled in Security Fabric > External Connectors in the GUI, run the following
commands to enable the SDN connector:
diagnose debug application awsd -1
diagnose debug enable
The output may display an error like the following:
FGT # awsd sdn connector AWS_SDN prepare to update
awsd sdn connector AWS_SDN start updating
aws curl response err, 403
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>UnauthorizedOperation</Code><Message>You are not
authorized to perform this
operation.</Message></Error></Errors><RequestID>8403cc11-b185-41da-ad6d23bb4db7d00a</RequestID></Response>
awsd curl failed 403
awsd sdn connector AWS_SDN failed to get instance list
aws curl response err, 403
{"Message":"User: arn:aws:iam::956224459807:user/jcarcavallo is not authorized to
perform: eks:ListClusters on resource: arn:aws:eks:us-east1:956224459807:cluster/*"}
awsd sdn connector AWS_SDN get EKS cluster list failed
awsd sdn connector AWS_SDN list EKS cluster failed
awsd sdn connector AWS_SDN start updating IP addresses
awsd sdn connector AWS_SDN finish updating IP addresses
awsd reap child pid: 569
In this case, you must configure power user access for the current administrator in the AWS management console:
FortiOS 7.6.2 Administration Guide 3716
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,716
|
Fortinet Security Fabric
After configuring power user access, run the following commands:
diagnose debug application awsd -1
diagnose debug enable
The output should display without error, as follows:
FGT # AWSD: update sdn connector AWS_SDN status to enabled
awsd sdn connector AWS_SDN prepare to update
awsd sdn connector AWS_SDN start updating
awsd get ec2 instance info successfully
awsd sdn connector AWS_SDN start updating IP addresses
awsd sdn connector AWS_SDN finish updating IP addresses
awsd reap child pid: 893
The AWS connector is now enabled.
3. Create a dynamic firewall address for the configured AWS SDN connector:
a. Go to Policy & Objects > Addresses.
b. Click Create New, then select Address.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the AWS connector that you created.
FortiOS 7.6.2 Administration Guide 3717
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,717
|
Fortinet Security Fabric
f. In the Filter field, add the desired filters. The following filters are supported:
Description Key Example value
Architecture architecture x86
Autoscaling group AutoScaleGroup 10703c-4f731e90-fortigatepayg-auto-scaling-group
AZ placement.availabilityzone us-east-1a
Endpoint DNS name EndpointDNSName vpce-06795...
This filter spports the following
ENI IP address types:
l API gateway private
endpoint
l VPC endpoint for data API
for Aurora
l AWS PrivateLink for S3
l VPC endpoints for
Lamdba
Group name placement.groupname
Image ID imageId ami-123456
Instance ID instanceId i-12345678
Instance type instanceType t2.micro
Key name keyName
Kubernetes (K8s) cluster k8s_cluster
K8s label and its name k8s_label.Name
K8s namespace k8s_namespace
K8s node name k8s_nodename
K8s pod name k8s_podname
K8s region k8s_region
K8s service name k8s_servicename
K8s zone k8s_zone
Private DNS name privateDnsName ip-172-31-10-211.us-west2.compute.internal
Public DNS name publicDnsName ec2-54-202-168-254.us-west2.compute.amazonaws.com
Security group ID SecurityGroupId
Subnet ID subnetId sub-123456
Tag and its name. This key supports tag.Name
FortiOS 7.6.2 Administration Guide 3718
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,718
|
Fortinet Security Fabric
Description Key Example value
a maximum of eight tags.
Tenancy placement placement.tenancy
VPC ID VpcId
4. Ensure that the AWS SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address that you created to see a list of IP addresses for instances that belong to the configured
security group. The following is an example for a public SDN address type:
The following is an example for a private SDN address type:
To configure AWS SDN connector using CLI commands:
1. Configure the AWS connector:
config system sdn-connector
edit "<connector-name>"
set access-key "<example-access-key>"
set secret-key ENC <example-secret-key>
set region "us-west-2"
set vpc-id "vpc-e1e4b587"
set update-interval 1
next
end
2. Create a dynamic firewall address for the configured AWS SDN connector with the supported filter:
config firewall address
edit "aws-ec2"
FortiOS 7.6.2 Administration Guide 3719
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,719
|
Fortinet Security Fabric
set type dynamic
set sdn "<connector-name>"
set filter "SecurityGroupId=sg-05f4749cf84267548"
set sdn-addr-type public
next
edit "aws-eks1"
set type dynamic
set sdn "<connector-name>"
set filter "K8S_Region=us-west-2"
next
end
3. Confirm that the AWS SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "aws-ec2"
set type dynamic
set sdn "<connector-name>"
set filter "SecurityGroupId=sg-05f4749cf84267548"
set sdn-addr-type public
config list
edit "34.222.246.198"
next
edit "54.188.139.177"
next
edit "54.218.229.229"
next
end
next
edit "aws-eks1"
set type dynamic
set sdn "<connector-name>"
set filter "K8S_Region=us-west-2"
config list
edit "192.168.114.197"
next
edit "192.168.167.20"
next
edit "192.168.180.72"
next
edit "192.168.181.186"
next
edit "192.168.210.107"
next
end
next
end
To add an EC2 instance to test automatic address population:
1. Assume that you want to boot up another instance with an IP address of 34.222.246.178, which is currently
stopped. This instance belongs to the security group that the aws-ec2 address is filtering for. In the AWS
management portal, start the instance.
2. Verify that the instance is running.
3. At this point, running show again shows the SDN connector has automatically populated and added the
34.222.246.178 instance:
config firewall address
FortiOS 7.6.2 Administration Guide 3720
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,720
|
Fortinet Security Fabric
edit "aws-ec2"
set type dynamic
set sdn "<connector-name>"
set filter "SecurityGroupId=sg-05f4749cf84267548"
set sdn-addr-type public
config list
edit "34.222.246.198"
next
edit "54.188.139.177"
next
edit "54.218.229.229"
next
edit "34.222.246.178"
next
end
next
end
Therefore, administrators do not need to add this instance to the address manually. When you apply a firewall policy
to this address, the policy automatically covers 34.222.246.178.
Azure SDN connector using service principal
FortiOS automatically updates dynamic addresses for Azure using Azure SDN connector, including mapping attributes
from Azure instances to dynamic address groups in FortiOS.
To configure the Azure SDN connector using service principal:
1. Create an Azure SDN connector:
a. Go to Security Fabric > External Connectors and click Create New.
b. Select Microsoft Azure.
c. Configure the connector. See Azure SDN connector service principal configuration requirements:
d. Click OK.
FortiOS 7.6.2 Administration Guide 3721
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,721
|
Fortinet Security Fabric
2. Create a dynamic firewall address for the Azure connector.
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the Azure SDN connector.
f. In the Filter field, add filters as desired. The Azure SDN connector supports the following filters:
l vm=<VM name>
l securitygroup=<nsg id>
l vnet=<VNet id>
l subnet=<subnet id>
l vmss=<VM scale set>
l tag.<key>=<value>
l servicetag=<value>
l tag.<key>=<value>
g. Click OK.
h. Hover the cursor over the address name to see the dynamic IP addresses that the connector resolves.
Configuring SDN connector proxy via FortiManager
FortiOS Azure SDN connector API calls can be relayed through a FortiManager proxy. FortiManager 7.6 supports this
feature. This is recommended for large-scale deployments.
To configure Azure SDN connector relay through FortiManager support:
1. Configure the FortiManager:
a. Provision an FMG_VM64_AZURE 7.6 instance in Azure. See Creating a FortiManager-VM.
b. License the FortiManager instance. See Connecting to FortiManager.
c. In FortiManager, go to System Settings > Administrators.
d. Create a new administrator or edit an existing one.
e. For JSON API Access, select Read-Write.
f. Configure other fields as desired, then click OK.
2. Provision a FGT_VM64_AZURE pay as you go instance in Azure.
3. Configure the FortiManager proxy in the CLI:
config system sdn-proxy
edit "FMG_proxy"
set type fortimanager
set server "fmg.labs.ca"
set server-port 443
set username "admin"
set password "-=redacted=-"
next
end
FortiOS 7.6.2 Administration Guide 3722
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,722
|
Fortinet Security Fabric
4. Configure two SDN connectors:
config system sdn-connector
edit "FMG_proxy"
set type azure
set proxy "FMG_proxy"
set use-metadata-iam disable
set tenant-id "<tenant ID>"
set client-id "<client ID>"
set client-secret "-=redacted=-"
set subscription-id "<subscription ID>"
set resource-group "<resource group >"
next
end
config firewall address
edit "FMG_proxy"
set type dynamic
set sdn "FMG_proxy"
set filter "Vnet=VNET0"
set sdn-addr-type all
next
end
config system sdn-connector
edit "AZURE"
set type azure
set use-metadata-iam disable
set tenant-id "<tenant ID>"
set client-id "<client ID>"
set client-secret "-=redacted=-"
set subscription-id "<subscription ID>"
set resource-group "<resource group >"
next
end
config firewall address
edit "AZURE"
set type dynamic
set sdn "AZURE"
set filter "Vnet=VNET0"
set sdn-addr-type all
next
end
5. Go to Security Fabric > External Connectors and confirm that the connectors were created.
6. Compare the resolved IP address list between the FMG_proxy and AZURE connectors and verify that the list is
complete.
Cisco ACI SDN connector using a standalone connector
You can use Cisco ACI (Application Centric Infrastructure) SDN connectors in dynamic firewall addresses.
The Fortinet SDN Connector for Cisco ACI and Nuage Networks is a standalone connector that connects to SDN
controllers within Cisco ACI and Nuage Networks. You must configure a connection to the Fortinet SDN connector in
FortiOS to query the dynamic addresses.
FortiOS 7.6.2 Administration Guide 3723
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,723
|
Fortinet Security Fabric
To configure a Cisco ACI connector in the GUI:
1. Create the Cisco ACI SDN connector:
a. Go to Security Fabric > External Connectors and click Create New.
b. In the Private SDN section, click Application Centric Infrastructure (ACI).
c. In the Cisco ACI Connector section, for Type, select FortiSDN Connector and configure the remaining settings
as needed.
d. Click OK.
2. Create the dynamic firewall address for the connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. Configure the following settings:
i. For Type, select Dynamic.
ii. For Sub Type, select Fabric Connector Address.
iii. For SDN Connector, select the first ACI connector.
iv. Configure the remaining settings as needed.
d. Click OK.
FortiOS 7.6.2 Administration Guide 3724
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,724
|
Fortinet Security Fabric
To verify the dynamic firewall IPs are resolved by the SDN connector in the GUI:
1. Go to Policy & Objects > Addresses and select Address.
2. In the address table, hover over the address to view which IPs it resolves to.
To configure a Cisco ACI connector in the CLI:
1. Create the SDN connector:
config system sdn-connector
edit "aci1"
set type aci
set server "172.18.64.31"
set username "admin"
set password xxxxxxx
next
end
2. Create the dynamic firewall address for the connector:
config firewall address
edit "aci-address1"
set type dynamic
set sdn "aci1"
set color 17
set tenant "wqdai-ten"
set epg-name "EPG-in"
set sdn-tag "fffff"
next
end
To verify the dynamic firewall IPs are resolved by the SDN connector in the CLI:
# diagnose firewall dynamic list
List all dynamic addresses:
aci1.aci.wqdai-ten.EPG-in.fffff: ID(171)
ADDR(192.168.100.20)
Retrieve IPv6 dynamic addresses from Cisco ACI SDN connector
IPv6 dynamic addresses can be retrieved from Cisco ACI SDN connectors. IPv6 addresses imported from Cisco ACI to
the Fortinet SDN Connector VM can be imported into the FortiGate as IPv6 dynamic addresses. The Fortinet SDN
Connector VM must be running version 1.1.10 or later.
config firewall address6
edit <name>
set type dynamic
set sdn <ACI_connector>
next
end
The following example assumes the Fortinet SDN Connector VM has already connected to Cisco ACI and learned the
IPv6 addresses. See Configuring the SDN Connector in the Cisco ACI Administration Guide for more information. The
Dynamic Address List values for the DN with the filter tn-Fortinet/ap-ApplicationProfile/epg-App1 is used in this example.
FortiOS 7.6.2 Administration Guide 3725
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,725
|
Fortinet Security Fabric
To configure the Cisco ACI connector and dynamic address:
1. Configure the Cisco ACI SDN connector:
config system sdn-connector
edit "aci_64.115_115"
set type aci
set server-list "10.6.30.115"
set server-port 5671
set username "admin"
set password xxxxxxx
next
end
2. Verify that the SDN connector status is up:
# diagnose sys sdn status "aci_64.115_115"
SDN Connector Type Status
-------------------------------------------------------------
aci_64.115_115 aci Up
3. Configure the IPv6 dynamic firewall address (filters for tenant and endpoint group are used in this example):
config firewall address6
edit "aci-add6-App1"
set type dynamic
set sdn "aci_64.115_115"
set color 17
set tenant "Fortinet"
set epg-name "App1"
next
end
4. Verify the list of resolved IPv6 addresses:
# diagnose firewall dynamic6 list "aci-add6-App1"
aci_64.115_115.aci.Fortinet.App1.*: ID(220)
ADDR(2001:cafe:654e:7d1:df4a:5f7c:3ab2:361a)
ADDR(2001:cafe:da3:69c3:4136:eb69:90ea:9481)
FortiOS 7.6.2 Administration Guide 3726
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,726
|
Fortinet Security Fabric
ADDR(2001:cafe:b9a7:793a:abc4:9c29:385b:6e11)
ADDR(2001:cafe:1880:e8d5:21af:4837:854:603c)
ADDR(2001:cafe:f00f:8d5b:f4f9:ab2c:98fe:32c0)
ClearPass endpoint connector via FortiManager
ClearPass Policy Manager (CPPM) is a network access system that can send information about authenticated users to
third party systems, such as a FortiGate or FortiManager.
In this example, communications are established between CPPM and FortiManager, and then the FortiManager
forwards information to a managed FortiGate. On the FortiGate, the user information can be used in firewall policies and
added to FSSO dynamic addresses.
Configure the FortiManager
Establish communications between FortiManager and CPPM so that FortiManager can synchronize CPPM user groups.
See Creating a ClearPass connector in the FortiManager Administration Guide.
FortiManager forwards the group information to managed FortiGates.
Adding CPPM FSSO user groups to a local user group
To add CPPM user groups to a local user group in the GUI:
1. On the FortiGate, go to User & Authentication > User Groups.
2. Click Create New.
3. Enter a name for the group and set Type to Fortinet Single Sign-On (FSSO).
4. Click the Members field, and add one or more FSSO groups.
FSSO groups can come from multiple sources; CPPM FSSO groups are prefixed with cp_ and are listed under the
FortiManager heading.
FortiOS 7.6.2 Administration Guide 3727
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,727
|
Fortinet Security Fabric
5. Click OK.
To add CPPM user groups to a local user group in the CLI:
config user group
edit fsso-group
set group-type fsso-service
set member "cp_test_[Employee]" "cp_test_FSSOROLE"
next
end
Using the local FSSO user group in a firewall policy
To add the local FSSO user group to a firewall policy in the GUI:
1. Go to Policy & Objects > Firewall Policy.
2. Create a new policy, or edit an existing one.
FortiOS 7.6.2 Administration Guide 3728
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,728
|
Fortinet Security Fabric
3. Click in the Source field and add the fsso-group user group.
CPPM user groups can also be added directly to the policy.
4. Click OK.
To add the local FSSO user group to a firewall policy in the CLI:
config firewall policy
edit 1
set name "pol1"
set srcintf "port2"
set dstintf "port3"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
set groups "fsso-group"
set nat enable
next
end
Verification
To verify that a user was added to the FSSO list on the FortiGate:
1. Log on to the client and authenticate with CPPM.
After successful authentication, the user is added to the FSSO list on the FortiGate.
2. On the FortiGate, go to Dashboard > Assets & Identities and look at the Firewall Users widget to verify that the user
was added.
The user group cp_test_FSSOROLE is listed separately because the user is a member of that group on the CPPM.
FortiOS 7.6.2 Administration Guide 3729
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,729
|
Fortinet Security Fabric
To verify that traffic can pass the firewall:
1. Log on to the client and browse to an external website.
2. On the FortiGate, go to Dashboard > FortiView Sources.
3. Double-click on the user and select the Destinations tab to verify that traffic is being passed by the firewall.
To verify the user address groups:
show user adgrp
config user adgrp
edit "cp_test_FSSOROLE"
set server-name "FortiManager"
next
edit "cp_test_[AirGroup v1]"
set server-name "FortiManager"
next
edit "cp_test_[AirGroup v2]"
set server-name "FortiManager"
next
edit "cp_test_[Aruba TACACS read-only Admin]"
set server-name "FortiManager"
next
edit "cp_test_[Aruba TACACS root Admin]"
set server-name "FortiManager"
next
edit "cp_test_[BYOD Operator]"
set server-name "FortiManager"
next
edit "cp_test_[Contractor]"
set server-name "FortiManager"
next
edit "cp_test_[Device Registration]"
set server-name "FortiManager"
next
...
edit "CN=group1,OU=Testing,DC=Fortinet-FSSO,DC=COM"
set server-name "Local FSSO Agent" <----- !!!
next
end
GCP SDN connector using service account
FortiOS automatically updates dynamic addresses for GCP using a GCP SDN connector, including mapping attributes
from GCP instances to dynamic address groups in FortiOS.
To configure GCP connector using the GUI:
1. In FortiOS, go to Security Fabric > External Connectors.
2. Click Create New, and select Google Cloud Platform (GCP).
Note you can create only one SDN Connector per connector type. For example, you can create one entry for GCP.
FortiOS 7.6.2 Administration Guide 3730
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,730
|
Fortinet Security Fabric
3. Configure the connector as follows:
a. Project name: Enter the name of the GCP project. The VMs whose IP addresses you want to populate should
be running within this project.
b. Service account email: Enter the email address associated with the service account that will call APIs to the
GCP project specified above.
c. Private key: Enter the private key statement as shown in the text box. For details, see Creating a GCP service
account.
Once the connector is successfully configured, a green indicator appears at the bottom right corner. If the indicator
is red, the connector is not working. See Troubleshooting GCP SDN Connector.
4. Create a dynamic firewall address for the configured GCP SDN connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. Configure the address:
i. Name: Enter the desired name.
ii. Type: Select Dynamic.
iii. Fabric Connector Type: Select Google Cloud Platform (GCP).
iv. Filter: The SDN connector automatically populates and updates only instances that match this filtering
condition. Currently GCP supports the following filters:
l id=<instance id> : This matches an VM instance ID.
l name=<instance name> : This matches a VM instance name.
l zone=<gcp zones> : This matches a zone name.
l network=<gcp network name> : This matches a network name.
l subnet=<gcp subnet name> : This matches a subnet name.
l tag=<gcp network tags> : This matches a network tag.
l label.<gcp label key>=<gcp label value> : This matches a free form GCP label key and
its value.
In the example, the filter is set as 'network=default & zone=us-central-1f’. This configuration
populates all IP addresses that belong to the default network in the zone us-central-1f.
FortiOS 7.6.2 Administration Guide 3731
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,731
|
Fortinet Security Fabric
You can set filtering conditions using multiple entries with AND ("&") or OR ("|"). When both AND and OR
are specified, AND is interpreted first, then OR.
Note that wildcards (such as the asterisk) are not allowed in filter values.
v. Click OK.
The address has been created. Wait for a few minutes before the setting takes effect. You will know that the
address is in effect when the exclamation mark disappears from the address entry. When you hover over the
address, you can see the list of populated IP addresses.
If the exclamation mark does not disappear, check the address settings.
IBM Cloud SDN connector using API keys
FortiOS can automatically update dynamic addresses for IBM Cloud using an SDN connector. For information on
creating and managing the API key, see the IBM Cloud documentation.
In 7.6.2, you do not need to specify the generation of IBM Compute Generation.
To configure an IBM Cloud SDN connector using the GUI:
1. Create an SDN connector:
a. Go to Security Fabric > External Connectors.
b. Click Create New, then select IBM Cloud.
c. In the Name field, enter the desired connector name.
FortiOS 7.6.2 Administration Guide 3732
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,732
|
Fortinet Security Fabric
d. For Status, select Enabled.
e. For Update interval, configure the desired update interval for dynamic object updates.
f. From the Region dropdown list, select the IBM Cloud region.
g. In the API key field, enter the IBM Cloud API key.
h. Click OK.
2. Create dynamic firewall addresses for the configured connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the IBM SDN connector.
f. In the Filter field, add the desired filters. The following filters are supported:
l <InstanceId>
l <InstanceName>
l <ImageId>
l <ImageName>
l <Architecture>
l <Profile>
l <Vpc>
l <Zone>
l <Subnet>
l <ResourceGroup>
FortiOS 7.6.2 Administration Guide 3733
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,733
|
Fortinet Security Fabric
g. Click OK.
3. Ensure that the connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the addresses created in step 2 to see a list of IP addresses that the connector has resolved:
To configure an IBM Cloud SDN connector using the CLI:
1. Create SDN connector:
config system sdn-connector
edit "ibm"
set status enable
set type ibm
set api-key xxxxxx
set ibm-region us-south
set update-interval 60
next
end
2. Create dynamic firewall addresses for the configured connector:
config firewall address
edit "ibm_add"
set type dynamic
set sdn "ibm"
set color 19
set filter "Vpc=alex-vpc1"
next
end
3. Ensure that the connector resolves dynamic firewall IP addresses:
# show firewall address ibm_add
config firewall address
edit "ibm_gen1_add"
set uuid 586841c4-7f46-51ea-dc66-dbf840af03d3
set type dynamic
set sdn "ibm"
set color 19
set filter "Vpc=alex-vpc1"
config list
FortiOS 7.6.2 Administration Guide 3734
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,734
|
Fortinet Security Fabric
edit "10.240.0.49"
next
edit "10.240.0.75"
next
edit "169.61.227.88"
next
edit "52.117.170.31"
next
end
next
end
Kubernetes (K8s) SDN connectors
The following topics provide information about configuring Kubernetes SDN connectors:
l AliCloud Kubernetes SDN connector using access key on page 3735
l EKS SDN connector using access key on page 3737
l Azure Kubernetes (AKS) SDN connector using client secret on page 3740
l GCP Kubernetes (GKE) SDN connector using service account on page 3742
l Oracle Kubernetes (OKE) SDN connector using certificates on page 3745
l Private cloud K8s SDN connector using secret token on page 3747
AliCloud Kubernetes SDN connector using access key
When an AliCloud SDN connector is configured, dynamic address objects can support Kubernetes filters based on
cluster, service, node, pod, and more.
The following address filters can be applied:
l K8S_Cluster
l K8S_Namespace
l K8S_ServiceName
l K8S_NodeName
l K8S_PodName
l K8S_Region
l K8S_Zone
l K8S_Label
To configure an AliCloud SDN connector with a Kubernetes filter in the GUI:
1. Configure the AliCloud SDN connector:
a. Go to Security Fabric > External Connectors.
b. Click Create New, and select AliCloud.
FortiOS 7.6.2 Administration Guide 3735
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,735
|
Fortinet Security Fabric
c. Configure the settings as needed and click OK.
2. Create a dynamic firewall address with the supported Kubernetes filter:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new and enter a name.
c. Configure the following settings:
i. For Type, select Dynamic.
ii. For Sub Type, select Fabric Connector Address.
iii. For SDN Connector, select the connector created in step 1.
iv. For SDN address type, select Private.
v. For Filter, select K8S_Cluster=zhmcluster.
d. Click OK.
The corresponding IP addresses are dynamically updated and resolved after applying the Kubernetes filter.
3. Confirm that the AliCloud SDN connector resolves dynamic firewall IP addresses using the configured filter:
a. Go to Policy & Objects > Addresses and select Address.
b. In the address table, hover over the address created in step 2 to view which IPs it resolves to:
FortiOS 7.6.2 Administration Guide 3736
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,736
|
Fortinet Security Fabric
To configure an AliCloud SDN connector with a Kubernetes filter in the CLI:
1. Configure the AliCloud SDN connector:
config system sdn-connector
edit "ali1"
set type alicloud
set access-key "****************"
set secret-key xxxxxxxx
set region "us-west-1"
next
end
2. Create a dynamic firewall address with the supported Kubernetes filter:
config firewall address
edit "ali_add1"
set type dynamic
set sdn "ali1"
set color 10
set filter "K8S_Cluster=zhmcluster1"
next
end
3. Confirm that the AliCloud SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "ali_add1"
show
config firewall address
edit "ali_add1"
set uuid c48e4f00-5435-51eb-0547-aced5cf80f1f
set type dynamic
set sdn "ali1"
set color 10
set filter "K8S_Cluster=zhmcluster1"
config list
edit "10.0.0.28"
next
edit "10.0.0.29"
next
edit "10.0.0.30"
next
...
end
next
end
next
end
EKS SDN connector using access key
AWS SDN connectors support dynamic address groups based on AWS Kubernetes (EKS) filters.
FortiOS 7.6.2 Administration Guide 3737
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,737
|
Fortinet Security Fabric
If there is an authorization issue with the dynamic address resolution of Kubernetes (K8s) IP
addresses and/or the K8s dynamic addresses fail to display, confirm that you have set the
correct Identity & Access Management permissions or role assignments. For more
information, see How do I provide access to other IAM users and roles after cluster creation in
Amazon EKS?.
To enable an AWS SDN connector to fetch IP addresses from EKS:
1. Go to Security Fabric > External Connectors. Click Create New, then select Amazon Web Services (AWS).
Configure the SDN connector as desired. See AWS SDN connector using access keys on page 3715.
2. Go to Policies & Objects > Addresses and select Address.
3. Click Create new to create a dynamic firewall address for the configured SDN connector using the supported K8s
filter.
4. From the Type dropdown list, select Dynamic.
5. From the Sub Type dropdown list, select Fabric Connector Address.
6. From the SDN Connector dropdown list, select the desired SDN connector.
7. In the Filter field, add the desired filters. The following filters are supported:
Filter Description
k8s_cluster Name of K8s cluster.
k8s_namespace Namespace of a K8s service or pod.
k8s_svcname Name of a K8s service.
k8s_nodename Name of a K8s node.
k8s_zone Zone of a K8s node.
k8s_region Region of a Kubernetes node.
k8s_podname Name of a Kubernetes pod.
k8s_label.xxx Name of label of a Kubernetes resource (cluster/service/node/pod).
FortiOS 7.6.2 Administration Guide 3738
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,738
|
Fortinet Security Fabric
8. Configure the rest of the settings, then click OK.
9. Ensure that the SDN connector resolves the dynamic firewall address IP addresses by going to Policy & Objects >
Addresses and hovering over the newly created address.
To configure an EKS SDN connector through the CLI:
1. Configure the SDN connector:
config system sdn-connector
edit "aws1"
set type aws
set access-key "AKIAIJNKE75ANVN5AEQA"
set secret-key xxxxx
set region "us-west-2"
set update-interval 30
next
end
2. Create a dynamic firewall address for the SDN connector with a supported Kubernetes filter:
config firewall address
edit "aws-pod"
set type dynamic
set sdn "aws1"
set filter "K8S_PodName=aws-node-g6zhx"
next
end
The SDN connector resolves the dynamic firewall address IP address:
config firewall address
edit "aws-pod"
set type dynamic
set sdn "aws1"
FortiOS 7.6.2 Administration Guide 3739
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,739
|
Fortinet Security Fabric
set filter "K8S_PodName=aws-node-g6zhx"
config list
edit "192.168.114.197"
next
end
next
end
Azure Kubernetes (AKS) SDN connector using client secret
Azure SDN connectors support dynamic address groups based on Azure Kubernetes (AKS) filters.
To enable an Azure SDN connector to fetch IP addresses from Azure Kubernetes:
1. Configure the Azure SDN connector:
a. Go to Security Fabric > External Connectors.
b. Click Create New, and select Azure.
c. Configure as shown substituting the region, tenant and client IDs, and client secret for your deployment. See
Azure SDN connector service principal configuration requirements.
2. Create a dynamic firewall address for the configured K8s SDN connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the desired SDN connector.
f. In the Filter field, add the desired filter. The following filters are supported:
Filter Description
k8s_cluster Name of Kubernetes cluster.
k8s_namespace Namespace of a Kubernetes service or pod.
FortiOS 7.6.2 Administration Guide 3740
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,740
|
Fortinet Security Fabric
Filter Description
k8s_svcname Name of a Kubernetes service.
k8s_nodename Name of a Kubernetes node.
k8s_zone Zone of a Kubernetes node.
k8s_region Region of a Kubernetes node.
k8s_podname Name of a Kubernetes pod.
k8s_label.xxx Name of label of a Kubernetes resource (cluster/service/node/pod).
In this example, the address is configured to automatically populate and update IP addresses only for
instances that belong to the zhmKC cluster:
3. Ensure that the K8s SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address created in step 2 to see a list of IP addresses for instances that belong to the
zhmKC cluster as configured in step 2:
FortiOS 7.6.2 Administration Guide 3741
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,741
|
Fortinet Security Fabric
To configure an Azure Kubernetes SDN connector through the CLI:
1. Configure the SDN connector:
config system sdn-connector
edit "azure1"
set type azure
set tenant-id "942b80cd-1b14-42a1-8dcf-4b21dece61ba"
set client-id "14dbd5c5-307e-4ea4-8133-68738141feb1"
set client-secret xxxxx
set update-interval 30
next
end
2. Create a dynamic firewall address for the SDN connector with a supported Kubernetes filter. In this example, the
address will automatically populate and update IP addresses only for instances that belong to the zhmKC cluster:
config firewall address
edit "az-k8s-cluster"
set type dynamic
set sdn "azure1"
set filter "K8S_Cluster=zhmKC"
next
end
3. Confirm that the Azure SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "az-k8s-cluster"
set type dynamic
set sdn "azure1"
set filter "K8S_Cluster=zhmKC"
config list
edit "10.240.0.4"
next
edit "10.240.0.5"
next
edit "10.244.0.10"
next
end
next
end
GCP Kubernetes (GKE) SDN connector using service account
Google Cloud Platform (GCP) SDN connectors support dynamic address groups based on GCP Kubernetes Engine
(GKE) filters.
FortiOS 7.6.2 Administration Guide 3742
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,742
|
Fortinet Security Fabric
To enable a GCP SDN connector to fetch IP addresses from GKE:
1. Go to Security Fabric > External Connectors, and configure an SDN connector for GCP.
2. Go to Policies & Objects > Addresses and create a dynamic firewall address for the configured SDN connector
using the supported Kubernetes filter.
3. To filter out the Kubernetes IP addresses, select the address filter or filters. The following filters are supported:
Filter Description
k8s_cluster Name of Kubernetes cluster.
k8s_namespace Namespace of a Kubernetes service or pod.
k8s_svcname Name of a Kubernetes service.
k8s_nodename Name of a Kubernetes node.
k8s_zone Zone of a Kubernetes node.
k8s_region Region of a Kubernetes node.
k8s_podname Name of a Kubernetes pod.
k8s_label.xxx Name of label of a Kubernetes resource (cluster/service/node/Pod).
In this example, the GCP SDN connector will automatically populate and update IP addresses only for instances
that belong to the zhm-kc3 cluster:
FortiOS 7.6.2 Administration Guide 3743
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,743
|
Fortinet Security Fabric
4. Configure the rest of the settings, then click OK.
The dynamic firewall address IP is resolved by the SDN connector.
To configure a GCP Kubernetes SDN connector through the CLI:
1. Configure an SDN connector for Kubernetes:
config system sdn-connector
edit "gcp1"
set type gcp
set gcp-project "dev-project-001-166400"
set service-account "966517025500-compute@developer.gserviceaccount.com"
set update-interval 30
next
end
2. Create a dynamic firewall address for the SDN connector with a supported Kubernetes filter:
config firewall address
edit "gcp-k8s-cluster"
set type dynamic
set sdn "gcp1"
FortiOS 7.6.2 Administration Guide 3744
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,744
|
Fortinet Security Fabric
set filter "K8S_Cluster=zhm-kc3"
next
end
The dynamic firewall address IP is resolved by the SDN connector:
config firewall address
edit "gcp-k8s-cluster"
set type dynamic
set sdn "gcp1"
set filter "K8S_Cluster=zhm-kc3"
config list
edit "10.0.2.4"
next
edit "10.0.2.7"
next
edit "10.28.0.13"
next
end
next
end
Oracle Kubernetes (OKE) SDN connector using certificates
OCI SDN connectors support dynamic address groups based on Oracle Kubernetes (OKE) filters.
To enable an OCI SDN connector to fetch IP addresses from Oracle Kubernetes:
1. Configure the OCI SDN connector:
a. Go to Security Fabric > External Connectors.
b. Click Create New, and select Oracle Cloud Infrastructure (OCI).
c. Configure as shown substituting the region, tenant and client IDs, and client secret for your deployment. The
update interval is in seconds.
2. Create dynamic firewall addresses for the configured SDN connector with supported Kubernetes filter:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
FortiOS 7.6.2 Administration Guide 3745
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,745
|
Fortinet Security Fabric
c. In the Filter field, select the desired filters. The following filters are supported:
Filter Description
k8s_cluster Name of Kubernetes cluster.
k8s_namespace Namespace of a Kubernetes service or pod.
k8s_svcname Name of a Kubernetes service.
k8s_nodename Name of a Kubernetes node.
k8s_zone Zone of a Kubernetes node.
k8s_region Region of a Kubernetes node.
k8s_podname Name of a Kubernetes pod.
k8s_label.xxx Name of label of a Kubernetes resource (cluster/service/node/Pod).
3. Confirm that the SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address created in step 2 to see a list of IP addresses for instances:
FortiOS 7.6.2 Administration Guide 3746
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,746
|
Fortinet Security Fabric
To configure an SDN connector through the CLI:
1. Configure the OCI SDN connector:
config system sdn-connector
edit "oci1"
set type oci
set tenant-id
"ocid1.tenancy.oc1..aaaaaaaambr3uzztoyhweohbzqqdo775h7d3t54zpmzkp4b2cf35vs5
5cxxx"
set user-id
"ocid1.user.oc1..aaaaaaaaq2lfspeo3uetzbzpiv2pqvzzevozccnys347stwssvizqlatfx
xx"
set compartment-id
"ocid1.compartment.oc1..aaaaaaaaelxxdjazqo7nzczpgypyiqcgkmytjry6nfq5345vw7e
avpwnmxxx"
set oci-region ashburn
set oci-cert "cert-sha2"
set update-interval 30
next
end
2. Create dynamic firewall addresses for the configured SDN connector with supported Kubernetes filter:
config firewall address
edit "k8s_nodename"
set type dynamic
set sdn "oci1"
set filter "K8S_NodeName=129.213.120.172"
next
end
3. Confirm that the SDN connector resolves dynamic firewall IP addresses:
config firewall address
edit "k8s_nodename"
set type dynamic
set sdn "oci1"
set filter "K8S_NodeName=129.213.120.172"
config list
edit "10.0.32.2"
next
edit "10.244.2.2"
next
edit "10.244.2.3"
next
edit "10.244.2.4"
next
edit "10.244.2.5"
next
end
next
end
Private cloud K8s SDN connector using secret token
FortiOS automatically updates dynamic and cluster IP addresses for Kubernetes (K8s) by using a K8s SDN connector,
enabling FortiOS to manage K8s pods as global address objects, as with other connectors. This includes mapping the
following attributes from K8s instances to dynamic address groups in FortiOS:
FortiOS 7.6.2 Administration Guide 3747
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,747
|
Fortinet Security Fabric
Filter Description
Namespace Filter service IP addresses in a given namespace.
ServiceName Filter service IP addresses by the given service name.
NodeName Filter node IP addresses by the given node name.
PodName Filter IP addresses by the pod name.
Label.XXX Filter service or node IP addresses with the given label XXX. For example: K8S_
Label.app=nginx.
FortiOS 6.2.3 and later collect cluster IP addresses in addition to external IP addresses for exposed K8s services.
There is no maximum limit for the number of IP addresses populated with the filters.
To configure K8s SDN connector using the GUI:
1. Configure the K8s SDN connector:
a. Go to Security Fabric > External Connectors > Create New Connector.
b. Select Kubernetes.
c. In the IP field, enter the IP address that you obtained in Obtaining the IP address, port, and secret token in
Kubernetes.
d. In the Port field, select Specify, then enter the port that you obtained in Obtaining the IP address, port, and
secret token in Kubernetes.
e. In the Secret token field, enter the token that you obtained in Obtaining the IP address, port, and secret token in
Kubernetes.
f. Configure the other fields as desired.
2. Create a dynamic firewall address for the configured K8S SDN connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. Configure the address as shown, selecting the desired filter in the Filter dropdown list. In this example, the
K8s SDN connector will automatically populate and update IP addresses only for node instances that match
FortiOS 7.6.2 Administration Guide 3748
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,748
|
Fortinet Security Fabric
the specified node name:
3. Ensure that the K8s SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address created in step 2 to see a list of IP addresses for node instances that match the node
name configured in step 2:
To configure K8s SDN connector using CLI commands:
1. Configure the K8s SDN connector:
config system sdn-connector
edit "kubernetes1"
set type kubernetes
set server "<IP address obtained in Obtaining the IP address, port, and secret
token in Kubernetes>"
set server-port <Port obtained in Obtaining the IP address, port, and secret token
in Kubernetes>
set secret-token <Secret token obtained in Obtaining the IP address, port, and
secret token in Kubernetes>
set update-interval 30
next
end
2. Create a dynamic firewall address for the configured K8s SDN connector with the supported K8s filter. In this
example, the K8s SDN connector will automatically populate and update IP addresses only for node instances that
match the specified node name:
FortiOS 7.6.2 Administration Guide 3749
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,749
|
Fortinet Security Fabric
config firewall address
edit "k8s_nodename"
set type dynamic
set sdn "kubernetes1"
set filter "K8S_NodeName=van-201669-pc1"
next
end
3. Confirm that the K8s SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "k8s_nodename"
set type dynamic
set sdn "kubernetes1"
set filter "K8S_NodeName=van-201669-pc1"
config list
edit "172.16.65.227"
next
end
next
end
To troubleshoot the connection:
1. In FortiOS, run the following commands:
diagnose deb application kubed -1
diagnose debug enable
2. Reset the connection on the web UI to generate logs and troubleshoot the issue. The following shows the output in
the case of a failure:
The following shows the output in the case of a success:
FortiOS 7.6.2 Administration Guide 3750
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,750
|
Fortinet Security Fabric
Nuage SDN connector using server credentials
You can use Nuage SDN connectors in dynamic firewall addresses.
The Fortinet SDN Connector for Cisco ACI and Nuage Networks is a standalone connector that connects to SDN
controllers within Cisco ACI and Nuage Networks. You must configure a connection to the Fortinet SDN connector in
FortiOS to query the dynamic addresses.
To configure a Nuage connector in the GUI:
1. Create the Nuage SDN connector:
a. Go to Security Fabric > External Connectors and click Create New.
b. In the Private SDN section, click Nuage Virtualized Services Platform.
c. Configure the settings as needed.
d. Click OK.
2. Create the dynamic firewall address for the connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. Configure the following settings:
i. For Type, select Dynamic.
ii. For Sub Type, select Fabric Connector Address.
iii. For SDN Connector, select the Nuage connector.
iv. Configure the remaining settings as needed.
FortiOS 7.6.2 Administration Guide 3751
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,751
|
Fortinet Security Fabric
d. Click OK.
To verify the SDN connector resolves the dynamic firewall IP addresses in the GUI:
1. Go to Policy & Objects > Addresses.
2. In the address table, hover over an address to view which IP addresses it resolves to.
To configure a Nuage connector in the CLI:
1. Create the SDN connector:
config system sdn-connector
edit "nuage1"
set type nuage
set server "172.18.64.27"
set server-port 5671
set username "admin"
set password xxxxxxx
next
end
2. Create the dynamic firewall address for the connector:
config firewall address
edit "nuage-address1"
set type dynamic
set sdn "nuage1"
set color 19
set organization "nuage/L3"
set subnet-name "Subnet20"
next
end
To verify the SDN connector resolves the dynamic firewall IP addresses in the CLI:
# diagnose firewall dynamic list
List all dynamic addresses:
nuage1.nuage.nuage/L3.Subnet20.*: ID(196)
ADDR(192.168.20.92)
ADDR(192.168.20.240)
FortiOS 7.6.2 Administration Guide 3752
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,752
|
Fortinet Security Fabric
Nutanix SDN connector using server credentials
FortiOS automatically updates dynamic addresses for Nutanix using an Nutanix SDN connector, including mapping the
following attributes from Nutanix instances to dynamic address groups in FortiOS:
l Cluster name
l Cluster UUID
l Description
l Host name
l Host UUID
l Hypervisor type
l Image name
l Image UUID
l Subnet name
l Subnet UUID
l VM name
l VM UUID
To configure a Nutanix connector using the GUI:
1. Configure the Nutanix SDN connector:
a. Go to Security Fabric > External Connectors.
b. Select Nutanix.
c. In the IP address field, enter the IP address for your Nutanix environment.
d. In the Port field, enter the desired port.
e. In the Username and Password fields, enter the credentials for your Nutanix environment.
f. Click OK.
2. Create a dynamic firewall address for the configured Nutanix SDN connector:
a. Go to Policy & Objects > Addresses and select Address.
b. Click Create new.
c. From the Type dropdown list, select Dynamic.
d. From the Sub Type dropdown list, select Fabric Connector Address.
e. From the SDN Connector dropdown list, select the Nutanix connector.
f. From the Filter dropdown list, select the desired filters.
g. Click OK.
3. Ensure that the Nutanix SDN connector resolves dynamic firewall IP addresses:
a. Go to Policy & Objects > Addresses.
b. Hover over the address created in step 2 to see a list of IP addresses for instances that satisfy the filter
FortiOS 7.6.2 Administration Guide 3753
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,753
|
Fortinet Security Fabric
requirements configured in step 2. In this example, the configured filter is "ClusterName=Fortinet-Lab":
To configure a Nutanix connector using the CLI:
1. Configure the Nutanix SDN connector:
config system sdn-connector
edit "nutanix_connector"
set status disable
set type nutanix set server "172.18.33.59"
set server-port 9440
set username "admin"
set password **********
set update-interval 60
next
end
2. Create a dynamic firewall address for the configured Nutanix SDN connector:
config firewall address
edit "nutanix-addr"
set uuid 382ceafe-8e72-51eb-7300-0807ee907946
set type dynamic
set sdn "nutanix_connector"
set color 2
set filter "ClusterName=Fortinet-Lab"
next
end
3. Ensure that the Nutanix SDN connector resolves dynamic firewall IP addresses:
config firewall address
edit "nutanix-addr"
set uuid 382ceafe-8e72-51eb-7300-0807ee907946
set type dynamic
set sdn "nutanix_connector"
set color 2
set filter "ClusterName=Fortinet-Lab"
config list
edit "192.168.10.15"
next
edit "192.168.10.16"
next
edit "192.168.11.15"
next
edit "192.168.11.16"
FortiOS 7.6.2 Administration Guide 3754
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
3,754
|
Fortinet Security Fabric
next
end
next
end
OCI SDN connector using certificates
You can configure SDN connector integration with Oracle Cloud Infrastructure (OCI).
To configure an OCI SDN connector in the GUI:
1. Go to Security Fabric > External Connectors and click Create New.
2. In the Public SDN section, select Oracle Cloud Infrastructure (OCI).
3. Configure the connector as desired:
a. User ID: Enter the OCID of the OCI user who belongs to the administrator group. See Certificate-based SDN
connector requirements.
b. For the OCI Certificate field, you must select a certificate that satisfies OCI key size limits. The minimum size is
2048 bits. Do one of the following:
i. Select the built-in default certificate called Fortinet_Factory.
ii. Follow steps 1-2 in Using custom certificates to configure a custom certificate.
4. Click OK.
5. At this stage, you must register the certificate's fingerprint to the specified OCI user.
a. Go to the OCI user, then API Keys > Add Public Key.
b. If you selected the Fortinet_Factory certificate in step 2f, do the following:
i. In FortiOS, go to System > Certificate. Select Fortinet_Factory, then click Download.
ii. You now have the Fortinet_Factory.cer file. Create a public key file in PEM format from it, using a freely
available tool of your choice such as OpenSSL.
c. Copy and paste the content of the certificate PEM key file in the Add Public Key window in OCI. Click Add.
FortiOS 7.6.2 Administration Guide 3755
Fortinet Inc.
|
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/3afdbab8-dcdc-11ef-8766-ca4255feedd9/FortiOS-7.6.2-Administration_Guide.pdf
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.