bound pulls data from The Big Blocklist Collection and generates an unbound configuration file that refuses lookup of the selected domains.
This is useful for blocking ads and malware, in much the same way as pi-hole. You might prefer this method over pi-hole if:
you’re already using unbound
you don’t love dnsmasq (which pi-hole is based on)
you don’t think a DNS resolver should require a web server
you distrust thousands of lines of bash to make major changes to your system
If the above don’t apply to you, or you’re looking for an opinionated, ad-blocking resolver with a pretty user interface and automated installer, pi-hole is probably what you want.
Requirements
a gnu/linux or *bsd operating system
a working unbound installation
python3.6+ (for debian-like systems: sudo apt-get install python3)
python3 requests library (for debian-like systems: sudo apt-get install python3-requests)
Installation
python setup.py install
Usage
bound is intended to be used with blocklists from The Big Blocklist Collection.
Run without any options, bound will:
download the latest “ticked” list from the Big Blocklist Collection
download all of the blocklists listed in the “ticked” list
parse, deduplicate, and assemble a list of domains from the retrieved blocklists
remove any safelisted domains from the list
write /etc/unbound/unbound.conf.d/blocklist.conf to configure unbound for blocking the listed domains
check the unbound configuration, and exit in case of any errors
restart unbound
To accomplish the above, you will probably need to run bound as the root user.
There are options that support running as a non-root user, as well as specifying the blocklist URL, an optional safelist URL, and local blocklist and safelist files.
For a description of all the options, run bound -h.
Supported File Formats
bound supports blocklists and safelists in the following formats:
one domain per line
advanbusiness.com aoldaily.com aolon1ine.com applesoftupdate.com arrowservice.net
one domain per line, with inline comments
quantummetric.com # Cydia/Bigboss cydia.saurik.com.cdngc.net # Cydia/Bigboss production-ultimate-assets.ratecity.com.au # NewsCorp saber.srvcs.tumblr.com # Tumblr fd-fp3.wg1.b.yahoo.com # Tumblr
hosts file format
127.0.0.1 0koryu0.easter.ne.jp 127.0.0.1 109-204-26-16.netconnexion.managedbroadband.co.uk 127.0.0.1 1866809.securefastserver.com 127.0.0.1 2amsports.com 127.0.0.1 4dexports.com
single-digit hosts file format
0 1app.blob.core.windows.net 0 2912a.v.fwmrm.net 0 29773.v.fwmrm.net 0 5be16.v.fwmrm.net 0 888casino.com
Metadata
Release files for bound 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bound-1.0.1.tar.gz | 9.8 kB | Without provenance | Details for bound-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bound-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for bound-1.0.1-py3-none-any.whl |
Total release size: 17.8 kB
Release files / bound-1.0.1.tar.gz
| Download URL | bound-1.0.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1f36cbe7d7aa5f7955043db799b8f35d5d0174888bec3b711049fecafca8730
|
|
BLAKE2b-256 checksum How to use checksums |
e533a08bc17894434d7f8f999f22c0fac352ed5a836c1ee357f615174c86ea97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / bound-1.0.1-py3-none-any.whl
| Download URL | bound-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea32297c4b1698f3130129fb63e83617d24692434cf99c0a9cd74f439d13a923
|
|
BLAKE2b-256 checksum How to use checksums |
e0813631c9f410038826e5d4157f99048600bc33478988232c39c9758ee2e712
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for bound 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.