diff --git a/dns/bind/Makefile b/dns/bind/Makefile index cb60320cf..896390770 100644 --- a/dns/bind/Makefile +++ b/dns/bind/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= bind -PLUGIN_VERSION= 1.5.d +PLUGIN_VERSION= 1.5 PLUGIN_COMMENT= BIND domain name service PLUGIN_DEPENDS= bind914 PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/dns/bind/pkg-descr b/dns/bind/pkg-descr index 67647a915..ed8f806cb 100644 --- a/dns/bind/pkg-descr +++ b/dns/bind/pkg-descr @@ -11,6 +11,7 @@ Plugin Changelog 1.5 * Add basic zone management +* Add 6 new blacklists to DNSBL (hpHosts Ads, FSA, PSA, PUP; Blocklist.site Ads, Fraud, Phishing) 1.4 diff --git a/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Dnsbl.xml b/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Dnsbl.xml index 7a689fece..b1d658c03 100644 --- a/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Dnsbl.xml +++ b/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Dnsbl.xml @@ -13,10 +13,17 @@ AdAway List AdGuard List + Blocklist.site Ads + Blocklist.site Fraud + Blocklist.site Phishing Cameleon List Easy List EMD Malicious Domains List Easyprivacy List + hpHosts Ads + hpHosts FSA + hpHosts PSH + hpHosts PUP Hbbtv List Malwaredomain List NoCoin List diff --git a/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Domain.php b/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Domain.php index 625f62d7a..96e79eee6 100644 --- a/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Domain.php +++ b/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Domain.php @@ -45,7 +45,7 @@ class Domain extends BaseModel } // new serials on changed records foreach ($serialsToSet as $domain) { - $domain->serial = (string)date("YmdHis"); + $domain->serial = (string)date("ymdHi"); } return parent::serializeToConfig($validateFullModel, $disable_validation); } @@ -58,7 +58,7 @@ class Domain extends BaseModel { foreach ($this->domains->domain->iterateItems() as $domain) { if ($domain->getAttribute('uuid') == $uuid) { - $domain->serial = (string)date("YmdHis"); + $domain->serial = (string)date("ymdHi"); return $this; } } diff --git a/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt b/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt index 396259dba..805ed2ab0 100644 --- a/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt +++ b/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt @@ -83,6 +83,9 @@ POSSIBILITY OF SUCH DAMAGE.
+ diff --git a/dns/bind/src/opnsense/scripts/OPNsense/Bind/dnsbl.sh b/dns/bind/src/opnsense/scripts/OPNsense/Bind/dnsbl.sh index e95a54ae3..bb207263f 100755 --- a/dns/bind/src/opnsense/scripts/OPNsense/Bind/dnsbl.sh +++ b/dns/bind/src/opnsense/scripts/OPNsense/Bind/dnsbl.sh @@ -133,6 +133,55 @@ stevenblack() { rm ${WORKDIR}/stevenblack-raw } +blocklistads() { + # Blocklist.site Ads + ${FETCH} https://blocklist.site/app/dl/ads -o ${WORKDIR}/blocklistads-raw + sed "/\.$/d" ${WORKDIR}/blocklistads-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/127\.0\.0\.1/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" > ${WORKDIR}/blocklistads + rm ${WORKDIR}/blocklistads-raw +} + +blocklistfraud() { + # Blocklist.site Fraud + ${FETCH} https://blocklist.site/app/dl/fraud -o ${WORKDIR}/blocklistfraud-raw + sed "/\.$/d" ${WORKDIR}/blocklistfraud-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/127\.0\.0\.1/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" > ${WORKDIR}/blocklistfraud + rm ${WORKDIR}/blocklistfraud-raw +} + +blocklistphishing() { + # Blocklist.site Phishing + ${FETCH} https://blocklist.site/app/dl/phishing -o ${WORKDIR}/blocklistphishing-raw + sed "/\.$/d" ${WORKDIR}/blocklistphishing-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/127\.0\.0\.1/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" > ${WORKDIR}/blocklistphishing + rm ${WORKDIR}/blocklistphishing-raw +} + +hphosts-ads() { + # hphosts-ads + ${FETCH} https://hosts-file.net/ad_servers.txt -o ${WORKDIR}/hphosts-ads-raw + sed "/\.$/d" ${WORKDIR}/hphosts-ads-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" | tr -d '\r' | awk 'BEGIN{FS=OFS=" ";}{print $2;}' > ${WORKDIR}/hphosts-ads + rm ${WORKDIR}/hphosts-ads-raw +} + +hphosts-fsa() { + # hphosts-fsa + ${FETCH} https://hosts-file.net/fsa.txt -o ${WORKDIR}/hphosts-fsa-raw + sed "/\.$/d" ${WORKDIR}/hphosts-fsa-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" | tr -d '\r' | awk 'BEGIN{FS=OFS=" ";}{print $2;}' > ${WORKDIR}/hphosts-fsa + rm ${WORKDIR}/hphosts-fsa-raw +} + +hphosts-psh() { + # hphosts-psh + ${FETCH} https://hosts-file.net/psh.txt -o ${WORKDIR}/hphosts-psh-raw + sed "/\.$/d" ${WORKDIR}/hphosts-psh-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" | tr -d '\r' | awk 'BEGIN{FS=OFS=" ";}{print $2;}' > ${WORKDIR}/hphosts-psh + rm ${WORKDIR}/hphosts-psh-raw +} + +hphosts-pup() { + # hphosts-pup + ${FETCH} https://hosts-file.net/pup.txt -o ${WORKDIR}/hphosts-pup-raw + sed "/\.$/d" ${WORKDIR}/hphosts-pup-raw | sed "/^#/d" | sed "/\_/d" | sed "/^\s*$/d" | sed "/\.\./d" | sed "s/^\.//g" | sed "/localhost/d" | sed "/255\.255\.255\.255/d" | sed "/\:\:1/d" | sed "/fe80\:\:1/d" | sed "/ff00\:\:/d" | sed "/ff02\:\:/d" | sed "/0\.0\.0\.0 0\.0\.0\.0/d" | tr -d '\r' | awk 'BEGIN{FS=OFS=" ";}{print $2;}' > ${WORKDIR}/hphosts-pup + rm ${WORKDIR}/hphosts-pup-raw +} + hbbtv() { # HBBTV List ${FETCH} https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/hbbtv.txt -o ${WORKDIR}/hbbtv-raw @@ -164,7 +213,7 @@ zeusabuse() { install() { # Put all files in correct format for FILE in $(find ${WORKDIR} -type f); do - awk '{ if (length($1) < 245) print ""$1" CNAME .\n*."$1" CNAME ."}' ${FILE} | sort -u > ${FILE}.inc + awk '{ if (length($1) < 220) print ""$1" CNAME .\n*."$1" CNAME ."}' ${FILE} | sort -u > ${FILE}.inc done # Merge resulting files (/dev/null in case there are none) cat $(find ${WORKDIR} -type f -name "*.inc") /dev/null | sort -u > ${DESTDIR}/dnsbl.inc @@ -187,6 +236,15 @@ for CAT in $(echo ${DNSBL} | tr ',' ' '); do ag) adguard ;; + bla) + blocklistads + ;; + blf) + blocklistfraud + ;; + blp) + blocklistphishing + ;; ca) cameleon ;; @@ -199,6 +257,18 @@ for CAT in $(echo ${DNSBL} | tr ',' ' '); do emd) emdlist ;; + hpa) + hphosts-ads + ;; + hpf) + hphosts-fsa + ;; + hpp) + hphosts-psh + ;; + hup) + hphosts-pup + ;; ht) hbbtv ;;