Figure 2
The field between brackets [] are variables that will be replaced with information related to the access. For more information on the meaning of the fields see table 1. Figure 3 shows how this page will look like after the customization used on this example:
Figure 3
Notice that in this page we customized the following items:
· Fonts (format and size)
· Background Color and Table background
· Company logo
· Text description
· Hyperlink to Helpdesk’s email
Note: The field [ADMINMESSAGE] will be replaced per rule based when dealing with 12232.htm page. The [ADMINMESSAGE] in this page is replaced by the text that you write on the window showed in Figure 1.
The only caveat while customizing this page is when you are inserting pictures. If you just insert the picture reference using the approach below it will not work:
<TD class=titleBorderx width=130 style="border-style: none; border-width: medium; background-color: #FFFFFF">
<img border="0" src="Fabrikam-logo.gif" width="105" height="87"></TD>
<TD class=titleBorder id=L_12232_2 style="border-style: none; border-width: medium; background-color: #FF0000">
The reason why it will not work is because client browser will append the picture’s name to the web site that you are trying to access and it was blocked. For example: if you blocked the access to www.contoso.com, the location for Fabrikam’s logo will show a Red X and if you open the properties of the picture the reference will be www.contoso.com/fabrikam-logo.gif. One way to overcome that is to use a full reference that can point to an internal web server, as shown below:
<TD class=titleBorderx width=130 style="border-style: none; border-width: medium; background-color: #FFFFFF">
<img border="0" src="http://websrv/Fabrikam-logo.gif" width="105" height="87"></TD>
<TD class=titleBorder id=L_12232_2 style="border-style: none; border-width: medium; background-color: #FF0000">
This way Forefront TMG will load the picture from the internal web server and as long as the client has access to the web server that was referenced in the link. Depending on how your network is setup, the traffic might pass through TMG also, which means that TMG also needs to allow the traffic to reach the destination web server.
Note: Another approach instead of customizing this page is to use the option Redirect Web Client to the Following URL (as shown in Figure 1). However you need to be aware of potential issues with IE7 and higher as shown in the article Behavioral Change on IE7 can affect Outbound access through ISA Server 2006 that is using Redirect on a Deny Rule.
The new page should be added (with original name) at %programfiles%\Microsoft Forefront Threat Management Gateway\ErrorHtmls.
3. Conclusion
This post explained the additional HTML error pages on Forefront TMG 2010 and how to customize the 12232 error. Although this post focus on explaining how to customize 12232 error pages, the techniques used on this post can be applied to any other pages described in Table 1.
Author
Yuri Diogenes
Sr. Security Support Escalation Engineer
Microsoft CSS Forefront Edge Team
Technical Reviewers
Yury Berezansky
Sr. Software Developer Engineer
Forefront TMG Product Team
Avihai Dgany
Software Developer Engineer
Forefront TMG Product Team
Eric Detoc
Escalation Engineer
Microsoft CSS Forefront TMG Beta Team