Web Advertisement URL Filtering

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Web Advertisement URL Filtering

L4 Transporter

I have enabled URL filtering to block web advertisements, but it looks really bad cosmetically on the users end when they get to a web site where the advertisement should be there is big texted block page. Anyway we can eliminate the block page for web advertisements or make this look "prettier"

 

 

10 REPLIES 10

Cyber Elite
Cyber Elite

You could do something like below, that simply doesn't actually load anything so that if they see anything it'll just be white space. 

 

<html>
<head>
</head>
</html>

Simply upload that as your URL FIltering and Category Match Block Page. You'll lose the page altogether, but it will accomplish what you are looking for and users won't be able to access any site or category you are blocking. 

But this is a global thing so even when they get to a true blocked site like netflix it will just be blank? Can't have that, so I guess I would just not block web advertisements. How does something like a barracude web filter do this? That was the old URL filter and it blocked advertisements but it wasnt a big block page, it just wasnt there or it was empty white space, but a true blocked page had the barracuda branded block page. 

@BPry has a great idea... a blank response page would certainly make things look cleaner.  Now, combine that suggestion with a method for per-URL-category response pages:

 

https://www.paloaltonetworks.com/documentation/70/pan-os/pan-os/url-filtering/url-filtering-response...

 

You can also add code that triggers the firewall to display different messages depending on what URL category the user is attempting to access. For example, the following code snippet from a response page specifies to display Message 1 if the URL category is games, Message 2 if the category is travel, or Message 3 if the category is kids:
var cat = "<category/>";
switch(cat)
{
case 'games':
document.getElementById("warningText").innerHTML = "Message 1";
break;
case 'travel':
document.getElementById("warningText").innerHTML = "Message 2";
break;
case 'kids':
document.getElementById("warningText").innerHTML = "Message 3";
break;
}

I should have just told you to ask @jvalentine lol! Seriously I would love to see a full copy of one of your response pages, I'm guessing it's a fair bit longer than any of mine. I even have this on my too do list from the last time you brought up how this could be done. 

L7 Applicator

 

A simple solution could be just to set a deny policy for that category:

2017-10-18_12-07-48.jpg

 

 

This will drop any traffic categorized as web-advertisements. The solution others have given is likely going to achieve the goal you want, but I figured I'd add this as well.

@gwesson @BPry That's why I love the community forums.  Two great ideas that I wouldn't have come up with on my own.  I try and help but end up learning stuff at the same time.  

Ugh. I am not a programmer at all! So can I just export the predefined page for match category block page and somehow modify it? Where would I start entering the categories?

 

<html>
<head>
<title>Web Page Blocked</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta name="viewport" content="initial-scale=1.0">
<style>
#content {
border:3px solid#aaa;
background-color:#fff;
margin:1.5em;
padding:1.5em;
font-family:Tahoma,Helvetica,Arial,sans-serif;
font-size:1em;
}
h1 {
font-size:1.3em;
font-weight:bold;
color:#196390;
}
b {
font-weight:normal;
color:#196390;
}
</style>
</head>
<body bgcolor="#e7e8e9">
<div id="content">
<h1>Web Page Blocked</h1>
<p>Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.</p>
<p><b>User:</b> <user/> </p>
<p><b>URL:</b> <url/> </p>
<p><b>Category:</b> <category/> </p>
</div>
</body>
</html>

Hello @s.williams1,

A custom block page isthe way to go. In our case since we didnt want to take away from a true block page and have that info available, i.e. page was blocked bevcause of a restricted Category etc. So we created a blank continue page. While yes it does cause blank spots on some pages, it has stopped so many drive by downloads its not even funny. Maybe a custom page with your companies logo or some other gif? 

 

Regards,

where within the HTML code do you insert this?

 

While I am by no means a HTML expert, I would say after the </body> section? Hopefully someone with more HTML experience can chime in.

 

 

  • 3778 Views
  • 10 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!