Pi-hole adalah aplikasi pemblokiran pelacak pelacak dan pelacak Internet tingkat Linux yang bertindak sebagai sinkhole DNS, yang dimaksudkan untuk digunakan pada jaringan pribadi.

Saat anda membaca artikel ini berarti anda sudah paham / sudah memasang docker, portainer, macvlan. atau jika belum/tidak maka anda sesuaikan konfigurasinya.

pull image pihole

saya menggunakan image pihole dari user pihole

membuat container pihole

sesuaikan konfigruasinya, punya saya seperti ini:

konfigurasi networking

saya menggunakan macvlan, sesuaikan milik Anda dan kebutuhan Anda

konfigurasi environment

di konfigurasi environment tidak ada yang saya ganti

restart policy

restart policy always agar ketika mati berusaha untuk bangun lagi

log

perhatikan log ketika sudah deploy container, pastikan tidak ada log yang error atau mencurigakan. berikut adalah log pihole saya:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.


[s6-init] ensuring user provided files have correct perms...exited 0.


[fix-attrs.d] applying ownership & permissions fixes...


[fix-attrs.d] 01-resolver-resolv: applying... 


[fix-attrs.d] 01-resolver-resolv: exited 0.


[fix-attrs.d] done.


[cont-init.d] executing container initialization scripts...


[cont-init.d] 20-start.sh: executing... 


 ::: Starting docker specific checks & setup for docker pihole/pihole


WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server


WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)




nameserver 127.0.0.11


options ndots:0


Assigning random password: ASMv_1k-


  [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u7




  [i] Installing configs from /etc/.pihole...


  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!


  [i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf


chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory


Setting password: ASMv_1k-


+ pihole -a -p ASMv_1k- ASMv_1k-


  [✓] New password set


Using default DNS servers: 8.8.8.8 & 8.8.4.4


DNSMasq binding to default interface: eth0


Added ENV to php:


			"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",


			"ServerIP" => "0.0.0.0",


			"VIRTUAL_HOST" => "0.0.0.0",


Using IPv4 and IPv6


::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))


https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts


https://mirror1.malwaredomains.com/files/justdomains


http://sysctl.org/cameleon/hosts


https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt


https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt


https://hosts-file.net/ad_servers.txt


::: Testing pihole-FTL DNS: FTL started!


::: Testing lighttpd config: Syntax OK


::: All config checks passed, cleared for startup ...


 ::: Docker start setup complete


  [i] Pi-hole blocking is enabled


  [i] Neutrino emissions detected...



  [✓] Pulling blocklist source list into range




  [i] Target: raw.githubusercontent.com (hosts)


  [i] Status: Pending...
  [✓] Status: Retrieval successful




  [i] Target: mirror1.malwaredomains.com (justdomains)


  [i] Status: Pending...
  [✓] Status: Retrieval successful




  [i] Target: sysctl.org (hosts)


  [i] Status: Pending...
  [✓] Status: No changes detected




  [i] Target: s3.amazonaws.com (simple_tracking.txt)


  [i] Status: Pending...
  [✓] Status: No changes detected




  [i] Target: s3.amazonaws.com (simple_ad.txt)


  [i] Status: Pending...
  [✓] Status: No changes detected




  [i] Target: hosts-file.net (ad_servers.txt)


  [i] Status: Pending...
  [✓] Status: No changes detected




  [i] Consolidating blocklists...
  [✓] Consolidating blocklists


  [i] Extracting domains from blocklists...
  [✓] Extracting domains from blocklists


  [i] Number of domains being pulled in by gravity: 149761


  [i] Removing duplicate domains...
  [✓] Removing duplicate domains


  [i] Number of unique domains trapped in the Event Horizon: 127572


  [i] Nothing to whitelist!


  [i] Number of regex filters: 0


  [i] Parsing domains into hosts format...
  [✓] Parsing domains into hosts format


  [i] Cleaning up stray matter...
  [✓] Cleaning up stray matter




  [✓] DNS service is running


  [i] Pi-hole blocking will be enabled


  [i] Enabling blocking



  [✓] Pi-hole Enabled


[cont-init.d] 20-start.sh: exited 0.


[cont-init.d] done.


[services.d] starting services


Starting pihole-FTL (no-daemon) as root


Starting crond


Starting lighttpd


[services.d] done.

masuk ke konsol container

saatnya masuk ke konsol container, bisa lewat cli maupun gui (portainer).

set sandi masuk pihole

dengan melakukan command “pihole -a -p”

saat ip pihole diakses

login menggunakan sandi yang tadi sudah di set

dahsboard pihole

selesai 😀