diff --git a/dns/Makefile b/dns/Makefile index 6de9331776a7..2b58160af500 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -1,250 +1,251 @@ COMMENT = Domain Name Service tools SUBDIR += acme-dns SUBDIR += adns SUBDIR += amass SUBDIR += axfr2acl SUBDIR += bind-tools SUBDIR += bind9-devel SUBDIR += bind918 SUBDIR += bind920 SUBDIR += bindgraph SUBDIR += blocky SUBDIR += c-ares SUBDIR += cli53 SUBDIR += coredns SUBDIR += ddclient SUBDIR += ddns SUBDIR += denominator SUBDIR += dhisd SUBDIR += dlint SUBDIR += dns-ui + SUBDIR += dns-blackhole SUBDIR += dns2blackhole SUBDIR += dns2tcp SUBDIR += dnsblast SUBDIR += dnscap SUBDIR += dnscontrol SUBDIR += dnscrypt-proxy2 SUBDIR += dnscrypt-wrapper SUBDIR += dnsdbck SUBDIR += dnsdbflex SUBDIR += dnsdbq SUBDIR += dnsdist SUBDIR += dnsenum SUBDIR += dnsflood SUBDIR += dnshistory SUBDIR += dnsjava SUBDIR += dnsjit SUBDIR += dnsmasq SUBDIR += dnsmasq-devel SUBDIR += dnsmax-perl SUBDIR += dnsperf SUBDIR += dnsproxy SUBDIR += dnsrecon SUBDIR += dnsreflector SUBDIR += dnssec-rr SUBDIR += dnstable SUBDIR += dnstable-convert SUBDIR += dnstop SUBDIR += dnstracer SUBDIR += dnstracer-rs SUBDIR += dnsutl SUBDIR += dnsviz SUBDIR += dnswalk SUBDIR += dnswall SUBDIR += dnsx SUBDIR += doc SUBDIR += dog SUBDIR += doggo SUBDIR += doh-proxy SUBDIR += dq SUBDIR += drool SUBDIR += dsc SUBDIR += dynip SUBDIR += encrypted-dns-server SUBDIR += fastresolve SUBDIR += flamethrower SUBDIR += fpdns SUBDIR += gdnsd2 SUBDIR += gdnsd3 SUBDIR += gen6dns SUBDIR += getdns SUBDIR += godns SUBDIR += hesiod SUBDIR += hetzner_ddns SUBDIR += hostdb SUBDIR += https_dns_proxy SUBDIR += idnkit SUBDIR += idnkit2 SUBDIR += inadyn SUBDIR += ipcheck SUBDIR += kadnode SUBDIR += kf5-kdnssd SUBDIR += kf6-kdnssd SUBDIR += knock SUBDIR += knot-resolver SUBDIR += knot3 SUBDIR += ldapdns SUBDIR += ldns SUBDIR += letsdns SUBDIR += libbind SUBDIR += libidn SUBDIR += libidn2 SUBDIR += libmicrodns SUBDIR += libnspsl SUBDIR += libpsl SUBDIR += linux-c7-libasyncns SUBDIR += linux-rl9-libasyncns SUBDIR += lua-resty-dns SUBDIR += luaunbound SUBDIR += mDNSResponder_nss SUBDIR += maradns SUBDIR += mdnsd SUBDIR += mosdns SUBDIR += namesilo_ddns SUBDIR += nextdns SUBDIR += noip SUBDIR += nsd SUBDIR += nslint SUBDIR += nsnotifyd SUBDIR += nsping SUBDIR += nss_mdns SUBDIR += nss_resinit SUBDIR += opendnssec2 SUBDIR += openresolv SUBDIR += p5-AnyEvent-CacheDNS SUBDIR += p5-AnyEvent-DNS-EtcHosts SUBDIR += p5-App-DSC-DataTool SUBDIR += p5-BIND-Conf_Parser SUBDIR += p5-BIND-Config-Parser SUBDIR += p5-DNS-Config SUBDIR += p5-DNS-EasyDNS SUBDIR += p5-DNS-Ldns SUBDIR += p5-DNS-Zone SUBDIR += p5-DNS-ZoneParse SUBDIR += p5-DNS-nsdiff SUBDIR += p5-Data-Validate-Domain SUBDIR += p5-IO-Async-Resolver-DNS SUBDIR += p5-Mozilla-PublicSuffix SUBDIR += p5-Net-Amazon-Route53 SUBDIR += p5-Net-Bonjour SUBDIR += p5-Net-DNS SUBDIR += p5-Net-DNS-Async SUBDIR += p5-Net-DNS-Check SUBDIR += p5-Net-DNS-Codes SUBDIR += p5-Net-DNS-Lite SUBDIR += p5-Net-DNS-Match SUBDIR += p5-Net-DNS-Paranoid SUBDIR += p5-Net-DNS-RR-SRV-Helper SUBDIR += p5-Net-DNS-Resolver-Mock SUBDIR += p5-Net-DNS-Resolver-Programmable SUBDIR += p5-Net-DNS-SEC SUBDIR += p5-Net-DNS-TestNS SUBDIR += p5-Net-DNS-ToolKit SUBDIR += p5-Net-DNS-Zone-Parser SUBDIR += p5-Net-DNS-ZoneFile-Fast SUBDIR += p5-Net-DNSBL-MultiDaemon SUBDIR += p5-Net-DNSBL-Statistics SUBDIR += p5-Net-DRI SUBDIR += p5-Net-Domain-ExpireDate SUBDIR += p5-Net-Domain-TLD SUBDIR += p5-Net-LibIDN SUBDIR += p5-Net-LibIDN2 SUBDIR += p5-Net-Nslookup SUBDIR += p5-Net-RBLClient SUBDIR += p5-Net-RNDC SUBDIR += p5-POE-Component-Client-DNS SUBDIR += p5-POE-Component-Client-DNS-Recursive SUBDIR += p5-POE-Component-Client-DNSBL SUBDIR += p5-POE-Component-Resolver SUBDIR += p5-POE-Component-Server-DNS SUBDIR += p5-POE-Filter-DNS-TCP SUBDIR += p5-Tie-DNS SUBDIR += p5-URBL-Prepare SUBDIR += p5-Zonemaster-Backend SUBDIR += p5-Zonemaster-CLI SUBDIR += p5-Zonemaster-Engine SUBDIR += p5-Zonemaster-LDNS SUBDIR += packetq SUBDIR += pdnsd SUBDIR += pear-File_DNS SUBDIR += pear-Horde_Idna SUBDIR += pear-Net_DNS2 SUBDIR += pear-Net_DNS21 SUBDIR += powerdns SUBDIR += powerdns-recursor SUBDIR += prometheus-dnssec-exporter SUBDIR += public_suffix_list SUBDIR += py-adns SUBDIR += py-aiodns SUBDIR += py-cloudflare SUBDIR += py-dns-crawler SUBDIR += py-dns-lexicon SUBDIR += py-dnslib SUBDIR += py-dnspython SUBDIR += py-dnspython1 SUBDIR += py-easyzone SUBDIR += py-idna SUBDIR += py-ldns SUBDIR += py-libknot SUBDIR += py-localzone SUBDIR += py-ns1-python SUBDIR += py-publicsuffix SUBDIR += py-publicsuffix2 SUBDIR += py-publicsuffixlist SUBDIR += py-py3dns SUBDIR += py-pybonjour SUBDIR += py-pycares SUBDIR += py-pydnstable SUBDIR += py-pywdns SUBDIR += py-tld SUBDIR += py-tldextract SUBDIR += q-dns SUBDIR += qmdnsengine SUBDIR += radns SUBDIR += rbldnsd SUBDIR += rbllookup SUBDIR += rbllookup-ng SUBDIR += rdap SUBDIR += renewck SUBDIR += rpsl2acl SUBDIR += rubygem-dnsruby SUBDIR += rubygem-gitlab-net-dns SUBDIR += rubygem-google-apis-dns_v1 SUBDIR += rubygem-google-apis-dns_v1-gitlab SUBDIR += rubygem-google-cloud-dns SUBDIR += rubygem-idn-ruby SUBDIR += rubygem-net-dns SUBDIR += rubygem-public_suffix SUBDIR += rubygem-public_suffix_service SUBDIR += rubygem-resolv SUBDIR += rubygem-resolv-replace SUBDIR += rubygem-simpleidn SUBDIR += rubygem-simpleidn02 SUBDIR += rubygem-validates_hostname SUBDIR += rubygem-validates_hostname-gitlab SUBDIR += rubygem-zonefile SUBDIR += samba-nsupdate SUBDIR += scavenge SUBDIR += sleuth SUBDIR += subfinder SUBDIR += tldx SUBDIR += totd SUBDIR += udns SUBDIR += unbound SUBDIR += utdns SUBDIR += vhostcname SUBDIR += vizone SUBDIR += void-zones-tools SUBDIR += walker SUBDIR += wdns SUBDIR += whoseip SUBDIR += wrapsrv SUBDIR += yadifa SUBDIR += yandex-ddns SUBDIR += zdns SUBDIR += zkt SUBDIR += zns SUBDIR += zonenotify .include diff --git a/dns/dns-blackhole/Makefile b/dns/dns-blackhole/Makefile new file mode 100644 index 000000000000..e901d308b556 --- /dev/null +++ b/dns/dns-blackhole/Makefile @@ -0,0 +1,41 @@ +PORTNAME= dns-blackhole +PORTVERSION= 0.1.0 +CATEGORIES= dns + +MAINTAINER= dvl@FreeBSD.org +COMMENT= Send ads and trackers to a dead-end +WWW= https://github.com/morganwdavis/dns-blackhole + +USE_GITHUB= yes +GH_ACCOUNT= morganwdavis + +NO_BUILD= yes + +BINFILES= dns-blackhole.sh +CONFFILES= dns-blackhole.conf +DBFILES= allowed_hosts blocked_hosts + +PERIODIC= ${PREFIX}/etc/periodic/daily + +SUB_FILES= 901.dns-blackhole +PLIST_SUB= PERIODIC=${PERIODIC} + +do-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PERIODIC} + +.for f in ${BINFILES} + ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin +.endfor + +.for f in ${CONFFILES} + ${REINPLACE_CMD} -e "s:%%PORTNAME%%:${PORTNAME}:g" ${WRKSRC}/${f}.dist + ${INSTALL_DATA} ${WRKSRC}/${f}.dist ${STAGEDIR}${ETCDIR}/${f}.sample +.endfor + +.for f in ${DBFILES} + ${INSTALL_DATA} ${WRKSRC}/${f}.dist ${STAGEDIR}${ETCDIR}/${f}.sample +.endfor + + ${INSTALL_SCRIPT} ${WRKDIR}/901.dns-blackhole ${STAGEDIR}${PERIODIC}/ + +.include diff --git a/dns/dns-blackhole/distinfo b/dns/dns-blackhole/distinfo new file mode 100644 index 000000000000..b6143ef68deb --- /dev/null +++ b/dns/dns-blackhole/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1756390823 +SHA256 (morganwdavis-dns-blackhole-0.1.0_GH0.tar.gz) = 814ea228695c7054f042b598cb0bec0b893794213c07534e6fb5517f017e541a +SIZE (morganwdavis-dns-blackhole-0.1.0_GH0.tar.gz) = 5888 diff --git a/dns/dns-blackhole/files/901.dns-blackhole.in b/dns/dns-blackhole/files/901.dns-blackhole.in new file mode 100755 index 000000000000..4090a5b6d6ea --- /dev/null +++ b/dns/dns-blackhole/files/901.dns-blackhole.in @@ -0,0 +1,22 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$dns_blackhole_enable" in + [Yy][Ee][Ss]) + + echo + %%PREFIX%%/bin/dns-blackhole.sh -c /usr/local/etc/dns-blackhole/dns-blackhole.conf update + ;; + *) + rc=0 + ;; +esac + +exit $rc diff --git a/dns/dns-blackhole/files/patch-dns-blackhole.conf.dist b/dns/dns-blackhole/files/patch-dns-blackhole.conf.dist new file mode 100644 index 000000000000..d9569a98163e --- /dev/null +++ b/dns/dns-blackhole/files/patch-dns-blackhole.conf.dist @@ -0,0 +1,20 @@ +--- dns-blackhole.conf.dist.orig 2025-08-18 11:53:06 UTC ++++ dns-blackhole.conf.dist +@@ -3,7 +3,7 @@ + # + + # Directory in which config and custom host files reside +-dns_blackhole_dir="/usr/local/etc/dns-blackhole" ++dns_blackhole_dir="/var/db/%%PORTNAME%%" + + # Path to your BIND namedb directory where included files go + named_includes_dir="/usr/local/etc/namedb" +@@ -12,7 +12,7 @@ named_zone_files_dir="/usr/local/etc/namedb" + named_zone_files_dir="/usr/local/etc/namedb" + + # Temporary directory in which to fetch and build zone files +-tmp_dir="/var/tmp/dns-blackhole" ++tmp_dir="/var/tmp/%%PORTNAME%%" + + # The fully qualified hostname of your nameserver + dns_server_hostname="localhost" diff --git a/dns/dns-blackhole/pkg-descr b/dns/dns-blackhole/pkg-descr new file mode 100644 index 000000000000..3e6e517ad26d --- /dev/null +++ b/dns/dns-blackhole/pkg-descr @@ -0,0 +1,7 @@ +If you're running your own home network with a Unix-based server, you can +easily integrate a DNS blackhole into a local BIND DNS service -- and best +of all, it's completely free. If you're already using BIND and know your +way around it, you can use this script to manage BIND's Response Policy +Zone (RPZ) feature. RPZ is designed for DNS firewall/blocking purposes. +The script should run on *BSD and Linux distros with proper pathnames +configured. Out of the box, it has a FreeBSD default configuration. diff --git a/dns/dns-blackhole/pkg-plist b/dns/dns-blackhole/pkg-plist new file mode 100644 index 000000000000..987d4a410b10 --- /dev/null +++ b/dns/dns-blackhole/pkg-plist @@ -0,0 +1,5 @@ +bin/dns-blackhole.sh +etc/periodic/daily/901.dns-blackhole +@sample %%ETCDIR%%/allowed_hosts.sample +@sample %%ETCDIR%%/blocked_hosts.sample +@sample %%ETCDIR%%/dns-blackhole.conf.sample