You are on page 1of 5

Block Pages

88 W Websense Web Security and Websense Web Filter


block.html contains the text Ior the top Irame oI the block message, which
explains that access is restricted, lists the requested site, and describes why the site
is restricted.
Customizing the block message
You can make a copy oI the deIault block page Iiles, and then use the copy to
customize the top Irame oI the block page that users receive.
Add inIormation about your organization`s Internet use policies.
Provide a method Ior contacting Human Resources or a Websense administrator
about Internet use policies.
1. Navigate to the Websense block page directory. For English:
<installation path>\BlockPages\en\Default
2. Copy the block page Iiles to the custom block page directory. For English:
<installation path>\BlockPages\en\Custom
3. Open the Iile in a text editor, such as Notepad or vi.
4. ModiIy the text. The Iiles contain comments that guide you in making changes.
Do not modiIy the tokens (enclosed by $* and *$ symbols), or the structure oI the
HTML code. These enable Websense soItware to display speciIic inIormation in
the block message.
Related topics:
Changing the size of the message frame, page 89
Changing the logo that displays on the block page, page 89
Using block page content variables, page 90
Reverting to the default block pages, page 91
Note
Do not modiIy the original block message Iiles in the
BlockPages\en\Default directory. Copy them to the
BlockPages\en\Custom directory and then modiIy the
copies.
Warning
Use a plain text editor to edit block message Iiles. Some
HTML editors modiIy HTML code, which could corrupt
the Iiles and cause problems displaying the block
messages.
TRITON - Web Security Help X 89
Block Pages
5. Some block page HTML Iiles use hard-coded paths to reIerence the support Iiles
used to construct the page. II you have modiIied the stylesheet used to Iormat the
block pages (blockStyle.css) or the JavaScript Iile used to construct security block
pages (security.js), make sure that you also update the path to those Iiles in your
custom HTML Iiles. For example:
<link rel="stylesheet" href="/en/Custom/blockStyle.css
type="text>
6. Save the Iile.
7. Restart Filtering Service (see Stopping and starting Websense services, page 314,
Ior instructions).
Changing the size of the message frame
Depending on what inIormation you want to provide in the block message, the deIault
width oI the block message and height oI the top Irame may not be appropriate. To
change these size parameters in the master.html Iile:
1. Copy master.html Irom the Websense\BlockPages\en\Default directory to
Websense\BlockPages\en\Custom.
2. Open the Iile in a text editor, such as Notepad or vi (not an HTML editor).
3. To change the width oI the message Irame, edit the Iollowing line:
<div style="border: 1px solid #285EA6;width: 600px...">
Change the value oI the width parameter as required.
4. To cause the top Irame oI the message to scroll, in order to show additional
inIormation, edit the Iollowing line:
<iframe src="$*WS_BLOCKMESSAGE_PAGE*$*WS_SESSIONID*$" ...
scrolling="no" style="width:100%; height: 6em;">
Change the value oI the scrolling parameter to auto to display a scroll bar when
message text exceeds the height oI the Irame.
You can also change the value oI the height parameter to change the Irame height.
5. Save and close the Iile.
6. Restart Filtering Service to implement the change (see Stopping and starting
Websense services, page 314).
Changing the logo that displays on the block page
The master.html Iile also includes the HTML code used to display to a Websense
logo on the block page. To display your organization`s logo instead:
1. Copy the block page Iiles Irom the Websense\BlockPages\en\Default directory
to Websense\BlockPages\en\Custom, iI they have not already been copied.
2. Copy an image Iile containing your organization`s logo to the same location.
Block Pages
90 W Websense Web Security and Websense Web Filter
3. Open master.html in a text editor, such as Notepad or vi (not an HTML editor),
and edit the Iollowing line to replace the Websense logo with your organization`s
logo:
<img title="Websense" src="/en/Custom/wslogo_block_page.png"
...>
Replace wslogo_block_page.png with the name oI the image Iile containing
your organization`s logo.
Replace the values oI the title parameter to reIlect name oI your organization.
4. Save and close the Iile.
5. Restart Filtering Service to implement the change (see Stopping and starting
Websense services, page 314).
Using block page content variables
Content variables control the inIormation displayed on HTML block pages. The
Iollowing variables are included with the deIault block message code.
To use a variable, insert the variable name between the $* *$ symbols in the
appropriate HTML tag:
<p id="UserName">$*WS_USERNAME*$</p>
Here, WS_USERNAME is the variable.
The block message code includes additional variables, described below. You may Iind
some oI these variables useIul in constructing your own, custom block messages.
When you see these variables in Websense-deIined block message Iiles, however,
please do not modiIy them. Because Filtering Service uses these variables when
processing blocked requests, they must remain in place.
Variable Name Content Displayed
WSDATE Current date
WSUSERNAME Current user name (excluding domain
name)
WSUSERDOMAIN Domain name Ior the current user
WSIPADDR IP address oI the requesting source
machine
WSWORKSTATION Machine name oI the blocked computer
(iI no name is available, IP address is
displayed)
Variable Name Purpose
WSURL Displays the requested URL
WSBLOCKREASON Displays why the site was blocked (i.e.,
which Iiltering action was applied)
TRITON - Web Security Help X 91
Block Pages
Reverting to the default block pages
II users experience errors aIter you implement customized block messages, you can
restore the deIault block messages as Iollows:
WSISSECURITY Indicates whether the requested site
belongs to any oI the categories in the
Security Risk class. When TRUE, the
security block page is displayed.
WSPWOVERRIDECGIDATA Populates an input Iield in the block
page HTML code with inIormation
about use oI the Password Override
button
WSQUOTACGIDATA Populates an input Iield in the block
page HTML code with inIormation
about use oI the Use Quota Time button
WSPASSWORDOVERRIDBEGIN,
WSPASSWORDOVERRIDEND
Involved in activating password
override Iunctionality
WSMOREINFO Displays detailed inIormation (shown
aIter the More information link is
clicked) about why the requested site
was blocked
WSPOLICYINFO Indicates which policy governs the
requesting client
WSMOREINFOCGIDATA Sends data to Filtering Service about use
oI the More information link
WSQUOTATIME Displays the amount oI quota time
remaining Ior the requesting client
WSQUOTAINTERVALTIME Displays quota session length
conIigured Ior the requesting client
WSQUOTABUTTONSTATE Indicates whether the Use Quota Time
button is enabled or disabled Ior a
particular request
WSSESSIONID Acts as an internal identiIier associated
with a request
WSTOPFRAMESIZE Indicates the size (as a percentage) oI the
top portion oI a block page sent by a
custom block server, iI one is conIigured
WSBLOCKMESSAGEPAGE Indicates the source to be used Ior a
block page`s top Irame
WSCATEGORY Displays the category oI the blocked
URL
WSCATEGORYID The unique identiIier Ior the requested
URL category
Variable Name Purpose
Block Pages
92 W Websense Web Security and Websense Web Filter
1. Delete all the Iiles Irom the Websense\BlockPages\en\Custom directory. By
deIault, Websense soItware will return to using the Iiles in the DeIault directory.
2. Restart Filtering Service (see Stopping and starting Websense services, page 314).
Creating alternate block messages
You can create your own HTML Iiles to supply the text that appears in the top Irame
oI the block page. Use existing HTML Iiles, create alternate Iiles Irom scratch, or
make copies oI block.html to use as a template.
Create diIIerent block messages Ior each oI 3 protocols: HTTP, FTP, and Gopher.
Host the Iiles on the Websense machine, or on your internal Web server (see
Using an alternate block page on another machine, page 92).
AIter creating alternate block message Iiles, you must conIigure Websense soItware to
display the new messages (see Configuring Websense filtering settings, page 55).
During this process, you can speciIy which message is used Ior each oI the
conIigurable protocols.
Using an alternate block page on another machine
Instead oI using Websense block pages and customizing just the message in the top
Irame, you can create your own HTML block pages and host them on an internal Web
server.
Related topics:
Working with block pages, page 87
Customizing the block message, page 88
Related topics:
Working with block pages, page 87
Customizing the block message, page 88
Creating alternate block messages, page 92
Note
It is possible to store block pages on an external Web
server. II, however, that server hosts a site listed in the
Master Database, and that site is in a blocked category, the
block page itselI is blocked.

You might also like