mirror of
https://github.com/pi-hole/docs.git
synced 2024-12-06 19:27:12 +01:00
Merge branch 'master' into new/fine_debug_options
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
/.idea
|
||||
.idea
|
||||
site/
|
||||
*.sw*
|
||||
|
||||
+3
-2
@@ -5,10 +5,11 @@ script:
|
||||
- mkdocs build --verbose --clean
|
||||
deploy:
|
||||
provider: pages
|
||||
keep-history: true
|
||||
skip_cleanup: true
|
||||
github_token: $GITHUB_TOKEN
|
||||
local_dir: site
|
||||
name: $BOT_NAME
|
||||
email: $BOT_EMAIL
|
||||
committer-from-gh: true
|
||||
verbose: true
|
||||
on:
|
||||
branch: master
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
|
||||
including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: Docker DHCP and Network Modes
|
||||
description: Setting up DHCP for Docker Pi-hole
|
||||
last_updated: Sat Feb 09 00:00:00 2019 UTC
|
||||
---
|
||||
|
||||
# Docker DHCP and Network Modes
|
||||
|
||||
Docker runs in a separate network by default called a docker bridge network, which makes DHCP want to serve addresses to that network and not your LAN network where you probably want it. This document details why Docker Pi-hole DHCP is different from normal Pi-hole and how to fix the problem.
|
||||
|
||||
### Technical details
|
||||
|
||||
Docker's bridge network mode is default and recommended as a more secure setting for containers because docker is all about isolation, they isolate processes by default and the bridge network isolates the networking by default too. You gain access to the isolated container's service ports by using port forwards in your container's runtime config; for example `-p 67:67` is DHCP. However DHCP protocol operates through a network 'broadcast' which cannot span multiple networks (docker's bridge, and your LAN network). In order to get DHCP on to your network there are a few approaches:
|
||||
|
||||
## Working network modes
|
||||
|
||||
Here are details on setting up DHCP for Docker Pi-hole for various network modes available in docker.
|
||||
|
||||
### Docker Pi-hole with host networking mode
|
||||
|
||||
**Advantages**: Simple, easy, and fast setup
|
||||
|
||||
Possibly the simplest way to get DHCP working with Docker Pi-hole is to use [host networking](https://docs.docker.com/network/host/) which makes the container be on your LAN Network like a regular Raspberry Pi-hole would be, allowing it to broadcast DHCP. It will have the same IP as your Docker host server in this mode so you may still have to deal with port conflicts.
|
||||
|
||||
- Inside your docker-compose.yml remove all ports and replace them with: `network_mode: host`
|
||||
- `docker run --net=host` if you don't use docker-compose
|
||||
|
||||
### Docker Pi-hole with a Macvlan network
|
||||
|
||||
**Advantages**: Works well with NAS devices or hard port conflicts
|
||||
|
||||
A [Macvlan network](https://docs.docker.com/network/macvlan/) is the most advanced option since it requires more network knowledge and setup. This mode is similar to host network mode but instead of borrowing the IP of your docker host computer it grabs a new IP address off your LAN network.
|
||||
|
||||
Having the container get its own IP not only solves the broadcast problem but avoids port conflicts you might have on devices such as NAS devices with web interfaces. Tony Lawrence detailed macvlan setup for Pi-hole first in the second part of his great blog series about [Running Pi-hole on Synology Docker](http://tonylawrence.com/posts/unix/synology/running-pihole-inside-docker/), check it out here: [Free your Synology ports with Macvlan](http://tonylawrence.com/posts/unix/synology/free-your-synology-ports/)
|
||||
|
||||
### Docker Pi-hole with a bridge networking
|
||||
|
||||
**Advantages**: Works well with container web reverse proxies like Nginx or Traefik
|
||||
|
||||
If you want to use docker's bridged network mode then you need to run a DHCP relay. A relay points to your containers forwarded port 67 and spreads the broadcast signal from isolated docker bridge onto your LAN network. Relays are very simple software, you just have to configure it to point to your Docker host's IP port 67.
|
||||
|
||||
Although uncommon, if your router is an advanced enough router it may support a DHCP relay. Try googling for your router manufacturer + DHCP relay or looking in your router's configuration around the DHCP settings or advanced areas.
|
||||
|
||||
If your router doesn't support it, you can run a software / container based DHCP relay on your LAN instead. The author of DNSMasq made a very tiny simple one called [DHCP-helper](http://thekelleys.org.uk/dhcp-helper/READ-ME). [DerFetzer](https://discourse.pi-hole.net/t/dhcp-with-docker-compose-and-bridge-networking/17038) kindly shared his great setup of a DHCP-helper container on the Pi-hole Discourse forums.
|
||||
|
||||
### Warning about the Default bridge network
|
||||
|
||||
The out of the box [default bridge network has some limitations](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) that a user created bridge network won't have. These limitations make it painful to use especially when connecting multiple containers together.
|
||||
|
||||
Avoid using the built in default docker bridge network, the simplest way to do this is just use a docker-compose setup since it creates its own network automatically. If compose isn't an option the [bridge network](https://docs.docker.com/network/bridge/) docs should help you create your own.
|
||||
@@ -18,6 +18,8 @@ doubleclick.net. 2 IN A 0.0.0.0
|
||||
doubleclick.net. 2 IN AAAA ::
|
||||
```
|
||||
|
||||
**This blocking mode is the Pi-hole developers' recommendation.**
|
||||
|
||||
Following [RFC 3513, Internet Protocol Version 6 (IPv6) Addressing Architecture, section 2.5.2](https://tools.ietf.org/html/rfc3513#section-2.5.2), the address `0:0:0:0:0:0:0:0` (or `::` for short) is the unspecified address. It must never be assigned to any node and indicates the absence of an address. Following [RFC1122, section 3.2](https://tools.ietf.org/html/rfc1122#section-3.2), the address `0.0.0.0` can be understood as the IPv4 equivalent of `::`.
|
||||
|
||||
##### Advantages
|
||||
@@ -92,4 +94,18 @@ Blocked queries will be answered with an empty response (no answer section) and
|
||||
##### Advantages & Disadvantages
|
||||
Similar to `NULL` blocking, but experiments suggest that clients may try to resolve blocked domains more often compared to `NULL` blocking.
|
||||
|
||||
## Pi-hole's NODATA blocking
|
||||
`/etc/pihole/pihole-FTL.conf` setting:
|
||||
```
|
||||
BLOCKINGMODE=NODATA
|
||||
```
|
||||
Blocked queries will be answered with an empty response (no answer section) and status `NODATA` (domain exists but there is no record for the requested query type)
|
||||
```
|
||||
;; QUESTION SECTION:
|
||||
;doubleclick.net. IN ANY
|
||||
```
|
||||
|
||||
##### Advantages & Disadvantages
|
||||
Similar to `NXDOMAIN` blocking. Clients might have a better acceptance of `NODATA` replies compared to `NXDOMAIN` replies.
|
||||
|
||||
{!abbreviations.md!}
|
||||
|
||||
@@ -3,11 +3,18 @@ We pre-compile *FTL*DNS for you to save you the trouble of compiling anything yo
|
||||
#### Installing the Required Software
|
||||
First, we'll install the basic software you'll need to compile from source, like the GCC compiler and other utilities.
|
||||
Install them by running the following command in a terminal:
|
||||
```
|
||||
###### Debian / Ubuntu / Raspbian
|
||||
```bash
|
||||
sudo apt install build-essential libgmp-dev m4
|
||||
```
|
||||
###### Fedora
|
||||
```bash
|
||||
sudo dnf install gcc gmp-devel gmp-static m4
|
||||
```
|
||||
|
||||
You'll also need to compile a recent version of `nettle` as *FTL*DNS uses `libnettle` for handling DNSSEC. Compile and install a recent version of `nettle` (we tested 3.4):
|
||||
---
|
||||
|
||||
You'll also need to compile `nettle` as *FTL*DNS uses `libnettle` for handling DNSSEC. Compile and install a recent version of `nettle` (we tested 3.4):
|
||||
```
|
||||
wget https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz
|
||||
tar -xvzf nettle-3.4.tar.gz
|
||||
|
||||
Regular → Executable
+50
-49
@@ -3,99 +3,100 @@ You can create a file `/etc/pihole/pihole-FTL.conf` that will be read by *FTL*DN
|
||||
Possible settings (**the option shown first is the default**):
|
||||
### DNS settings
|
||||
|
||||
- `BLOCKINGMODE=NULL|IP-NODATA-AAAA|IP|NXDOMAIN`<br>
|
||||
How should `FTL` reply to blocked queries?<br>
|
||||
#### `BLOCKINGMODE=NULL|IP-NODATA-AAAA|IP|NXDOMAIN` {#blocking_mode data-toc-label='Blocking Mode'}
|
||||
How should `FTL` reply to blocked queries?<br>
|
||||
**[More details](blockingmode.md)**
|
||||
|
||||
### Statistics settings
|
||||
|
||||
- `MAXLOGAGE=24.0`<br>
|
||||
Up to how many hours of queries should be imported from the database and logs? Maximum is 744 (31 days)
|
||||
|
||||
- `PRIVACYLEVEL=0|1|2|3|4`<br>
|
||||
#### `MAXLOGAGE=24.0` {#maxlogage data-toc-label='Max Log Age'}
|
||||
Up to how many hours of queries should be imported from the database and logs? Maximum is 24.0
|
||||
<hr/>
|
||||
#### `PRIVACYLEVEL=0|1|2|3|4` {#privacylevel data-toc-label='Privacy Level'}
|
||||
Which privacy level is used?<br>
|
||||
**[More details](privacylevels.md)**
|
||||
|
||||
- `IGNORE_LOCALHOST=no|yes`<br>
|
||||
<hr/>
|
||||
#### `IGNORE_LOCALHOST=no|yes` {#ignore_localhost data-toc-label='Ignore localhost'}
|
||||
Should `FTL` ignore queries coming from the local machine?
|
||||
|
||||
- `AAAA_QUERY_ANALYSIS=yes|no`<br>
|
||||
<hr/>
|
||||
#### `AAAA_QUERY_ANALYSIS=yes|no` {#aaaa_query_analysis data-toc-label='AAAA Query Analysis'}
|
||||
Allow `FTL` to analyze AAAA queries from pihole.log?
|
||||
|
||||
- `ANALYZE_ONLY_A_AND_AAAA=false|true`<br>
|
||||
<hr/>
|
||||
#### `ANALYZE_ONLY_A_AND_AAAA=false|true` {#analyze_only_a_and_aaaa data-toc-label='Analyze A and AAAA Only'}
|
||||
Should `FTL` only analyze A and AAAA queries?
|
||||
|
||||
### Socket settings
|
||||
|
||||
- `SOCKET_LISTENING=localonly|all`<br>
|
||||
#### `SOCKET_LISTENING=localonly|all` {#socket_listening data-toc-label='Socket Listening'}
|
||||
Listen only for local socket connections or permit all connections
|
||||
|
||||
- `FTLPORT=4711`<br>
|
||||
<hr/>
|
||||
#### `FTLPORT=4711` {#ftlport data-toc-label='FTLDNS Port'}
|
||||
On which port should FTL be listening?
|
||||
|
||||
### Host name resolution
|
||||
|
||||
- `RESOLVE_IPV6=yes|no`<br>
|
||||
#### `RESOLVE_IPV6=yes|no` {#resolve_ipv6 data-toc-label='Resolve IPV6'}
|
||||
Should `FTL` try to resolve IPv6 addresses to host names?
|
||||
|
||||
- `RESOLVE_IPV4=yes|no`<br>
|
||||
<hr/>
|
||||
#### `RESOLVE_IPV4=yes|no` {#resolve_ipv4 data-toc-label='Resolve IPV4'}
|
||||
Should `FTL` try to resolve IPv4 addresses to host names?
|
||||
|
||||
### Database settings
|
||||
**[Further details concerning the database](database.md)**
|
||||
|
||||
- `DBIMPORT=yes|no`<br>
|
||||
#### `DBIMPORT=yes|no` {#dbimport data-toc-label='DB Import'}
|
||||
Should `FTL` load information from the database on startup to be aware of the most recent history?
|
||||
|
||||
- `MAXDBDAYS=365`<br>
|
||||
<hr/>
|
||||
#### `MAXDBDAYS=365` {#maxdbdays data-toc-label='Max DB Days'}
|
||||
How long should queries be stored in the database? Setting this to `0` disables the database
|
||||
|
||||
- `DBINTERVAL=1.0`<br>
|
||||
<hr/>
|
||||
#### `DBINTERVAL=1.0` {#dbinterval data-toc-label='DB Interval'}
|
||||
How often do we store queries in FTL's database [minutes]?
|
||||
|
||||
- `DBFILE=/etc/pihole/pihole-FTL.db`<br>
|
||||
<hr/>
|
||||
#### `DBFILE=/etc/pihole/pihole-FTL.db` {#dbfile data-toc-label='DB File'}
|
||||
Specify path and filename of FTL's SQLite3 long-term database. Setting this to `DBFILE=` disables the database altogether
|
||||
|
||||
### Debugging options
|
||||
|
||||
- `DEBUG_ALL=false|true`<br>
|
||||
#### `DEBUG_ALL=false|true` {#debug_all data-toc-label='Debug All'}
|
||||
Enable all debug flags. If this is set to true, all other debug config options are ignored.
|
||||
|
||||
- `DEBUG_DATABASE=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_DATABASE=false|true` {#debug_database data-toc-label='Debug Database'}
|
||||
Print debugging information about database actions. This prints performed SQL statements as well as some general information such as the time it took to store the queries and how many have been saved to the database.
|
||||
|
||||
- `DEBUG_NETWORKING=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_NETWORKING=false|true` {#debug_networking data-toc-label='Debug networking'}
|
||||
Prints a list of the detected interfaces on startup of `pihole-FTL`. Also prints whether these interfaces are IPv4 or IPv6 interfaces.
|
||||
|
||||
- `DEBUG_LOCKS=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_LOCKS=false|true` {#debug_locks data-toc-label='Debug Locks'}
|
||||
Print information about shared memory locks. Messages will be generated when waiting, obtaining, and releasing a lock.
|
||||
|
||||
- `DEBUG_QUERIES=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_QUERIES=false|true` {#debug_queries data-toc-label='Debug Queries'}
|
||||
Print extensive query information (domains, types, replies, etc.). This has always been part of the legacy `debug` mode of `pihole-FTL`.
|
||||
|
||||
- `DEBUG_FLAGS=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_FLAGS=false|true` {#debug_flags data-toc-label='Debug Flags'}
|
||||
Print flags of queries received by the DNS hooks. Only effective when `DEBUG_QUERIES` is enabled as well.
|
||||
|
||||
- `DEBUG_SHMEM=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_SHMEM=false|true` {#debug_shmem data-toc-label='Debug Shared Memory'}
|
||||
Print information about shared memory buffers. Messages are either about creating or enlarging shmem objects or string injections.
|
||||
|
||||
- `DEBUG_GC=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_GC=false|true` {#debug_gc data-toc-label='Debug GC'}
|
||||
Print information about garbage collection (GC): What is to be removed, how many have been removed and how long did GC take.
|
||||
|
||||
- `DEBUG_ARP=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_ARP=false|true` {#debug_arp data-toc-label='Debug ARP'}
|
||||
Print information about ARP table processing: How long did parsing take, whether read MAC addresses are valid, and if the `macvendor.db` file exists.
|
||||
|
||||
- `DEBUG_REGEX=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_REGEX=false|true` {#debug_regex data-toc-label='Debug REGEX'}
|
||||
Controls if *FTL*DNS should print extended details about regex matching into `pihole-FTL.log`.<br>
|
||||
Due to legacy reasons, we also support the following setting to be used for enabling the same functionality:<br>
|
||||
`REGEX_DEBUGMODE=false|true`<br>
|
||||
`REGEX_DEBUGMODE=false|true`
|
||||
Note that if one of them is set to `true`, the other one cannot be used to disable this setting again.<br>
|
||||
**[More details](regex/overview.md)**
|
||||
|
||||
- `DEBUG_API=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_API=false|true` {#debug_api data-toc-label='Debug Telnet'}
|
||||
Print extra debugging information during telnet API calls. Currently only used to send extra information when getting all queries.
|
||||
|
||||
- `DEBUG_OVERTIME=false|true`<br>
|
||||
<hr/>
|
||||
#### `DEBUG_OVERTIME=false|true` {#debug_overtime data-toc-label='Debug overTime'}
|
||||
Print information about overTime memory operations, such as initializing or moving overTime slots.
|
||||
|
||||
{!abbreviations.md!}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ Connect via e.g. `telnet 127.0.0.1 4711` or use `echo ">command" | nc 127.0.0.1
|
||||
|
||||
- `>quit`: Closes connection to client
|
||||
|
||||
- `>kill`: Terminates `FTL`
|
||||
|
||||
- `>stats` : Get current statistics
|
||||
```
|
||||
domains_being_blocked 116007
|
||||
@@ -101,13 +99,6 @@ Connect via e.g. `telnet 127.0.0.1 4711` or use `echo ">command" | nc 127.0.0.1
|
||||
```
|
||||
Variant: `>recentBlocked (4)` show the four most recent blocked domains
|
||||
|
||||
- `>memory` : get information about `FTL`'s memory usage due to its internal data structure
|
||||
```
|
||||
memory allocated for internal data structure: 2944708 bytes (2.94 MB)
|
||||
dynamically allocated allocated memory used for strings: 23963 bytes (23.96 KB)
|
||||
Sum: 2968671 bytes (2.97 MB)
|
||||
```
|
||||
|
||||
- `>clientID` : Get ID of currently connected client
|
||||
```
|
||||
6
|
||||
|
||||
@@ -34,8 +34,8 @@ Here we are downloading the precompiled binary and copying it to the `/usr/local
|
||||
```
|
||||
wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz
|
||||
tar -xvzf cloudflared-stable-linux-arm.tgz
|
||||
cp ./cloudflared /usr/local/bin
|
||||
chmod +x /usr/local/bin/cloudflared
|
||||
sudo cp ./cloudflared /usr/local/bin
|
||||
sudo chmod +x /usr/local/bin/cloudflared
|
||||
cloudflared -v
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
### Notes & Warnings
|
||||
- **This is an unsupported configuration created by the community**
|
||||
- This describes on how to use traefik on a (possibly remote) machine to serve pi-hole via https and a different domain, not how to to this in docker (via docker-compose).
|
||||
|
||||
### Basic requirements
|
||||
1. Have a traefik server running anywhere where it can access port 80 of the pihole server. Technically it can run in a docker container though. For LetsEncrypt to work traefik must be reachable on port 80 and 443 from the internet and have the domain.tld pointed at its external address.
|
||||
|
||||
2. The following traefik config (traefik.toml)
|
||||
```
|
||||
debug = false
|
||||
checkNewVersion = true
|
||||
logLevel = "INFO"
|
||||
defaultEntryPoints = ["https","http"]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = ":80"
|
||||
[entryPoints.http.redirect]
|
||||
entryPoint = "https"
|
||||
[entryPoints.https]
|
||||
address = ":443"
|
||||
[entryPoints.https.tls]
|
||||
# Optional Security Settings
|
||||
[retry]
|
||||
|
||||
[docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
domain = "domain.tld"
|
||||
watch = true
|
||||
exposedbydefault = false
|
||||
|
||||
[acme]
|
||||
email = "emailForLetsEncryptACME"
|
||||
storage = "acme.json"
|
||||
storageFile = "/etc/traefik/acme/acme.json"
|
||||
entryPoint = "https"
|
||||
OnHostRule = true
|
||||
[acme.tlsChallenge]
|
||||
[[acme.domains]]
|
||||
main = "pihole.domain.tld"
|
||||
|
||||
[file]
|
||||
watch = true
|
||||
|
||||
[backends]
|
||||
[backends.pihole]
|
||||
[backends.pihole.servers.server1]
|
||||
url = "http://IP-Of-Pihole:80"
|
||||
|
||||
[frontends]
|
||||
[frontends.pihole]
|
||||
backend = "pihole"
|
||||
passHostHeader = true
|
||||
[frontends.pihole.headers]
|
||||
STSSeconds = 31536000
|
||||
[frontends.pihole.routes.route1]
|
||||
rule = "Host:pihole.domain.tld"
|
||||
```
|
||||
|
||||
7. Edit your /etc/lighthttpd/external.conf to
|
||||
```
|
||||
$SERVER["socket"] == ":80" {
|
||||
# Ensure the Pi-hole Block Page knows that this is not a blocked domain
|
||||
setenv.add-environment = ("fqdn" => "true")
|
||||
|
||||
|
||||
$HTTP["host"] =~ "^pi\.hole" {
|
||||
url.redirect = ("^/(.*)" => "https://pihole.domain.tld/$1")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
8. Restart pi-holes lighthttpd and traefik, then you should be able to access your pihole via ```https://pihole.domain.tld/```
|
||||
@@ -31,4 +31,5 @@ last_updated: Sun Jan 13 19:20:35 2019 UTC
|
||||
- [CryptoAUSTRALIA: How We Tried 5 Privacy Focused Raspberry Pi Projects](https://blog.cryptoaustralia.org.au/2017/10/05/5-privacy-focused-raspberry-pi-projects/) _Oct 5, 2017_
|
||||
- [CryptoAUSTRALIA: Pi-hole Workshop](https://blog.cryptoaustralia.org.au/2017/11/02/pi-hole-network-wide-ad-blocker/) _Nov 2, 2017_
|
||||
- [Bloomberg: Inside the Brotherhood of the Ad Blockers](https://www.bloomberg.com/news/features/2018-05-10/inside-the-brotherhood-of-pi-hole-ad-blockers) _May 10, 2018_
|
||||
- [How a Single Raspberry PI made my Home Network Faster](https://www.brianchristner.io/how-a-single-raspberry-pi-made-my-home-network-faster/) _March 1, 2019_
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@ Any hardware that runs one of the supported operating systems will do!
|
||||
|
||||
The following operating systems are **officially** supported:
|
||||
|
||||
- Raspbian: Jessie / Stretch
|
||||
- Ubuntu: 16.04 / 16.10
|
||||
- Fedora: 27 / 28
|
||||
- Debian: 8 / 9
|
||||
- CentOS: 7 (not ARM)
|
||||
| Distribution | Release | Architecture |
|
||||
| ------------ | ---------------- | ------------------- |
|
||||
| Raspbian | Jessie / Stretch | ARM |
|
||||
| Ubuntu | 16.x / 18.x | ARM / x86_64 |
|
||||
| Debian | 8 / 9 | ARM / x86_64 / i386 |
|
||||
| Fedora | 28 / 29 | ARM / x86_64 |
|
||||
| CentOS | 7 | x86_64 |
|
||||
|
||||
### IP Addressing
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ nav:
|
||||
- 'Install from source': ftldns/compile.md
|
||||
- 'Debugging FTLDNS': ftldns/debugging.md
|
||||
- 'In-depth manual': ftldns/in-depth.md
|
||||
- 'Docker':
|
||||
- 'DHCP': docker/DHCP.md
|
||||
- 'Contributing':
|
||||
- 'Contributing on Github': guides/github/contributing.md
|
||||
- 'How to sign-off commits': guides/github/how-to-signoff.md
|
||||
@@ -81,6 +83,7 @@ nav:
|
||||
- 'Editing Whitelist and Blacklist': guides/whitelist-blacklist.md
|
||||
- 'Configuring NGINX for Pi-hole': guides/nginx-configuration.md
|
||||
- 'Configuring Caddy for Pi-hole': guides/caddy-configuration.md
|
||||
- 'Configuring Traefik for Pi-hole (not in Docker)': guides/traefik-configuration-nodocker.md
|
||||
- 'Pi-hole and OpenVPN Server':
|
||||
- 'Overview': guides/vpn/overview.md
|
||||
- 'Installation': guides/vpn/installation.md
|
||||
|
||||
+5
-5
@@ -5,13 +5,13 @@ Jinja2==2.10
|
||||
livereload==2.6.0
|
||||
Markdown==3.0.1
|
||||
markdown-include==0.5.1
|
||||
MarkupSafe==1.1.0
|
||||
MarkupSafe==1.1.1
|
||||
mkdocs==1.0.4
|
||||
mkdocs-bootswatch==0.5.0
|
||||
mkdocs-material==3.2.0
|
||||
mkdocs-bootswatch==1.0
|
||||
mkdocs-material==4.0.2
|
||||
Pygments==2.3.1
|
||||
pymdown-extensions==5.0
|
||||
PyYAML==4.2b4
|
||||
pymdown-extensions==6.0
|
||||
PyYAML==5.1b5
|
||||
singledispatch==3.4.0.3
|
||||
six==1.12.0
|
||||
tornado==5.1.1
|
||||
|
||||
Reference in New Issue
Block a user