SonicWALL SonicWALL UTM Appliance manual Sample JavaScript Code for SonicOS

Page 44

Sample JavaScript Code for SonicOS 5.2

In this example, “blockedURL” is the variable that references the URL the client was trying to browse to. In this example, we are looking for facebook, and then taking a unique action for that URL. You could use this to redirect users or take custom actions against a defined list of URLs.

if (blockedURL=="http://www.facebook.com/") document.write("test"); This will write the word “test” in the block page.

if (blockedURL=="http://www.facebook.com/") window.location = "HTTP://www.yahoo.com"; This will redirect a user to yahoo.com.

Sample Code for SonicOS 5.1 or Earlier

<html>

<head>

<title>Your Page Title</title>

<meta HTTP-equiv="REFRESH" content="0;url=HTTP://x.x.x.x"></HEAD> <BODY>

Optional Info Here </BODY> </html>

NOTE: HTTP://x.x.x.x should reference the interface the user is terminating through. For example, if a user is coming from the LAN and your X0 LAN interface IP is 192.168.1.1 you would use HTTP://192.168.1.1

NOTE: SonicOS 5.1 and earlier have a 256 character limit on the CFS block page. SonicOS 5.2 increases this number greatly.

44

Image 44
Contents Contents Page Configuring the CA on the Active Directory Server Integrating LDAP/Active Directory with Sonicwall UTMConfiguring the SonicWALL Appliance for Ldap Importing the CA Certificate onto the SonicWALLPage Page Page Page Page Page Page Enable Radius to Ldap Relay Enables this feature Authentication Page Page Page SonicOS Options That Leverage Groups/Users Creating Firewall Rules with Ldap Groups/UsersPage Page Firewall Rules with Bandwidth Management & Logging Page Blocking Websites Domain Names for Groups/Users Blocking Domains with Firewall RulesPage Page Navigate to Firewall Access Rules Create a rule to allow Http traffic for your allowed lists Do the same for Https Create the deny rules for Http and Https Firewall rules should now look like the below picture Blocking Https SSL Domains with SSL Control Configuring a SSL Blacklist and Whitelist Page Applying Different CFS Policies to Groups Page Creating Custom CFS Policies Navigate to the Policy tab and add a new CFS policy Page Page Page Variables for Custom Block Page in SonicOS Http//$$fwinterface$$/$#SWLSTYLESCSS#$Basic Sample Code for SonicOS Advanced Sample Code for SonicOSPage Page Sample JavaScript Code for SonicOS Sample Code for SonicOS 5.1 or EarlierApplying Application Firewall Polices to Groups/Users Page Page Page Page Tightening Control over the Browsing Behavior of Users Blocking IM Traffic Categorically Applying Granular IM Policies Applying VPN Access Policies to Groups/Users Global VPN Client GVCPage SSL-VPN NetExtender Guest Services Wireless Guest Services