Whenever I switch on my modem and try to connect to the internet, my ISP redirects me to their website. I'm assuming they are grabbing DNS requests and redirecting them using port 53. A video of it and a supposed explanation of it.

enter image description here

This happens once which is tolerable, but it gets annoying when ads start showing up at the bottom right corner of the screen at random times, but mostly within a few seconds of me opening a page of a random website; not for every page I open though. Only sometimes. (ad showed up twice while I was typing this question!!!).

enter image description here

What I tried:

  • NoScript doesn't block it.

  • Since the redirection happens through, I added that address as a filter rule in AdBlock, but it doesn't get blocked.

  • Wrote a GreaseMonkey script which didn't block it.

// ==UserScript==
// @name BSNLadblock
// @namespace bsnl
// @include *
// @version 1
// @grant none
// ==/UserScript==

var bulletinPrefix="__BULLETIN__";
var bulletinForm=bulletinPrefix+"bulletinForm";
var bulletinDiv=bulletinPrefix+"bdiv";
var div = document.getElementById(bulletinDiv);

if (div) {
  div.style.display = "none"; // Hides it
  div.parentNode.removeChild(div); // Removes it entirely
}, 3000);

What the ISP is using:
The moment the ad appears, I save the page and am able to find a JavaScript file which appears with a different name each time. These are some of the contents:

var namePrefix="";
var bulletinPrefix="__BULLETIN__";
var bulletinForm=bulletinPrefix+"bulletinForm";
var bulletinDiv=bulletinPrefix+"bdiv";
var bulletinJS=false;
var bulletinIncluded=true;

another snippet

jsBulletin("GET /dyn/bg/BSNL-FTTH/index.js?policy=27&policyname=BSNL-FTTH&time=1461310911&webServer= HTTP/1.1");
var bdivButton = bulletinPrefix + "bdivButton";
var bdivImage = bulletinPrefix + "bdivImage";

function afterRender () {
   var height = bdiv.offsetHeight;
   bdiv.style.display = "none";
   bdiv.style.display = "block";
   if (isMobile()) bgv_height /= 2;
   document.getElementById(bdivImage).style.height = bgv_height + 'px';
   if (bdiv.style.WebkitTransition) bdiv.style.WebkitTransition = 'top ' + (bgv_duration) + 's ease ' + (bgv_delay) + 's'; 
   bdiv.style.transition = 'top ' + (bgv_duration) + 's ease ' + (bgv_delay) + 's';
   bdiv.style.top = (parseInt(bdiv.style.top) - bdiv.offsetHeight + height) + 'px';
   if (bdiv.style.WebkitTransition) bdiv.style.WebkitTransition = "top 0s ease 0s"; 
   bdiv.style.transition = "top 0s ease 0s";

another snippet:

buttons.push(new button(bdivButton, 'click', imageClicked));

   bulletinWrite('         <DIV style="overflow:hidden; position:absolute; right:0; top:0; z-index:9999999999;">');

   makeButton("Close", "Close", "", "CloseButton.png");

   bulletinWrite('         </DIV>');

I've checked the div name I'm using in the GreaseMonkey script. It matches the div of the ad. But I'm surprised it still doesn't get blocked. Do you know how to stop these ads? I could share the entire js file if you'd like to see it on something like pastebin.

Related: https://superuser.com/questions/902635/isp-is-inserting-ads-into-web-pages
and http://bitsnapper.com/how-to-block-intrusive-mtnl-broadband-ad-popups-in-your-browser/

  • While I like this question and very much appreciate the detail, it is off-topic here. It is not about a website you control or about webmastering. To answer your question, this is often a byproduct of using your ISPs DNS servers and can be overcome by using another DNS in your modem/router/client. Change all of these to use another DNS. You can at least use Google's DNS at IP Cheers!! – closetnoc May 21 '16 at 16:29
  • I'm voting to close this question as off-topic because it is not about webmastering or a website you control. – closetnoc May 21 '16 at 16:30
  • This question appears to be off-topic because it is not about webmastering as defined in the FAQ. – John Conde May 21 '16 at 17:16
  • Thanks. May I know which StackExchange website would be appropriate for this question so I could post it there? I understand moderators have the ability to move a question to another StackExchange website too. I had initially considered SuperUser and ServerFault, but felt that Webmasters would be appropriate. – Nav May 22 '16 at 5:01
  • @JohnConde Requesting some help; either with shifting this question to another forum or for stopping the ad's. The ad's are getting quite annoying and more frequent now. – Nav May 23 '16 at 13:54