User Tools

Site Tools


pihole

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
pihole [2024/04/20 16:34]
zainal
pihole [2024/04/20 22:46] (current)
zainal
Line 1: Line 1:
 +====== Pi Hole Ad Blocker======
 +
 +https://pi-hole.net/ Pi Hole adalah ad blocker pada jaringan lokal. Cara kerja nya adalah dia menjadi DNS server. Jika DNS request ada dalam blocklist, reply yang akan diberikan adalah 0.0.0.0 yaitu unspecified address. Jika request tidak ada dalam blocklist, DNS request akan diteruskan ke DNS server asli yaitu Google DNS atau Cloudflare DNS.
 +
 +Pi Hole dirancang dan populer digunakan dalam single board computer Raspberry Pi. Namun ada opsi lain juga untuk linux x64 & x32.
 +
 +===== Instalasi =====
 +
 +https://docs.pi-hole.net/main/basic-install/
 +
 +''git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole \\
 +cd "Pi-hole/automated install/" \\
 +sudo bash basic-install.sh''
 +
 +===== Admin Web interface =====
 +
 +http://localhost/admin
 +
 +===== Blok internet device tertentu =====
 +
 +Saya menggunakan cara ini untuk membatasi TV yang dipakai anak untuk menonton Youtube.\\
 +Memang bukan secara langsung memutus koneksi internet. Cara ini membuat device tidak bisa mendapatkan DNS reply.
 +
 +Di Web Admin pilih ''Domains''; input ''.*''; Add to blacklist; \\
 +Group Assignment kepada group device yang berisi device yang akan kita batasi.
 +
 +===== Error port 53 binding when install via docker =====
 +
 +When the Port 53 is already in Use, you can check this with this command (ubuntu):
 +
 +Port 53 is being used at your host machine, that's why you can not bind 53 to host.
 +
 +To find what is using port 53 you can do: sudo lsof -i -P -n | grep LISTEN
 +
 +I'm a 99.9% sure that systemd-resolved is what is listening to port 53.
 +
 +To solve that you need to edit the /etc/systemd/resolved.conf and uncomment DNSStubListener and change it to no, so it looks like this: DNSStubListener=no
 +
 +After that reboot your system or restart the service with 
 +
 +service systemd-resolved stop \\
 +service systemd-resolved restart
 +
 +===== Docker YAML ======
 +
 +  version: "3"
 +  
 +  # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
 +  services:
 +  pihole:
 +    container_name: pihole
 +    image: pihole/pihole:latest
 +    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
 +    ports:
 +      - "192.168.100.35:53:53/tcp"
 +      - "192.168.100.35:53:53/udp"
 +    #  - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
 +      - "81:80/tcp"
 +    environment:
 +      TZ: 'UTC'
 +      WEBPASSWORD: 'Semangka10'
 +    # Volumes store your data between container upgrades
 +    volumes:
 +      - '/etc-pihole:/etc/pihole'
 +      - '/etc-dnsmasq.d:/etc/dnsmasq.d'
 +    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
 +    #cap_add:
 +    #  - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
 +    restart: unless-stopped
 +  
 +  volumes:
 +  etc-pihole:
 +
 +
 +
  
pihole.txt · Last modified: 2024/04/20 22:46 by zainal