Block specific Web content withing webpages

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Block specific Web content withing webpages

Postby josh84 » Nov 01 11 6:12 am

Hi,

How do i block specific web content like live streaming within a webpage and embedded videos like flash and swf. I know how to block webpages that contain these keywords but thats not what am after.

Regards,
Anish
josh84
 
Posts: 36
Joined: Sep 02 10 11:34 pm

Re: Block specific Web content withing webpages

Postby adrien » Nov 01 11 8:22 am

is this WinGate 6 or WInGate 7.

In 7 you get a chance to block things when the response is received from the upstream server, so you can look at the content-type ( Response.Headers.Get("Content-Type") ) and see if it matches e.g. video/*, etc.

In WinGate 6 you can only block based on the request, which means trying to find file extensions in the request etc, which isn't always available or reliable.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Block specific Web content withing webpages

Postby josh84 » Nov 01 11 8:45 am

Hi,

I am runnning the WinGate 7 RC 1version.

I did try that option but the ("Content-Type") is not available in the list. I aslo tried typing it in manually, neither did that work. Here's what i've done;

Created new policy.
Added HTTP Proxy
event type is response
then added proxy request
and then added a list look up searched for that respone.Headers.....
if yes gave result REJECT
if no gave result ALLOW

Is it rite ?

Regards,
Anish
josh84
 
Posts: 36
Joined: Sep 02 10 11:34 pm

Re: Block specific Web content withing webpages

Postby adrien » Nov 01 11 9:26 am

yes, you need to type in the name of the header you want to retrieve, so the example I gave would be what you enter in the list.

{{Response.Headers.Get("Content-Type")}}

note it's the response object, not the request object. And the event needs to be the ProxyResponse event.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Block specific Web content withing webpages

Postby josh84 » Nov 01 11 9:43 am

I will confirm that. But i do remember that i've put the same thing but i did not get what i wanted. how should put it into the flow chart.

yes-> Reject and
No -> Allow

Is that correct ?

Regards,
Anish
josh84
 
Posts: 36
Joined: Sep 02 10 11:34 pm

Re: Block specific Web content withing webpages

Postby adrien » Nov 01 11 9:59 am

depends what you want and which content types. E.g. if you only want certain types allowed (whitelist), then yes would be allow, and no reject. If you want to block certain types (blacklist) then yes = reject and no = allow.

I would recommend also using pattern matching and wildcards on the types, so you can get variants.

e.g.

video/*
audio/*

Etc.

Some video comes through as unexpected types as well (e.g. some sub-type of application) - you can enable logging of content-type in the usage logs to see what stuff is coming in as - that will help you decide what to block.
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Block specific Web content withing webpages

Postby adrien » Nov 01 11 10:00 am

e.g. application/x-mms-framed is actually used for video.
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Block specific Web content withing webpages

Postby josh84 » Nov 01 11 10:07 am

Thanks for the info.

Well, about the allow and reject. i have a blacklist of file extensions like the flv and swf. Users here are cricket freeks, youtube watcher and streaming, so i need to block all video content.

Will let you know of the outcome once i start work tomorrow. :)

Regards,
Anish
josh84
 
Posts: 36
Joined: Sep 02 10 11:34 pm


Return to WinGate

Who is online

Users browsing this forum: GregoryhEn and 12 guests

cron