Skip to content

Instantly share code, notes, and snippets.


Giorgos Logiotatidis glogiotatidis

View GitHub Profile
glogiotatidis /
Created Apr 22, 2016 — forked from teffalump/
OpenWRT adblock implementation

Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:


In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

import ipdb
import json
from rna.clients import RestModelClient
from rna.models import Note, Release
# Release notes for
# 30.0beta
# 31.0beta
# 31.0
# 31.1.0
You can’t perform that action at this time.