Solution |
Here are the steps on how to set a custom warning page for AI websites:
- Go to Web filter profile in use -> FortiGuard Category Based Filter, and select Artificial Intelligence Technology under General Interest - Business.
-
Enable GUI for replacement message group to create a custom group.
Once enabled, a replacement message group will appear on the GUI dashboard.
- Create a custom Replacement message group. In this example, the custom group is named AI Site.
- Create a custom replacement message under the create message group. This can only be done through CLI.
- Sample config for the custom replacement message:
config system replacemsg-group edit "AI Site" set comment '' set group-type utm config custom-message edit "test-AI" set buffer "<!DOCTYPE html> <html lang=\"en\"> <head> <meta charset=\"UTF-8\"> <meta http-equiv=\"X-UA-Compatible\" content=\"IE=8; IE=EDGE\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> <style type=\"text/css\"> body { height: 100%; font-family: Helvetica, Arial, sans-serif; color: #6a6a6a; margin: 0; display: flex; align-items: center; justify-content: center; } input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], select, textarea { color: #262626; vertical-align: baseline; margin: .2em; border-style: solid; border-width: 1px; border-color: #a9a9a9; background-color: #fff; box-sizing: border-box; padding: 2px .5em; appearance: none; border-radius: 0; } input:focus { border-color: #646464; box-shadow: 0 0 1px 0 #a2a2a2; outline: 0; } button { padding: .5em 1em; border: 1px solid; border-radius: 3px; min-width: 6em; font-weight: 400; font-size: .8em; cursor: pointer; } button.primary { color: #fff; background-color: rgb(47, 113, 178); border-color: rgb(34, 103, 173); } .message-container { height: 500px; width: 600px; padding: 0; margin: 10px; } .logo { background: url(%%IMAGE:logo_v3_fguard_app%%) no-repeat left center; height: 267px; object-fit: contain; } table { background-color: #fff; border-spacing: 0; margin: 1em; } table > tbody > tr > td:first-of-type:not([colspan]) { white-space: nowrap; color: rgba(0,0,0,.5); } table > tbody > tr > td:first-of-type { vertical-align: top; } table > tbody > tr > td { padding: .3em .3em; } .field { display: table-row; } .field > :first-child { display: table-cell; width: 20%; } .field.single > :first-child { display: inline; } .field > :not(:first-child) { width: auto; max-width: 100%; display: inline-flex; align-items: baseline; virtical-align: top; box-sizing: border-box; margin: .3em; } .field > :not(:first-child) > input { width: 230px; } .form-footer { display: inline-flex; justify-content: flex-start; } .form-footer > * { margin: 1em; } .text-scrollable { overflow: auto; height: 150px; border: 1px solid rgb(200, 200, 200); padding: 5px; font-size: 1em; } .text-centered { text-align: center; } .text-container { margin: 1em 1.5em; } .flex-container { display: flex; } .flex-container.column { flex-direction: column; } </style> <title>
</title> </head> <body> <div class=\"message-container\"> <div class=\"logo\"> </div> <h1> Warning - You are currently accessing an AI site </h1> <h3> Click the proceed button with cation if you would like to proceed on access </h3> <p> This access will be logged and strictly monitored </p> <table> <tbody> <tr> <td> Category </td> <td> %%CATEGORY%% </td> </tr> <tr> <td> URL </td> <td> %%PROTOCOL%%://%%URL%% </td> </tr> </tbody> </table> <p> To have the rating of this web page re-evaluated <a href=\"%%FTGD_RE_EVAL%%\"> please click here </a> . </p> <div class=\"form-footer\"> <button type=\"button\" onclick=\"document.location.href=\'%%WARNINGLINK%%\'; return false;\"> Proceed </button> <button class=\"primary\" type=\"button\" onclick=\"history.go(-1); return false;\"> Go Back </button> </div> </div> </body> </html> " set header http set format HTML next end next
end
- Apply the created custom message to Artificial Intelligence Technology (Category 100).
config webfilter profile
edit "Warn for AI site" --> Select the webfilter profile to use.
set comment "Default web filtering."
set replacemsg-group "AI Site"
config ftgd-wf
edit 35
set category 100
set action warning
set warn-duration 2s
set override-replacemsg "test-AI" --> Apply the created custom message, in this example it is test-AI.
next
end
end
next
end
- Apply the created web filter to the firewall policy. Set the inspection mode to proxy and SSL inspection to 'deep inspection'. If deep inspection is not in place, some AI websites may bypass the warning page.
Here is the sample output when accessing AI sites based on the provided steps above:
|