DBAB(8)

πŸ“¦
version 1.6.1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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-packer at 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 image served locally by the dbab-svr pixel server.
  • Maintenance free. you don't need to maintain the list of ad sites yourself. the block list can be downloaded from pgl.yoyo.org periodically. 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.addr The IP addresses that dbab-svr listens on. Defaults to 127.0.0.1 and ::1.
  • /etc/dbab/dbab.list- The entries you want to filter out from the pgl.yoyo.org lists. List sites you still wish to visit there.
  • /etc/dbab/dbab.list+ The entries you want to add to blocking list on top of the pgl.yoyo.org list, used by dbab-add-list.
  • /etc/dnsmasq.d/dbab-map.adblock.conf The file which dbab-get-list updates.
  • /etc/dnsmasq.d/dbab-map.trashsites.conf The file which dbab-add-list updates.
  • /usr/share/doc/dbab/dbab.md The more detailed introduction and installation guild.

πŸ’– AUTHOR(S) πŸ’–

Copyright: 2013~2023 Tong SUN

the credits go to:


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