Pi-Hole ohne Webserver verwenden

Hallo,

ich habe Pi-Hole auf einem kleinen Linux-Server (Ubuntu) installiert. Da auf diesem Server schon ein Webserver aktiv ist der auf dem Port 80 lauscht habe ich die Installation eines Webservers bei der Pi-hole Installation abgewählt.

Ich finde leider keine Erklärung ob und wie man Pi-Hole über die Konsole einstellen kann. Könnt ihr eine Anleitung, möglichst deutsch, empfehlen?

Grüße Martin

https://docs.pi-hole.net/core/pihole-command/

I use the -h argument allot:

$ pihole -h
Usage: pihole [options]
Example: 'pihole -w -h'
Add '-h' after specific commands for more information on usage

Whitelist/Blacklist Options:
  -w, whitelist       Whitelist domain(s)
  -b, blacklist       Blacklist domain(s)
  --regex, regex      Regex blacklist domains(s)
  --white-regex       Regex whitelist domains(s)
  --wild, wildcard    Wildcard blacklist domain(s)
  --white-wild        Wildcard whitelist domain(s)
                        Add '-h' for more info on whitelist/blacklist usage

Debugging Options:
  -d, debug           Start a debugging session
                        Add '-c' or '--check-database' to include a Pi-hole database integrity check
                        Add '-a' to automatically upload the log to tricorder.pi-hole.net
  -f, flush           Flush the Pi-hole log
  -r, reconfigure     Reconfigure or Repair Pi-hole subsystems
  -t, tail [arg]      View the live output of the Pi-hole log.
                      Add an optional argument to filter the log
                      (regular expressions are supported)


Options:
  -a, admin           Web interface options
                        Add '-h' for more info on Web Interface usage
  -c, chronometer     Calculates stats and displays to an LCD
                        Add '-h' for more info on chronometer usage
  -g, updateGravity   Update the list of ad-serving domains
  -h, --help, help    Show this help dialog
  -l, logging         Specify whether the Pi-hole log should be used
                        Add '-h' for more info on logging usage
  -q, query           Query the adlists for a specified domain
                        Add '-h' for more info on query usage
  -up, updatePihole   Update Pi-hole subsystems
                        Add '--check-only' to exit script before update is performed.
  -v, version         Show installed versions of Pi-hole, Web Interface & FTL
                        Add '-h' for more info on version usage
  uninstall           Uninstall Pi-hole from your system
  status              Display the running status of Pi-hole subsystems
  enable              Enable Pi-hole subsystems
  disable             Disable Pi-hole subsystems
                        Add '-h' for more info on disable usage
  restartdns          Full restart Pi-hole subsystems
                        Add 'reload' to update the lists and flush the cache without restarting the DNS server
                        Add 'reload-lists' to only update the lists WITHOUT flushing the cache or restarting the DNS server
  checkout            Switch Pi-hole subsystems to a different GitHub branch
                        Add '-h' for more info on checkout usage
  arpflush            Flush information stored in Pi-hole's network tables
$ pihole -w -h
Usage: pihole -w [options] <domain> <domain2 ...>
Example: 'pihole -w site.com', or 'pihole -w site1.com site2.com'
Whitelist one or more domains

Options:
  -d, --delmode       Remove domain(s) from the whitelist
  -nr, --noreload     Update whitelist without reloading the DNS server
  -q, --quiet         Make output less verbose
  -h, --help          Show this help dialog
  -l, --list          Display all your whitelistlisted domains
  --nuke              Removes all entries in a list
  --comment "text"    Add a comment to the domain. If adding multiple domains the same comment will be used for all

EDIT: Oh and you also have Bash completion (double TAB):

$ pihole
admin          disable        reconfigure    updateGravity
arpflush       enable         regex          updatePihole
blacklist      flush          restartdns     version
checkout       help           status         whitelist
chronometer    logging        tail           wildcard
debug          query          uninstall
$ pihole whitelist --
--delmode   --list      --noreload  --nuke      --quiet

EDIT2: Almost forgot but there is also a man page:

$ man pihole
[..]
DESCRIPTION
       Available commands and options:

       -w, whitelist [options] [<domain1> <domain2 ...>]
           Adds  or  removes  specified  domain  or  domains  to the
       Whitelist
[..]

English though :wink:

1 Like

Hast Du während der Installation nur Webserver abgewählt, oder auch das Admin Web Interface?

Letzteres brauchst Du auf jeden Fall, wenn Du Pi-holes Weboberfläche nutzen willst.
/var/www/html/admin sollte also existieren und befüllt sein.

Sofern Pi-holes Admin Web Interface installiert ist, musst Du Deinen vorhandenen Webserver noch passend konfigurieren. Da Du ausdrücklich einen eigenen Webserver verwenden möchtest, solltest Du mit dessen Konfigurationsoptionen vertraut sein.

Während der Installation wurden die dafür grundsätzlich notwendigen Schritte genannt:

If you disable this, and, do not have an existing web server
and required PHP modules (...) installed, the web interface
will not function. Additionally the web server user needs to be member of
the "pihole" group for full functionality.

Die konkrete Konfiguration ist dabei spezifisch für den von Dir verwendeten Webserver, so dass es keine universelle Anleitung dafür geben kann.

Alternativ installierst Du Pi-holes Webserver (ggf. über pihole -r und Reconfigure) und legst ihn einfach auf einen anderen Port, z.B. indem Du eine neue Datei /etc/lighttpd/conf-enabled/42-custom-port.conf mit folgendem Inhalt anlegst:

server.port:=8080
1 Like

Thank you. I will use Google Translate. :slightly_smiling_face:

1 Like

Ich habe bei der Installation den Webserver abgewählt da ich befürchte das er sich mit dem vorhandenen Webserver in die Quere kommt.
Über meinen Webserver (WebServerLite, ein Java Programm, von mir leicht modifiziert) empfange ich Daten meines Solarwechselrichters und das wollte ich nicht gefährden. Dieser Webserver kann aber kein PHP.
Sollte ich mit der Kommandozeile, siehe oben, nicht klar kommen wäre dein Vorschlag natürlich eine Option.

Grüße Martin

Hallo, noch einmal vielen Dank.
es hat soweit alles geklappt. Eigentlich möchte ich nur eine DNS Abfrage mit einer eigenen lokalen IP beantworten. Einfach in die hosts-Datei eintragen, so einfach. :slightly_smiling_face:

Grüße Martin