Fortinet Document Library

Version:

Version:

Version:


Table of Contents

Administration Guide

Download PDF
Copy Link

Replacement messages

FortiOS has replacement messages that are HTML and text files. These messages can be customized to meet user requirements. The content can be modified, and images can be added.

Modifying replacement messages

The Replacement Messages page has two views. Simple View (the default view) shows the most commonly used replacement messages. Extended View shows the entire list and all replacement message categories.

To modify a replacement message in the GUI:
  1. Go to System > Replacement Messages.
  2. Select a replacement message and click Edit.

    If the message you want to edit is not visible, click Extended View in the upper right-hand corner of the top menu.

  3. Edit the HTML code.

    The message is visible on the left alongside the HTML code on the right. The message view updates in real-time as you edit the content.

  4. Click Save.

    Tooltip

    Click Restore Defaults to return to the original message and code base.

To modify a replacement message in the CLI:

For example, to modify the Traffic Quota Limit Exceeded Page message:

config system replacemsg traffic-quota "per-ip-shaper-block"
    set buffer "<html>
  <head>
    <title>
      Traffic Quota Control
    </title>
  </head>
  <body>
    <font size=2>
      <table width=\"100%\">
        <tr>
          <td bgcolor=#3300cc align=\"center\" colspan=2>
            <font color=#ffffff>
              <b>
                Traffic blocked because exceeded session quota
              </b>
            </font>
          </td>
        </tr>
      </table>
      <br>
      <br>
      Traffic blocked because it exceeded the per IP shaper session quota. Please contact the system administrator.
      <br>
      %%QUOTA_INFO%%
      <br>
      <br>
      <hr>
    </font>
  </body>
</html>"
    set header http
    set format html
end

Replacement message images

Images can be added to replacement messages on:

  • Disclaimer pages
  • Login pages
  • Declined disclaimer pages
  • Login failed pages
  • Login challenge pages
  • Keepalive pages
    Note

    The supported image formats are GIF, JPEG, TIFF, and PNG. The maximum file size supported is 24 KB.

Adding images to replacement messages

To add images to replacement messages in the GUI:
  1. Go to System > Replacement Messages.
  2. In the top menu, click Manage Images.
  3. Click Create New.
  4. Enter a name for the image.
  5. Click Upload Image and locate the file.

  6. Click OK.

    The file is now visible in the list.

To add images to replacement messages in the CLI:
config system replacemsg-image
    edit <image_name>
        set image-type {gif | jpg | tiff | png}
        set image-base64 <string>
    next
end

Replacement messages

FortiOS has replacement messages that are HTML and text files. These messages can be customized to meet user requirements. The content can be modified, and images can be added.

Modifying replacement messages

The Replacement Messages page has two views. Simple View (the default view) shows the most commonly used replacement messages. Extended View shows the entire list and all replacement message categories.

To modify a replacement message in the GUI:
  1. Go to System > Replacement Messages.
  2. Select a replacement message and click Edit.

    If the message you want to edit is not visible, click Extended View in the upper right-hand corner of the top menu.

  3. Edit the HTML code.

    The message is visible on the left alongside the HTML code on the right. The message view updates in real-time as you edit the content.

  4. Click Save.

    Tooltip

    Click Restore Defaults to return to the original message and code base.

To modify a replacement message in the CLI:

For example, to modify the Traffic Quota Limit Exceeded Page message:

config system replacemsg traffic-quota "per-ip-shaper-block"
    set buffer "<html>
  <head>
    <title>
      Traffic Quota Control
    </title>
  </head>
  <body>
    <font size=2>
      <table width=\"100%\">
        <tr>
          <td bgcolor=#3300cc align=\"center\" colspan=2>
            <font color=#ffffff>
              <b>
                Traffic blocked because exceeded session quota
              </b>
            </font>
          </td>
        </tr>
      </table>
      <br>
      <br>
      Traffic blocked because it exceeded the per IP shaper session quota. Please contact the system administrator.
      <br>
      %%QUOTA_INFO%%
      <br>
      <br>
      <hr>
    </font>
  </body>
</html>"
    set header http
    set format html
end

Replacement message images

Images can be added to replacement messages on:

  • Disclaimer pages
  • Login pages
  • Declined disclaimer pages
  • Login failed pages
  • Login challenge pages
  • Keepalive pages
    Note

    The supported image formats are GIF, JPEG, TIFF, and PNG. The maximum file size supported is 24 KB.

Adding images to replacement messages

To add images to replacement messages in the GUI:
  1. Go to System > Replacement Messages.
  2. In the top menu, click Manage Images.
  3. Click Create New.
  4. Enter a name for the image.
  5. Click Upload Image and locate the file.

  6. Click OK.

    The file is now visible in the list.

To add images to replacement messages in the CLI:
config system replacemsg-image
    edit <image_name>
        set image-type {gif | jpg | tiff | png}
        set image-base64 <string>
    next
end