How Do You Know Dns Is Running on Pi-hole

Thepihole  command

Pi-pigsty makes utilize of many commands, and here nosotros will interruption downwards those required to administrate the program via the control-line Interface.

Index Invocation
Core Script pihole
Web Script pihole -a

Pi-pigsty Cadre¶

Characteristic Invocation
Core pihole
Whitelisting, Blacklisting and Regex pihole -w, pihole -b, pihole -regex, pihole -wild
Debugger pihole debug
Log Flush pihole flush
Reconfigure pihole reconfigure
Tail pihole tail
Admin pihole -a
Chronometer pihole chronometer
Gravity pihole updateGravity
Logging pihole logging
Query pihole query
Update pihole updatePihole
Version pihole version
Uninstall pihole uninstall
Status pihole status
Enable & Disable pihole enable
Restart DNS pihole restartdns
Checkout pihole checkout

Cadre Script¶

Assistance Control pihole --assistance
Script Location /usr/local/bin/pihole
Case Usage pihole -b advertiser.instance.com

The core script of Pi-hole provides the ability to tie many DNS related functions into a simple and user-friendly management system, so that i may easily block unwanted content such every bit advertisements. For both the Command-line Interface (CLI) and Web Interface, we achieve this through the pihole control (this helps minimize lawmaking duplication, and allows users to read exactly what'due south happening using fustigate scripting). This "wrapper" elevates the current user (whether it be your ain user account, or world wide web-data) using sudo, but restricts the elevation to solely what tin be chosen through the wrapper.

Whitelisting, Blacklisting and Regex¶

Assistance Command pihole -w --assist, pihole -b --aid, pihole -regex --help, pihole -wild --help
Script Location /opt/pihole/list.sh
Case Usage pihole -regex '^example.com$' '.*\.example2.cyberspace'

Administrators need to be able to manually add together and remove domains for various purposes, and these commands serve that purpose.

See Regex Blocking for more than data near using Regex.

Basic Script Process:

  • Each domain is validated using regex (except when using -regex), to ensure invalid domains and IDNs are non added
  • A domain gets added to or removed from the domainlist tabular array in /etc/pihole/gravity.db
  • The DNS server is and then reloaded

Debugger¶

Help Control Northward/A
Script Location /opt/pihole/piholeDebug.sh
Example Usage pihole debug

The Pi-hole debugger will attempt to diagnose any bug, and link to an FAQ with instructions every bit to how an admin can rectify the upshot. Once the debugger has finished, the admin has the option to upload the generated log to the Pi-pigsty developers, who can help with diagnosing and rectifying persistent problems.

Log Flush¶

Assist Command Northward/A
Script Location /opt/pihole/piholeLogFlush.sh
Instance Usage pihole flush

When invoked manually, this command will let you lot to empty Pi-hole's log, which is located at /var/log/pihole.log. The control also serves to rotate the log daily, if the logrotate application is installed.

Reconfigure¶

Aid Control N/A
Script Location /etc/.pihole/automated install/bones-install.sh
Example Usage pihole reconfigure

In that location are times where the ambassador will demand to repair or reconfigure the Pi-hole installation, which is performed via this command.

Basic Script Process:

  • basic-install.sh volition be run
    • Reconfigure will run through the first-fourth dimension installation prompts, request for upstream DNS provider, IP protocols, etc
    • Repair will retain your existing settings and will attempt to repair any scripts or dependencies every bit necessary
  • The rest of basic-install.sh will and so run as advisable

Tail¶

Help Command N/A
Script Location /usr/local/bin/pihole
Example Usage pihole tail

Since Pi-pigsty volition log DNS queries by default, using this command to watch the log in real-fourth dimension tin exist useful for debugging a problematic site, or even only for sheer curiosities sake.

Admin¶

Assist Command pihole -a --help
Script Location /opt/pihole/webpage.sh
Example Usage pihole -a -p secretpassword

Detailed information on this is institute here.

Chronometer¶

Help Command pihole -c --assistance
Script Location /opt/pihole/chronometer.sh
Example Usage pihole -c -east

Chronometer is a console dashboard of existent-time stats, which can be displayed via ssh or on an LCD screen attached directly to your hardware. The script is capable of detecting the size of your screen and adjusting output to try and all-time suit information technology.

Chronometer in action
Image courtesy of /u/super_nicktendo22

Gravity¶

Help Command Northward/A
Script Location /opt/pihole/gravity.sh
Example Usage pihole -g

Gravity is one of the almost of import scripts of Pi-hole. Its principal purpose is to retrieve blocklists, then consolidate them into i unique list for the congenital-in DNS server to use, merely it also serves to complete the process of transmission whitelisting, blacklisting and wildcard update. It is run automatically each week, but it can be invoked manually at any time.

Bones Script Process:

  • It will determine Net connectivity, and give time for pihole-FTL to exist resolvable on low-end systems if has merely been restarted
  • It extracts all URLs and domains from the adlists table in /etc/pihole/gravity.db
  • It runs through each URL, downloading it if necessary
    • roll checks the servers Last-Modified header to ensure it is getting a newer version
  • It will attempt to parse the file into a domains-only format if necessary
  • Lists are merged, comments removed, sorted uniquely and stored in the gravity table of /etc/pihole/gravity.db
  • Gravity cleans up temporary content and reloads the DNS server

Logging¶

Aid Command pihole logging --aid
Script Location /usr/local/bin/pihole
Instance Usage pihole logging off

This command specifies whether the Pi-hole log should be used, by commenting out log-queries within /etc/dnsmasq.d/01-pihole.conf and flushing the log.

Query¶

Assistance Control pihole query --help
Script Location /usr/local/bin/pihole
Example Usage pihole -q -exact -adlist instance.domain.com

This command will query your whitelist, blacklist, wildcards and adlists for a specified domain.

Basic Script Process:

  • User-specified options are handled
  • Using idn, it will convert Internationalized domain names into punycode
  • Database at /etc/pihole/gravity.db is queried to return a list of adlists in which the queried domain exists.

Update¶

Help Command pihole updatePihole
Script Location /opt/pihole/update.sh
Case Usage pihole -up

Check Pi-pigsty Core, Web Interface and FTL repositories to determine what upgrades (if any) are required. It volition then automatically update and reinstall if necessary.

Basic Script Process:

  • Script determines if updates are bachelor by querying GitHub
  • Updated files are downloaded to the local filesystem using git
  • basic-install.sh is run

Version¶

Help Control pihole version
Script Location /opt/pihole/version.sh
Example Usage pihole -v -c

Shows installed versions of Pi-hole, Web Interface & FTL. Information technology also provides options to configure which details volition be printed, such as the current version, latest version, hash and subsystem.

Uninstall¶

Aid Command Due north/A
Script Location /etc/.pihole/automatic install/uninstall.sh
Example Usage pihole uninstall

Uninstall Pi-hole from your system, giving the option to remove each dependency individually.

Status¶

Help Control Due north/A
Script Location /usr/local/bin/pihole
Case Usage pihole condition

Display the running condition of Pi-hole'south DNS and blocking services.

Enable & Disable¶

Help Command pihole disable --help
Script Location /usr/local/bin/pihole
Instance Usage pihole disable 5m

Toggle Pi-hole'south ability to cake unwanted domains. The disable option has the choice to set a specified time earlier blocking is automatically re-enabled.

Restart DNS¶

Help Command N/A
Script Location /usr/local/bin/pihole
Example Usage pihole restartdns

Restart Pi-hole's DNS service.

Checkout¶

Help Command pihole checkout --assist
Script Location /opt/pihole/piholeCheckout.sh
Example Usage pihole checkout dev

Switch Pi-hole subsystems to a different GitHub branch. An admin tin specify repositories also as branches.


Pi-pigsty Web¶

Characteristic Invocation
Spider web Script pihole -a
Password pihole -a password
Teleport pihole -a -t
Temperature Unit of measurement pihole -a celsius, pihole -a fahrenheit, pihole -a kelvin
Host Record pihole -a hostrecord
Electronic mail Accost pihole -a email
Interface pihole -a interface

Web Script¶

Assist Command pihole -a --aid
Script Location /opt/pihole/webpage.sh
Example Usage pihole -a -p secretpassword

Ready options for the Web Interface. This script is used to necktie in all Spider web Interface features which are not already covered by the Core Script.

Password¶

Assist Control North/A
Script Location /opt/pihole/webpage.sh
Example Usage pihole -a -p secretpassword

Set the Web Interface password. Password tin be entered as an option (e.thousand: pihole -a -p secretpassword), or separately equally to not brandish on the screen (e.yard: pihole -a -p).

Teleport¶

Help Control Due north/A
Script Location Northward/A
Example Usage pihole -a -t

Create a configuration fill-in. The backup volition be created in the directory from which the command is run. The backup can be imported using the Settings > Teleport page.

Temperature Unit¶

Assist Control N/A
Script Location /opt/pihole/webpage.sh
Example Usage pihole -a -c

Fix the specified temperature unit equally the preferred type. This preference will bear upon the Spider web Interface, every bit well every bit Chronometer.

Email Address¶

Help Control N/A
Script Location /opt/pihole/webpage.sh
Example Usage pihole -a email admin@domain.com

Set an administrative contact address for the Block Page. This volition create a hyperlink on the Cake Page to the specified email address.

Interface¶

Help Command pihole -a interface --help
Script Location /opt/pihole/webpage.sh
Example Usage pihole -a interface local

Specify interface listening beliefs for pihole-FTL. When using pihole -a interface all, delight ensure you utilise a firewall to foreclose your Pi-hole from becoming an unwitting host to DNS amplification attackers. Y'all may want to consider running Wireguard to grant your mobile devices access to the Pi-hole.


Last update: Feb 2, 2021

nguyenwhimall.blogspot.com

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

0 Response to "How Do You Know Dns Is Running on Pi-hole"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel