Monday, December 10, 2012

External Images in Replacement Messages

If you are using Webfiltering and would like to host your images on an external server rather than using the builtin ones in FortiOS here is a little code sample to make that happen.

config system replacemsg http "url-block"
    set buffer "<BODY>

<center><img src=\"http://www.example.com/img/example.gif\" alt=\"Example Logo\"/>            <img src=\"http://www.example.com/blocked.gif\" alt=\"Logo\"/></center>

<center><H1><FONT color=#ff0000 size=6>Access Restricted by Web Access Policy </FONT></H1></center>

<P><B><FONT size=4>The website you are trying to access has been
restricted because it does not fall within the business scope of Example Company. All websites have been categorized through third party software. The categories are generalized and the website you are attempting to access may be blocked in error. Please email <a href=\"mailto:security.operations@example.com?\"><B>Security Operations</B></a> for any questions.</FONT></B></P>

<P></P>
<div style=\"padding:10px 10px;border:1px solid black;\">
<FONT color=#ff0000 size=5><B><center>To access web-based mail, online file sharing, or internal company sites please use the browser in your Start menu.</B></center></FONT>
</div>

</BODY>"
    set header http
    set format html
end

No comments: