Friday 4 April 2014

Pfsense Blocking ads with squid or lusca

Ads are very annoying and sometimes takes more time to load than the main content of page we wanted to browse. This How to would not take 5 minutes to stop almost all ads forever, assuming  you have installed a working squid or lusca in your pfsense.. Though there are good plugins that can do that more effectively like ad block plus but it is not supported in other browser and platform. So lets get started. 

1. Open pfsnes GUI, goto services->proxy server->Access Control then Download, copy and paste the content of ad server list to Blocklist box then click save.  Now ads are blocked tryspeedtest.com or any other site that has annoying ads. You can notice a notification cannot load url etc etc on the ad box. To replace it with blank content continue instruction below.

2. In pfsense GUI goto services->proxy server->General add this to your custom option  ;deny_info http://192.168.1.1/block.html blacklist;. and change 192.168.1.1 with your pfsense ip address.

3. Now goto PFsense diagnositc->file edit and paste this in the box /usr/local/www/block.html then click save twice to make sure it is created. Check if it is!!! Paste this in your browser http://192.168.1.1/block.html, assuming 192.168.1.1 is your pfsense ip address a blank empty page should appear if not go back to 3 again.

you may create a custom block.html page to replace the ads, for checking how many content have been block in a page. example below.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blocked</title>
</head>
<body>

Ads Blocked

</body>
</html>


Now experience faster browsing and ad free net. You may download ad server list    click here

No comments:

Post a Comment