{"id":377,"date":"2016-12-19T13:50:29","date_gmt":"2016-12-19T05:50:29","guid":{"rendered":"https:\/\/play.datalude.com\/blog\/?p=377"},"modified":"2016-12-19T13:59:06","modified_gmt":"2016-12-19T05:59:06","slug":"blocking-irritating-pldt-billing-popups","status":"publish","type":"post","link":"https:\/\/play.datalude.com\/blog\/2016\/12\/blocking-irritating-pldt-billing-popups\/","title":{"rendered":"Blocking irritating PLDT Billing popups"},"content":{"rendered":"<p>So you forgot to pay your bill. It happens. PLDT used to set an automated phone call to call you once a day until you paid. Now they have something much more irritating, and something that feels borderline illegal. What they do is they hijack your internet connection. Every four or five page loads, they inject an HTML frame with a monster ad, which sits on top of all your work. You have no choice but to click on the button which takes you to a page with the amount you owe (which means they know which IP is your account BTW).<\/p>\n<p>However there is no way to remove the popup, which sits on top of your browser. There is no 'close window' button, which means your only choice is to refresh the page, or close the window and re-open it. Too bad if you were working on something and hadn't pressed the save button: that's now gone. And even after you pay, the popup sticks around for a day or two &#8230; (how hard can it be to automatically cancel it?)<\/p>\n<p>So how do we block it? The frame is an iframe which uses an IP address 210.213.253.135, so we can't use DNS blocking or hostfile blocking. So changing the routing table seems to be the way to go.<\/p>\n<p>On Linux, using sudo if necessary:<\/p>\n<pre># check routing table\r\nroute -n\r\n# Add rule\r\nroute add 210.213.253.135 gw 127.0.0.1 lo\r\n# check routing table again\r\nroute -n\r\n# check desired result\r\nip route get\u00a0210.213.253.135<\/pre>\n<p>Gotcha<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you forgot to pay your bill. It happens. PLDT used to set an automated phone call to call you once a day until you paid. Now they have something much more irritating, and something that feels borderline illegal. What they do is they hijack your internet connection. Every four or five page loads, they &#8230; <a title=\"Blocking irritating PLDT Billing popups\" class=\"read-more\" href=\"https:\/\/play.datalude.com\/blog\/2016\/12\/blocking-irritating-pldt-billing-popups\/\" aria-label=\"Read more about Blocking irritating PLDT Billing popups\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1,4,3],"tags":[],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-it","category-linux","category-philippines"],"_links":{"self":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":0,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"wp:attachment":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}