Commit Diff


commit - ee7e54463c1b57c529898eec5a69b1bf54cdc204
commit + b17c3216887f4aae2350f39d730ae074c820c613
blob - /dev/null
blob + 52788882c22b030c9d972f621823f9905acaeb66 (mode 644)
--- /dev/null
+++ wiki.d/Unbound.Adblock
@@ -0,0 +1,16 @@
+version=pmwiki-2.3.20 ordered=1 urlencoded=1
+agent=w3m/0.5.3+git20230718
+author=jrmu
+charset=UTF-8
+csum=
+ctime=1733893672
+host=2602:fccf:1:2243::
+name=Unbound.Adblock
+rev=1
+targets=
+text=(:title Configuring Unbound as adblocker:)%0a!! Unbound as an adblocker%0aUnbound, by using blacklists, can play the role of an adblocker. Such curated list can be found on [[https://oisd.nl/setup/unbound]]. In order to use it, you have to:%0a%0a# download one of the lists, for example [[https://small.oisd.nl/unbound]]%0a# give it a suitable name like unbound-bl.conf%0a# place it in /var/unbound/etc%0a# add this line in unbound.conf:%0a%0a[@%0ainclude: "/var/unbound/etc/unbound"%0a@]%0a%0a%0aIf this produces no error, you can restart the service with rcctl. To check that the blacklist prevents the name resolver from getting an IP, the "dig" command of a blacklisted domain should return 0.0.0.0. %0a%0aFor example:%0a%0a[@%0a$ dig trc.taboola.com%0a...%0a;; ANSWER SECTION:%0atrc.taboola.com.        3600    IN      A       0.0.0.0%0a...%0a@]%0a%0aSee Also:%0a%0ahttps://www.geoghegan.ca/unbound-adblock.html%0a%0a
+time=1733893672
+title=Configuring Unbound as adblocker
+author:1733893672=jrmu
+diff:1733893672:1733893672:=1,30d0%0a%3c (:title Configuring Unbound as adblocker:)%0a%3c !! Unbound as an adblocker%0a%3c Unbound, by using blacklists, can play the role of an adblocker. Such curated list can be found on [[https://oisd.nl/setup/unbound]]. In order to use it, you have to:%0a%3c %0a%3c # download one of the lists, for example [[https://small.oisd.nl/unbound]]%0a%3c # give it a suitable name like unbound-bl.conf%0a%3c # place it in /var/unbound/etc%0a%3c # add this line in unbound.conf:%0a%3c %0a%3c [@%0a%3c include: "/var/unbound/etc/unbound"%0a%3c @]%0a%3c %0a%3c %0a%3c If this produces no error, you can restart the service with rcctl. To check that the blacklist prevents the name resolver from getting an IP, the "dig" command of a blacklisted domain should return 0.0.0.0. %0a%3c %0a%3c For example:%0a%3c %0a%3c [@%0a%3c $ dig trc.taboola.com%0a%3c ...%0a%3c ;; ANSWER SECTION:%0a%3c trc.taboola.com.        3600    IN      A       0.0.0.0%0a%3c ...%0a%3c @]%0a%3c %0a%3c See Also:%0a%3c %0a%3c https://www.geoghegan.ca/unbound-adblock.html%0a%3c %0a
+host:1733893672=2602:fccf:1:2243::
blob - /dev/null
blob + 043157983849ebff19d0e3d584e1089166876c4f (mode 644)
--- /dev/null
+++ wiki.d/Unbound.Opennic
@@ -0,0 +1,16 @@
+version=pmwiki-2.3.20 ordered=1 urlencoded=1
+agent=w3m/0.5.3+git20230718
+author=jrmu
+charset=UTF-8
+csum=
+ctime=1733895099
+host=2602:fccf:1:2243::
+name=Unbound.Opennic
+rev=1
+targets=
+text=(:title Configuring Unbound to use OpenNIC:)%0a%0aPut this at the bottom of the file:%0a%0a[@%0aforward-zone:%0a        name: "."                               # use for ALL queries%0aforward-addr: 163.53.248.170%0aforward-addr: 103.236.162.119%0aforward-addr: 192.99.85.244%0aforward-addr: 31.171.251.118%0aforward-addr: 51.254.25.115%0aforward-addr: 46.101.70.183%0aforward-addr: 45.71.112.70%0aforward-addr: 87.98.175.85%0aforward-addr: 185.208.208.141%0aforward-addr: 89.35.39.64%0aforward-addr: 87.98.175.85%0aforward-addr: 172.98.193.42%0aforward-addr: 111.67.20.8%0a@]%0a%0aThese are IP addresses for DNS servers which I got from [[https://servers.opennic.org/]]. However, the servers change regularly so make sure you update the list.%0a%0a[@%0aforward-zone:%0a        name: "."%0a        forward-addr: 185.117.154.144%0a        forward-addr: 165.227.40.43%0a        forward-addr: 217.144.132.169%0a        forward-addr: 212.237.22.141%0a        forward-addr: 165.227.108.86%0a@]%0a%0a%0aThe forward-addr lines indicate which nameserver unbound will query. You can find a list of public servers on [[https://servers.opennic.org/|OpenNIC]].%0a%0a'''Tip''': To quickly get the IPs from OpenNIC, navigate to servers.opennic.org, click on the OK button at the top, then open up your web browser's javascript console window and run this command:%0a%0a[@%0adocument.clear();data=document.querySelectorAll("html body div#frame div#view div#srvlist div p");document.body.innerText="forward-addr: 9.9.9.9";data.forEach(line=>{%0aif (line.childNodes[0].childNodes[1].title == "No logs kept"){%0adocument.body.innerHTML+=`%3cbr>forward-addr: ${line.childNodes[2].childNodes[0].data}`;%0a}%0a});%0a@]%0a%0aYou can also run these command:%0aAttach:unbound.txt%0a%0a(:if false:)%0aif you are using another server as a master, set forwarding from this server as a priority:%0a[@%0aforward-zone:%0a        name: "example.com."%0a        forward-addr: 10.10.10.10@53%0a        forward-first: no%0a        forward-no-cache: no%0a@]%0a(:ifend:)%0a%0aIf you need to store local zones, add a block to the "server" section about it:%0a[@%0a        local-zone: "localhost." static%0a        local-data: "localhost. 10800 IN NS localhost."%0a        local-data: "localhost. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"%0a        local-data: "localhost. 10800 IN A 127.0.0.1"%0a        local-data: "localhost. 10800 IN AAAA ::1"%0a@]%0a%0a%0a
+time=1733895099
+title=Configuring Unbound to use OpenNIC
+author:1733895099=jrmu
+diff:1733895099:1733895099:=1,71d0%0a%3c (:title Configuring Unbound to use OpenNIC:)%0a%3c %0a%3c Put this at the bottom of the file:%0a%3c %0a%3c [@%0a%3c forward-zone:%0a%3c         name: "."                               # use for ALL queries%0a%3c forward-addr: 163.53.248.170%0a%3c forward-addr: 103.236.162.119%0a%3c forward-addr: 192.99.85.244%0a%3c forward-addr: 31.171.251.118%0a%3c forward-addr: 51.254.25.115%0a%3c forward-addr: 46.101.70.183%0a%3c forward-addr: 45.71.112.70%0a%3c forward-addr: 87.98.175.85%0a%3c forward-addr: 185.208.208.141%0a%3c forward-addr: 89.35.39.64%0a%3c forward-addr: 87.98.175.85%0a%3c forward-addr: 172.98.193.42%0a%3c forward-addr: 111.67.20.8%0a%3c @]%0a%3c %0a%3c These are IP addresses for DNS servers which I got from [[https://servers.opennic.org/]]. However, the servers change regularly so make sure you update the list.%0a%3c %0a%3c [@%0a%3c forward-zone:%0a%3c         name: "."%0a%3c         forward-addr: 185.117.154.144%0a%3c         forward-addr: 165.227.40.43%0a%3c         forward-addr: 217.144.132.169%0a%3c         forward-addr: 212.237.22.141%0a%3c         forward-addr: 165.227.108.86%0a%3c @]%0a%3c %0a%3c %0a%3c The forward-addr lines indicate which nameserver unbound will query. You can find a list of public servers on [[https://servers.opennic.org/|OpenNIC]].%0a%3c %0a%3c '''Tip''': To quickly get the IPs from OpenNIC, navigate to servers.opennic.org, click on the OK button at the top, then open up your web browser's javascript console window and run this command:%0a%3c %0a%3c [@%0a%3c document.clear();data=document.querySelectorAll("html body div#frame div#view div#srvlist div p");document.body.innerText="forward-addr: 9.9.9.9";data.forEach(line=>{%0a%3c if (line.childNodes[0].childNodes[1].title == "No logs kept"){%0a%3c document.body.innerHTML+=`%3cbr>forward-addr: ${line.childNodes[2].childNodes[0].data}`;%0a%3c }%0a%3c });%0a%3c @]%0a%3c %0a%3c You can also run these command:%0a%3c Attach:unbound.txt%0a%3c %0a%3c (:if false:)%0a%3c if you are using another server as a master, set forwarding from this server as a priority:%0a%3c [@%0a%3c forward-zone:%0a%3c         name: "example.com."%0a%3c         forward-addr: 10.10.10.10@53%0a%3c         forward-first: no%0a%3c         forward-no-cache: no%0a%3c @]%0a%3c (:ifend:)%0a%3c %0a%3c If you need to store local zones, add a block to the "server" section about it:%0a%3c [@%0a%3c         local-zone: "localhost." static%0a%3c         local-data: "localhost. 10800 IN NS localhost."%0a%3c         local-data: "localhost. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"%0a%3c         local-data: "localhost. 10800 IN A 127.0.0.1"%0a%3c         local-data: "localhost. 10800 IN AAAA ::1"%0a%3c @]%0a%3c %0a%3c %0a
+host:1733895099=2602:fccf:1:2243::