Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
Loading...
Loading...

HOWTO: Custom Blocked Page with all options

Expand / Collapse


This article applies to:

  • Web Filter  (WF, R3000, WFR)

Question:

  • How can I create a custom blocked page for a Web Filter to show both the blocked information and web-based authentication option on a single page.
  • Create a custom blocked page which includes all options. For example, Override account, email etc.

Procedure:

Listed below is a sample.asp page that will include links for the following:
- Web based authentication
- Override account authentication
- Email link that includes the URL in question in the body of the email

Notes:

There are several places below that reference the Web Filter by IP address or Hostname, so just make sure to update those with your Web Filter info.

Sample File:

<%@ Language=VBScript %>
<%

Option Explicit

Dim url, ip, cat, user, str

url = Request.Querystring("URL")
ip = Request.Querystring("IP")
cat = Request.Querystring("CAT")
user = Request.Querystring("USER")

Private Function displayName(str)

select case str

case "ALCO"
 str = "Alcohol"
case "ART"
 str = "Art"
case "AUTO"
 str = "Automobile"
case "BANNER"
 str = "Banner"
case "BNL"
 str = "Books & Literature"
case "CHAT"
 str = "Chat"
case "COMICS"
 str = "Comics"
case "COMORG"
 str = "Community Organizations"
case "CULTS"
 str = "Cults"
case "DATE"
 str = "Personals"
case "DRUGS"
 str = "Drugs"
case "DUBIUS"
 str = "Unsavory / Dubious"
case "EDUCAT"
 str = "Education"
case "EDUCHT"
 str = "Education Cheating"
case "EDUGAM"
 str = "Educational Games"
case "EMPL"
 str = "Employment"
case "ESTATE"
 str = "Real Estate"
case "EXART"
 str = "Explicit Art"
case "FASHN"
 str = "Fashion"
case "FINAN"
 str = "Finance"
case "FITNS"
 str = "Fitness"
case "FREEHST"
 str = "Free Hosts"
case "GAMB"
 str = "Gambling"
case "GCRIMI"
 str = "Criminal Skills"
case "GENBUS"
 str = "General Business"
case "GENTER"
 str = "Entertainment"
case "GGAMES"
 str = "Games"
case "GNEWS"
 str = "News"
case "GOVT"
 str = "Government"
case "GPORN"
 str = "General Pornography"
case "GRTCRD"
 str = "Online Greeting Card"
case "GSTREAM"
 str = "Streaming Media"
case "HACK"
 str = "Hacking"
case "HATE"
 str = "Hate Groups"
case "HEALTH"
 str = "Health / Medical"
case "HOLSTC"
 str = "Holistic"
case "HUMOR"
 str = "Humor"
case "INSTMS"
 str = "Instant Messaging"
case "INTECH"
 str = "Information Technology"
case "IRADIO"
 str = "Internet Radio"
case "ISP"
 str = "Internet Service Provider"
case "KDPORN"
 str = "Child Pornography"
case "LCOMM"
 str = "Local Community"
case "LEGAL"
 str = "Legal"
case "LIFE"
 str = "Lifestyle"
case "MALCOD"
 str = "Malicious Code / Spyware / Virus"
case "MESBRD"
 str = "Message Boards"
case "MILAPP"
 str = "Military Appreciation"
case "MILOFL"
 str = "Military Official"
case "MOVTEL"
 str = "Movies & Television"
case "MUSAPP"
 str = "Music Appreciation"
case "OBSC"
 str = "Obscene / Tasteless"
case "ONLCLS"
 str = "Online Classes"
case "OUTREC"
 str = "Outdoor Recreation"
case "PARNML"
 str = "Paranormal"
case "POLTIC"
 str = "Political Opinion"
case "PR2PR"
 str = "Peer to Peer / File Sharing"
case "PROXY"
 str = "Public Proxies"
case "RECREA"
 str = "Recreation"
case "REFERE"
 str = "Reference"
case "RELIG"
 str = "Religion"
case "RELOPN"
 str = "Religious Opinion"
case "RRATED"
 str = "R Rated"
case "SE"
 str = "Search Engines"
case "SELFDE"
 str = "Self Defense"
case "SHOP"
 str = "Shopping"
case "SOCOPN"
 str = "Social Opinion"
case "SPORTS"
 str = "Sports"
case "TERROR"
 str = "Terrorist / Militant / Extremist"
case "THEATR"
 str = "Theater"
case "TICKET"
 str = "Tickets"
case "TOBACCO"
 str = "Tobacco"
case "TRAFIC"
 str = "Weather / Traffic"
case "TRAVEL"
 str = "Travel"
case "WEAPN"
 str = "Weapons"
case "WEBLOG"
 str = "Web Logs"
case "WEMAIL"
 str = "Web Based Email"
case "WNEWS"
 str = "Web Based Newsgroups"
case "WSTORE"
 str = "Web Based Storage"
case else

End select

displayName = str

End Function

 

cat = displayName(cat)

%>

<HTML>
<HEAD>
<script language=javascript>

function parseData(str, start, end)
{
 result = "";
 i = str.indexOf(start);

 if (i >= 0) {
  len = str.length;
  substr = str.substr(i+start.length, len - start.length);

  j = substr.indexOf(end);
  if ( j > 0) {
   result = substr.substring(0, j);
  }
  else {
   if ( j != 0) {
    len = substr.length;
    result = substr.substr(0, len);
   }
  }
 }
  return result;
}

function getData(){
 str = document.location.href;
 len = str.length;
 i = str.indexOf("?");
 if ( i>= 0) {
  query = str.substr(i+1, len-i-1);

  url = parseData(query, "URL=", "&");
  document.block.URL.value = url;

  ip = parseData(query, "IP=", "&");
  document.block.IP.value = ip;

  cat = parseData(query, "CAT=", "&");
  document.block.CAT.value = cat;

  user = parseData(query, "USER=", "&");
  document.block.USER.value = user;
 }
}

function do_options(){
 document.block.action="http://your filter ip:81/cgi/block.cgi"
 document.block.submit();
}

</script>

<h3>The web site has been blocked in accordance with internal regulations.</h3>
<br><br>
</HEAD>

<BODY>

<form method=post name=block >
<input type=hidden name="SITE" value="_BLOCK_SITE_">
<input type=hidden name="URL" value="">
<input type=hidden name="IP" value="">
<input type=hidden name="CAT" value="">
<input type=hidden name="USER" value="">
<input type=hidden name="STEP" value="STEP2">
</form>

<br><br>
<TABLE>
<tr><td align=right>Unauthorized Web Address:</td><td width=30></td><td><%=url%></td></tr>
<tr><td align=right>Computer Workstation IP Address:</td><td width=30></td><td><%=ip%></td></tr>
<tr><td align=right>Blocked Category:</td><td width=30></td><td><%=cat%></td></tr>
<tr><td align=right>User Group Identification:</td><td width=30></td><td><%=user%></td></tr>
</TABLE>
<script language=javascript>
 getData();
</script>
<br>
<br>
<p>For Web-based Authentication, <a href="&IP=<%=IP%>">
<a href="https://Filter IP or hostname:8081/AuthenticationServer/AuthenticationForm.jsp?URL=<%=URL%>&IP=<%=IP%>">Click Here</a></p>
<p><span class="contentbold">To submit this blocked site for review,
<a href="mailto:admin@yoursite.com?subject=Request For Review&body=Please review the following:%0d%0dURL:<%=url%>%0dCategory: <%=cat%>">Click Here</a>
</p>
<p>For further options, <a href="javascript:do_options()">Click Here</a></p>
<br><br>
</BODY>
</HTML>


To contact Trustwave about this article or to request support:


Rate this Article:
     

Add Your Comments


Comment submission is disabled for anonymous users.
Please send feedback to Trustwave Technical Support or the Webmaster
.