Pomoc Pi Hole na Dockerze, jak skofigurować?

krystianen

System Engineer
Q Specialist
25 Styczeń 2010
101
9
18
Poznań
QNAP
TS-x53
Ethernet
1 GbE
Wersja oprogramowania Firmware: 4.4.1 Build 20YYMMDD
Model serwera: QNAP TS-251A

Zainstalowałem PI HOLE na dockerze jednak podczas uruchomienia mam bład

Czy ktoś się spotkał z takim problemem?

Kod:
[✗] DNS resolution is currently unavailable

Doszukałem się że musze ze musze zedytować DNSy w pliku /etc/resolf.conf tylko nie wiem jak sie mam do niego stać. Bo wyrzuceniu w/w błedy pi hole sie wylacza.

Kod:
 ::: 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: -6wj8quc                                                                                                                                                                                                                                                                                       
  [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u5                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                         
  [i] Installing configs from /etc/.pihole...                                                                                                                                                                                                                                                                             
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!                                                                                                                                                                                                                                             
  [✓] 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: -6wj8quc                                                                                                                                                                                                                                                                                               
+ pihole -a -p -6wj8quc -6wj8quc                                                                                                                                                                                                                                                                                         
  [✓] 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                                                                                                                                                                                                                                                                                         
  [✗] DNS resolution is currently unavailable                                                                                                                                                                                                                                                                             
  [✗] DNS resolution is not available                                                                                                                                                                                                                                                                                     
[cont-init.d] 20-start.sh: exited 1.                                                                                                                                                                                                                                                                                     
[cont-finish.d] executing container finish scripts...                                                                                                                                                                                                                                                                     
[cont-finish.d] done.                                                                                                                                                                                                                                                                                                     
[s6-finish] syncing disks.                                                                                                                                                                                                                                                                                               
[s6-finish] sending all processes the TERM signal.                                                                                                                                                                                                                                                                       
[s6-finish] sending all processes the KILL signal and exiting.
 
Query Log pokazuje blocked?
1675106316965.png
 
Na razie usunąłem tamten obraz żeby portainerem to ogarnąć ale problem ten sam z DNS... patrząc na screen nie mam portów publikowanych i pewnie dlatego ten błąd i problem z działaniem
1675106816118.png
 
Jak bym jednak polecał nano zamiast vi jeżeli to docker na alpine apk update potem apk add nano
Jeżeli masz już działająca instancję nie wiem co więcej chcesz osiągnąć napisz do znajomego hej!!! jakiem masz filtry które blokują addsy dodaj zaktualizuj liste i tyle upewnij się że pi.hole jest jedynym domyślnym prowajderem DNS w sieci lokalnej.
@jerry1333 Nie przesadzajmy z tym Rasberrypi i jego zajebistośćią bo żywotność kart MicoSD jest dużo mniejsza w RPi niż telefonach to raz tu ewidentnie bardziej był problem z czym innym niż samym qnapem samo uruchomienie PiHole na Qnapie zwykle to 5 minut.

@QQryq Twoim problemem jest lista filtrów ewentualnie lewy DNS w sieci lokalnej nie sama instancja Pi.hole imho.
 
ja robiłem tak
odpaliłem konsolę instalacja trwa 20 sekund
następnie w portainer zrobiłem szczegółowy config, odznaczyłem pull image i start
po chwili miałem dostęp do web pihola
Połączono posty:

ja mam 3 podsieci..działam w oprogramowaniu openwrt.. wszystkie zapytania lecą do pihola na qnapie
Połączono posty:

1675111380857.png

Połączono posty:

na 473A śmiga aż miło
Połączono posty:

iptables -t nat -I PREROUTING -i lan100 -p udp --dport 53 -j DNAT --to 192.168.XXX.XXX:53
iptables -t nat -I PREROUTING -i lan200 -p udp --dport 53 -j DNAT --to 192.168.XXX.XXX:53
 
ja robiłem tak
odpaliłem konsolę instalacja trwa 20 sekund
następnie w portainer zrobiłem szczegółowy config, odznaczyłem pull image i start
po chwili miałem dostęp do web pihola
Połączono posty:

ja mam 3 podsieci..działam w oprogramowaniu openwrt.. wszystkie zapytania lecą do pihola na qnapie
Połączono posty:

Pokaż załącznik 41984
Połączono posty:

na 473A śmiga aż miło
u mnie jest na odwrót zmieniać to tak jak u ciebie?
1675111726530.png
 
nie pozwala błąd wywala kiedy chce wpisać adres ip z puli ( 192.168.0.0/24 ) na interfejsie bridge nie przejdzie ( error code 400 ), muszę wybrać przełącznik qnet ale wtedy porty nie są przekierowane
 
1675113671510.png

a tak wygląda log po starcie:


Kod:
2023-01-30T21:18:57.680082456Z s6-rc: info: service s6rc-oneshot-runner: starting
2023-01-30T21:18:57.686352624Z s6-rc: info: service s6rc-oneshot-runner successfully started
2023-01-30T21:18:57.686553792Z s6-rc: info: service fix-attrs: starting
2023-01-30T21:18:57.692575008Z s6-rc: info: service fix-attrs successfully started
2023-01-30T21:18:57.692984808Z s6-rc: info: service legacy-cont-init: starting
2023-01-30T21:18:57.699600876Z s6-rc: info: service legacy-cont-init successfully started
2023-01-30T21:18:57.699886404Z s6-rc: info: service cron: starting
2023-01-30T21:18:57.704072760Z s6-rc: info: service cron successfully started
2023-01-30T21:18:57.704372136Z s6-rc: info: service _uid-gid-changer: starting
2023-01-30T21:18:57.711664368Z s6-rc: info: service _uid-gid-changer successfully started
2023-01-30T21:18:57.712065696Z s6-rc: info: service _startup: starting
2023-01-30T21:18:57.717475656Z ServerIP is deprecated. Converting to FTLCONF_LOCAL_IPV4
2023-01-30T21:18:57.746199444Z   [i] Starting docker specific checks & setup for docker pihole/pihole
2023-01-30T21:18:57.746376516Z   [i] Setting capabilities on pihole-FTL where possible
2023-01-30T21:18:57.755209404Z   [i] Applying the following caps to pihole-FTL:
2023-01-30T21:18:57.755449668Z         * CAP_CHOWN
2023-01-30T21:18:57.755471952Z         * CAP_NET_BIND_SERVICE
2023-01-30T21:18:57.755493780Z         * CAP_NET_RAW
2023-01-30T21:18:57.755523804Z         * CAP_NET_ADMIN
2023-01-30T21:18:58.766040312Z   [i] Ensuring basic configuration by re-running select functions from basic-install.sh
2023-01-30T21:18:58.766205396Z
2023-01-30T21:18:58.766227260Z   [i] Installing configs from /etc/.pihole...
2023-01-30T21:18:58.771378236Z   [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
2023-01-30T21:18:58.774869192Z   [i] Installing /etc/dnsmasq.d/01-pihole.conf...
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
2023-01-30T21:18:58.796299692Z   [i] Installing /etc/.pihole/advanced/06-rfc6761.conf...
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf
2023-01-30T21:18:58.855419204Z
2023-01-30T21:18:58.860185592Z   [i] Installing latest logrotate script...
2023-01-30T21:18:58.860228696Z     [i] Existing logrotate file found. No changes made.
2023-01-30T21:18:58.878880236Z   [i] Assigning password defined by Environment Variable
2023-01-30T21:18:58.941312192Z   [✓] New password set
2023-01-30T21:18:58.972528848Z   [i] Added ENV to php:
2023-01-30T21:18:58.974958236Z                     "TZ" => "Europe/London",
2023-01-30T21:18:58.974994428Z                     "PIHOLE_DOCKER_TAG" => "",
2023-01-30T21:18:58.975012356Z                     "PHP_ERROR_LOG" => "/var/log/lighttpd/error-pihole.log",
2023-01-30T21:18:58.975028868Z                     "CORS_HOSTS" => "",
2023-01-30T21:18:58.975044816Z                     "VIRTUAL_HOST" => "192.168.0.222",
2023-01-30T21:18:58.978676760Z   [i] Using IPv4
2023-01-30T21:18:58.981475340Z   [i] Preexisting ad list /etc/pihole/adlists.list detected (exiting setup_blocklists early)
2023-01-30T21:18:58.981636308Z   [i] Converting DNS1 to PIHOLE_DNS_
2023-01-30T21:18:58.981720164Z   [i] Converting DNS2 to PIHOLE_DNS_
2023-01-30T21:18:58.981831524Z   [i] Setting DNS servers based on PIHOLE_DNS_ variable
2023-01-30T21:18:58.999879944Z   [i] Applying pihole-FTL.conf setting LOCAL_IPV4=192.168.0.222
2023-01-30T21:18:59.018187840Z   [i] FTL binding to custom interface: br0
2023-01-30T21:18:59.041079436Z   [i] Enabling Query Logging
2023-01-30T21:18:59.615232180Z Duplicate config variable in conditional 2 global / $HTTP["url"] == "/" / $HTTP["host"] == "192.168.0.222": url.redirect
2023-01-30T21:18:59.615293044Z 2023-01-30 21:18:59: configfile.c.1970) source: /etc/lighttpd/conf-enabled/15-pihole-admin-redirect-docker.conf line: 7 pos: 5 parser failed somehow near here: (EOL)
2023-01-30T21:18:59.615311344Z 2023-01-30 21:18:59: configfile.c.1970) source: /etc/lighttpd/lighttpd.conf line: 50 pos: 15 parser failed somehow near here: (EOL)
2023-01-30T21:18:59.619904044Z s6-rc: info: service _startup successfully started
2023-01-30T21:18:59.620153728Z s6-rc: info: service pihole-FTL: starting
2023-01-30T21:18:59.623463976Z s6-rc: info: service pihole-FTL successfully started
2023-01-30T21:18:59.623993764Z s6-rc: info: service lighttpd: starting
2023-01-30T21:18:59.627695848Z s6-rc: info: service lighttpd successfully started
2023-01-30T21:18:59.628219168Z s6-rc: info: service _postFTL: starting
2023-01-30T21:18:59.631548868Z s6-rc: info: service _postFTL successfully started
2023-01-30T21:18:59.633362548Z s6-rc: info: service legacy-services: starting
2023-01-30T21:18:59.633999280Z   [i] Testing lighttpd config:   Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf
2023-01-30T21:18:59.651893860Z s6-rc: info: service legacy-services successfully started
2023-01-30T21:18:59.653356912Z [21:18:59.652983] STUBBY: Stubby version: Stubby 0.3.0
2023-01-30T21:18:59.660330148Z [21:18:59.660079] STUBBY: Read config from file /config/stubby.yml
2023-01-30T21:18:59.693229036Z   [i] Neutrino emissions detected...
2023-01-30T21:18:59.712822804Z
  [✓] Pulling blocklist source list into range
2023-01-30T21:18:59.712965628Z
2023-01-30T21:18:59.741796480Z   [i] Preparing new gravity database...
  [✓] Preparing new gravity database
2023-01-30T21:18:59.766232176Z   [i] Using libz compression
2023-01-30T21:18:59.766277860Z
2023-01-30T21:18:59.766415824Z   [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
2023-01-30T21:19:00.319076256Z   [i] Status: Pending...
  [✓] Status: Retrieval successful
2023-01-30T21:19:01.896801252Z   [i] Analyzed 173825 domains, 13 domains invalid!
2023-01-30T21:19:01.896865044Z       Sample of invalid domains:
2023-01-30T21:19:01.896888828Z       - 0.0.0.0
2023-01-30T21:19:01.896940320Z       - broadcasthost
2023-01-30T21:19:01.896993648Z       - ip6-allhosts
2023-01-30T21:19:01.897011564Z       - ip6-allnodes
2023-01-30T21:19:01.929738636Z   [i] List stayed unchanged
2023-01-30T21:19:01.955981124Z
2023-01-30T21:19:02.002784292Z   [i] Creating new gravity databases...
  [✓] Creating new gravity databases
2023-01-30T21:19:02.750791380Z   [i] Storing downloaded domains in new gravity database...
  [✓] Storing downloaded domains in new gravity database
2023-01-30T21:19:03.109322892Z   [i] Building tree...
  [✓] Building tree
2023-01-30T21:19:03.121196580Z   [i] Swapping databases...
  [✓] Swapping databases
2023-01-30T21:19:03.121245900Z   [✓] The old database remains available.
2023-01-30T21:19:04.072404876Z   [i] Number of gravity domains: 173812 (173812 unique domains)
2023-01-30T21:19:04.099301808Z   [i] Number of exact blacklisted domains: 0
2023-01-30T21:19:04.104877212Z   [i] Number of regex blacklist filters: 0
2023-01-30T21:19:04.110429300Z   [i] Number of exact whitelisted domains: 0
2023-01-30T21:19:04.116013524Z   [i] Number of regex whitelist filters: 0
2023-01-30T21:19:04.146665004Z   [i] Cleaning up stray matter...
  [✓] Cleaning up stray matter
2023-01-30T21:19:04.153502544Z
2023-01-30T21:19:04.186649376Z   [✓] FTL is listening on port 53
2023-01-30T21:19:04.198305564Z      [✓] UDP (IPv4)
2023-01-30T21:19:04.200488400Z      [✓] TCP (IPv4)
2023-01-30T21:19:04.211874396Z      [✓] UDP (IPv6)
2023-01-30T21:19:04.214064456Z      [✓] TCP (IPv6)
2023-01-30T21:19:04.214098128Z
2023-01-30T21:19:04.218372048Z   [✓] Pi-hole blocking is enabled
2023-01-30T21:19:04.219316844Z
2023-01-30T21:19:07.765190880Z   Pi-hole version is v5.15 (Latest: v5.15.3)
2023-01-30T21:19:07.766830344Z   AdminLTE version is v5.18.1 (Latest: v5.18.3)
2023-01-30T21:19:07.768350864Z   FTL version is v5.20.1 (Latest: v5.20.1)
2023-01-30T21:19:07.770589536Z   Container tag is: 2023.01
2023-01-30T21:19:07.770634920Z
 
czyli w twoim przypadku pihole powinien mieć adres np: 192.168.0.200
no ustawiłem 192.168.0.222 ale nie mogę tego zrobić na bridge tylko na qnet na wykresie widać ze pihole-doh1 jest uustawiony na bridge a pihole-doh8 na adapter tyle, że wtedy nie ma portów i problem DNS Resolve.... jest.
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. pihole
  2. netflix
  3. container sieć
  4. container settings
  5. samsung evo 970
  6. docker proc
  7. docker status
  8. localhost docker
  9. pi hole
  10. ls proc
  11. ubuntu station
  12. adguard
  13. switch do 10 gbe
  14. reject md5 servers = yes