PiHole Web Interface Port ändern

Ich plane auf meinem schnuckeligem NUC PiHole zu installieren. Derzeit läuft dort meine Nextcloud, die auch aus dem Internet erreichbar ist.

Ich habe zu der Installation von PiHole recherchiert, scheint relativ einfach zu sein. Das einzige Problem, das ich sehe ist der Port des Web Interfaces von PiHole.
Was würde passieren, wenn ich PiHole einfach so installieren würde? Wäre dann dann das Web Interface meiner Nextcloud nicht mehr erreichbar?

Bei der Recherche bin ich auf die Änderung einer Konfigurationsdatei gestoßen. Der Nachteil soll sein, dass bei einem Update von PiHole diese Konfiguration überschrieben wird. Das wäre natürlich sehr unpraktisch.
Als andere Lösung werden virtuelle Hosts vorgeschlagen. Da muss ich zugeben, ist mein Linux KnowHow nicht ausreichend.

Hat jemand Tipps?

Ich nutze Pi-hole in einem Docker-Container. Da kannst du ganz einfach den exponierten Port in docker-compose.yml festlegen:

version: "3"

# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md

services:
  pihole:
    hostname: 'pihole-docker'
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      #- "67:67/udp"
      - "12380:80/tcp"
      - "12443:443/tcp"
…

Ich habe mir mal docker installiert und das image gezogen. Habe eine docker-compose.yml angelegt. Der Container läuft, wenn ich im Browser die IP und Port eingebe (z.B. http://192.168.0.100:12380), bekomme ich 403 Forbidden.

sudo docker compose ps
NAME      IMAGE                  COMMAND      SERVICE   CREATED          STATUS                        PORTS
pihole    pihole/pihole:latest   "/s6-init"   pihole    28 minutes ago   Up About a minute (healthy)   0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp, :::53->53/tcp, :::53->53/udp, 67/udp, 0.0.0.0:12380->80/tcp, :::12380->80/tcp, 0.0.0.0:12443->443/tcp, :::12443->443/tcp

docker-compose.yml:

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:
      - "53:53/tcp"
      - "53:53/udp"
      - "12380:80/tcp"
	  - "12443:443/tcp"
    environment:
      TZ: 'Europe/Berlin'
      WEBPASSWORD: 'kaka'
    # 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
    restart: unless-stopped

Häng mal „/admin“ dran. Ohne ist beim Pi-hole ein forbidden „by design“ okay.
Für https (443->12443) musst du aber noch mehr machen, damit das ordentlich funzt. Für zuhause bzw. auf localhost kann man aber mal beide Augen zudrücken :stuck_out_tongue_winking_eye:

Yep, das war’s. Danke.
Musste aber noch etwas mit DNS kämpfen, bis Nextcloud und PiHole nebeneinander funktioniert haben.

Hätte aber gedacht, dass es viel mehr AdListen für Pihole gibt. habe mir eine Hand voll zusammen gesucht. Werde nun testen.

Schau doch mal hier: da habe ich meine verwendeten Blocklisten mit Top-Score veröffentlicht (wobei das auch nicht gaaaanz aktuell ist, aber dennoch eine Inspiration sein kann), wobei die von StevenBlack und lightswitch05/hosts schon sehr, sehr viel abdecken und blocken und mittlerweile Apple leider ganz massiv geblockt werden muss. Ich habe noch Auswertungen von 2021, die damals viel Apple-freundlicher aussahen :man_shrugging:

Ganz aktueller und frischer Top-Score der letzten 30 Tage mit pihole_adlist_tool erstellt (das Tool kann leider (noch?) nicht mit Listen im AdBlock-Plus Format umgehen!):

  [i]  Adlist coverage

id   enabled  total_domains  domains_covered  hits_covered  unique_domains_covered  address
---  -------  -------------  ---------------  ------------  ----------------------  --------------------------------------------------------------------------------------------------------
83   1        234            65               239258        54                      https://raw.githubusercontent.com/liamengland1/mischosts/master/apple-telemetry
91   1        111166         1758             109177        387                     https://github.com/badmojr/1Hosts/releases/download/latest/1hosts-Lite_domains.txt
63   1        429440         1428             105194        206                     https://raw.githubusercontent.com/lightswitch05/hosts/master/docs/lists/ads-and-tracking-extended.txt
1    1        154803         1144             84017         65                      https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
82   1        500340         840              52814                                 https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt
30   1        767            156              47045         13                      https://raw.githubusercontent.com/d43m0nhLInt3r/socialblocklists/master/MobileAppAds/appadsblocklist.txt
68   1        80             28               26650                                 https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/android-tracking.txt
101  1        3725           241              21728         1                       https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext
64   1        171827         67               13076         43                      https://raw.githubusercontent.com/lightswitch05/hosts/master/docs/lists/tracking-aggressive-extended.txt
95   1        19             10               12721                                 https://raw.githubusercontent.com/hagezi/dns-blocklists/main/domains/native.apple.txt
85   1        184            6                9273          1                       https://raw.githubusercontent.com/liamengland1/mischosts/master/tiktok-hosts
19   1        23761          94               8745          3                       https://raw.githubusercontent.com/blocklistproject/Lists/master/crypto.txt
96   1        191            28               8464          5                       https://raw.githubusercontent.com/hagezi/dns-blocklists/main/domains/native.winoffice.txt
67   1        226651         28               8120          5                       https://raw.githubusercontent.com/RPiList/specials/master/Blocklisten/spam.mails
84   1        916            50               5076          21                      https://raw.githubusercontent.com/liamengland1/mischosts/master/microsoft-telemetry
97   1        251            10               4369          6                       https://raw.githubusercontent.com/hagezi/dns-blocklists/main/domains/native.tiktok.txt
108  1        202            14               3561          4                       https://raw.githubusercontent.com/hkamran80/blocklists/main/smart-tv
100  1        242            14               3256                                  https://perflyst.github.io/PiHoleBlocklist/SmartTV.txt
5    1        209            13               2756                                  https://raw.githubusercontent.com/d43m0nhLInt3r/socialblocklists/master/SmartTV/smarttvblocklist.txt
59   1        347            11               692                                   https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
60   1        347            11               692                                   https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy_v6.txt
77   1        30786          46               596           10                      https://raw.githubusercontent.com/StevenBlack/hosts/master/extensions/porn/clefspeare13/hosts
72   1        25278          44               561           10                      https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts
32   1        20             5                556           3                       https://www.technoy.de/lists/FireTVAds.txt
98   1        1462478        28               293           14                      https://raw.githubusercontent.com/hagezi/dns-blocklists/main/domains/tif.txt
28   1        2134           9                90            9                       https://raw.githubusercontent.com/blocklistproject/Lists/master/piracy.txt
21   1        196082         3                40            2                       https://raw.githubusercontent.com/blocklistproject/Lists/master/fraud.txt
23   1        190224         2                20            2                       https://raw.githubusercontent.com/blocklistproject/Lists/master/phishing.txt
13   1        2196           2                14            1                       https://raw.githubusercontent.com/StevenBlack/hosts/master/extensions/fakenews/hosts
35   1        290858         1                10            1                       https://zerodot1.gitlab.io/CoinBlockerLists/hosts
62   1        2232           1                10                                    https://raw.githubusercontent.com/lightswitch05/hosts/master/docs/lists/hate-and-junk-extended.txt
74   1        2602           4                10            1                       https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts
27   1        2499           3                7                                     https://raw.githubusercontent.com/blocklistproject/Lists/master/gambling.txt
34   1        282092         1                3                                     https://raw.githubusercontent.com/RPiList/specials/master/Blocklisten/Phishing-Angriffe
20   1        26028          1                2             1                       https://raw.githubusercontent.com/blocklistproject/Lists/master/drugs.txt

Und ganz interessant finde ich auch https://big.oisd.nl/ - der Maintainer reagiert vor allem sehr schnell auf False-Positive Meldungen :heart:

1 „Gefällt mir“