DBAB(8)
π DBAB β the manual, but make it slay π
okay bestie, so this is dbab(8) from the System Manager's Manual, and it's genuinely one of my faves. it's dbab β dnsmasq based ad blocking. no cap. let's get into it π
π’ NOTICE π’
- if you like dbab, pls go check out its sister project
dbab-packerat https://github.com/suntong/dbab-packer/. it's giving family π«Ά - this has been the author's default way of using dbab for quite a while now, which is why they're officially recommending it over the host-package-installing approach. periodt.
- heads up though: the Debian package will get updated for the last time, and then packaging stops after 2021. so like. enjoy it while it's here π
β¨ SYNOPSIS β¨
# start dbab-svr server
/etc/init.d/dbab start
# stop dbab-svr server
/etc/init.d/dbab stop
# get/update ad blocking list
/usr/sbin/dbab-get-list
# add your own to the ad blocking list
/usr/sbin/dbab-add-list
like, that's the whole vibe check right there. start it, stop it, refresh the list, add your own. iconic πΈ
π¦ DESCRIPTION π¦
dbab provides a total solution for SOHO service environment, and it smoothly integrates DHCP, DNS, local caching and Ad blocking into one harmony operation. literally all of it, coexisting, no drama π
the ad blocking itself is done by DNSmasq and dbab-svr the pixel server β i.e., it happens at the DNS level. so every single request to an ads-site gets blocked right there at DNS level. no more user space extensive pattern matching necessary AT ALL. it's giving efficiency π
and bestie, it works for your mobile devices too. you don't need to install anything on your mobile devices to enjoy the ad-free and speed-up browsing. not a single thing. π
π ALTERNATIVES π
so people may also use browsers' adblock-plus extension to block ads, but like... fewer of them ever think over how it works internally. π here's the overview of Adblock Plus from a thousand mile high [1] β whenever the browser needs to load something, the extension kicks in and does a thorough pattern matching of all known ad urls using regular expressions, then hectically replaces all found ad urls with something else. and this happens on every page, every load, and every component of the web page, using JavaScript. so by nature it's slow and CPU intensive β at least inefficient, fr fr. π
there are other alternatives to this too, e.g., privoxy, but the concepts are the same.
[1] http://adblockplus.org/en/faq_internal
π₯ ADVANTAGES π₯
comparing to other ad-blocking efforts, dbab will be super light. only a few operations are enough to determine and stop the ads. no heavy-lifting (aka no CPU intensive URL pattern matching) necessary. thus it's super light and lightning fast. β‘
the advantages of using dbab are:
- Work at the DNS level. Leave the web pages intact, without any pattern matching, string substitution, and/or html elements replacing. nothing touched, nothing broken, chef's kiss π
- Work for your mobile devices as well. were you previously in the dilemma of choosing ads free or slow response for your mobile devices (iphone, ipad, etc)? now you don't. you don't need to install any thing to your mobile devices for them to enjoy the ad-free browsing experience. moreover, their browsing speed will increase dramatically on revisited pages/images. it's the glow up π
- Serve instantly. all ads will be replaced by a
1x1 pixel gif imageserved locally by thedbab-svrpixel server. - Maintenance free. you don't need to maintain the list of ad sites yourself. the block list can be downloaded from
pgl.yoyo.orgperiodically. and if you don't like some of the entries there, you can add-to or remove-from that list easily. no stress π§
π DBAB-SVR π
the dbab-svr is a super minimal web / pixel server, and it has exactly one purpose β serving a 1x1 pixel transparent gif file. one job. does it perfectly. β
it can optionally provide the automatic WPAD service as well, if so configured. by default it listens on localhost, and that's configurable from the file /etc/dbab/dbab.addr.
π DBAB-GET-LIST π
the dbab-get-list is used to get the dnsmasq blocking list from pgl.yoyo.org to be used by DNSmasq. the result gets stored as /etc/dnsmasq.d/dbab-map.adblock.conf.
you can run it once, or put it in a cron job so as to update the block list periodically. e.g., to update on a weekly basis:
ln -s /usr/sbin/dbab-get-list /etc/cron.weekly/
and it is safe to do so, even if the machine might be offline when the cron job is triggered. the existing file will be intact if the download failed. so like, worst case nothing happens. love that for you π
π DBAB-ADD-LIST π
you can use dbab-add-list to add your own entries to the dnsmasq blocking list, if the list from pgl.yoyo.org is not sufficient for you. the result gets stored as /etc/dnsmasq.d/dbab-map.trashsites.conf.
πΈ DBAB-CHK-LIST πΈ
the dbab-chk-list can help you to check if your own list is already covered by pgl.yoyo.org. a lil vibe check on your list, if you will π«Ά
π§ DHCP-ADD-WPAD π§
the dhcp-add-wpad will take the content in /etc/dbab/dbab.addr as the IPs (one per line) of the host of the dhcp server, the squid caching server, then enable the automatic WPAD service within the system, with the help of the DNS and DHCP server.
NB: since dnsmasq will only serve one IPv4 and IPv6 address for a host-record, only the last entry of each type will be resolved. so yeah, don't stack 'em and expect all of 'em, bestie π
π FILES π
/etc/dbab/dbab.addrThe IP addresses thatdbab-svrlistens on. Defaults to127.0.0.1and::1./etc/dbab/dbab.list-The entries you want to filter out from thepgl.yoyo.orglists. List sites you still wish to visit there./etc/dbab/dbab.list+The entries you want to add to blocking list on top of thepgl.yoyo.orglist, used bydbab-add-list./etc/dnsmasq.d/dbab-map.adblock.confThe file whichdbab-get-listupdates./etc/dnsmasq.d/dbab-map.trashsites.confThe file whichdbab-add-listupdates./usr/share/doc/dbab/dbab.mdThe more detailed introduction and installation guild.
π AUTHOR(S) π
Copyright: 2013~2023 Tong SUN
the credits go to:
- the original
pixelserv, downloaded from http://proxytunnel.sourceforge.net/files/pixelserv.pl.txt Wrote by Piet Wintjens, with BSD (no advertising clause) license. - and Tim Spriggs https://github.com/imoverclocked who single-handily almost rewrote the pixel server code while bringing the IPv6 support to it. main character energy, honestly π
and that's the whole page, bestie!! this lil manual is from the System Manager's Manual, dated September 2025, and it's DBAB(8). go forth and block those ads at the DNS level, you absolute legend πβ¨π
π¦ where this page comes from
- ubuntu resolute: dbab 1.6.1-1 Β· BSD-3-Clause
- ubuntu stonking: dbab 1.6.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms