Skip to content

Commit 89972b3

Browse files
authored
Merge pull request pi-hole#717 from pi-hole/dev
Dev to Master [5.2.1]
2 parents 1c421b0 + 90dada0 commit 89972b3

File tree

3 files changed

+32
-10
lines changed

3 files changed

+32
-10
lines changed

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## Quick Start
99

10-
1. Copy docker-compose-example.yml to docker-compose.yml and update as needed. See example below:
10+
1. Copy docker-compose.yml.example to docker-compose.yml and update as needed. See example below:
1111
[Docker-compose](https://docs.docker.com/compose/install/) example:
1212

1313
```yaml
@@ -107,10 +107,10 @@ There are other environment variables if you want to customize various things in
107107
| `DNSSEC: <"true"\|"false">`<br/> *Optional* *Default: "false"* | Enable DNSSEC support
108108
| `DNS_BOGUS_PRIV: <"true"\|"false">`<br/> *Optional* *Default: "true"* | Enable forwarding of reverse lookups for private ranges
109109
| `DNS_FQDN_REQUIRED: <"true"\|"false">`<br/> *Optional* *Default: true* | Never forward non-FQDNs
110-
| `CONDITIONAL_FORWARDING: <"true"\|"false">`<br/> *Optional* *Default: "false"* | Enable DNS conditional forwarding for device name resolution
111-
| `CONDITIONAL_FORWARDING_IP: <Router's IP>`<br/> *Optional* | If conditional forwarding is enabled, set the IP of the local network router
112-
| `CONDITIONAL_FORWARDING_DOMAIN: <Network Domain>`<br/> *Optional* | If conditional forwarding is enabled, set the domain of the local network router
113-
| `CONDITIONAL_FORWARDING_REVERSE: <Reverse DNS>`<br/> *Optional* | If conditional forwarding is enabled, set the reverse DNS of the local network router (e.g. `0.168.192.in-addr.arpa`)
110+
| `REV_SERVER: <"true"\|"false">`<br/> *Optional* *Default: "false"* | Enable DNS conditional forwarding for device name resolution
111+
| `REV_SERVER_DOMAIN: <Network Domain>`<br/> *Optional* | If conditional forwarding is enabled, set the domain of the local network router
112+
| `REV_SERVER_TARGET: <Router's IP>`<br/> *Optional* | If conditional forwarding is enabled, set the IP of the local network router
113+
| `REV_SERVER_CIDR: <Reverse DNS>`<br/> *Optional* | If conditional forwarding is enabled, set the reverse DNS zone (e.g. `192.168.0.0/24`)
114114
| `ServerIP: <Host's IP>`<br/> **Recommended** | **--net=host mode requires** Set to your server's LAN IP, used by web block modes and lighttpd bind address
115115
| `ServerIPv6: <Host's IPv6>`<br/> *Required if using IPv6* | **If you have a v6 network** set to your server's LAN IPv6 to block IPv6 ads fully
116116
| `VIRTUAL_HOST: <Custom Hostname>`<br/> *Optional* *Default: $ServerIP* | What your web server 'virtual host' is, accessing admin through this Hostname/IP allows you to make changes to the whitelist / blacklists in addition to the default 'http://pi.hole/admin/' address
@@ -123,6 +123,16 @@ There are other environment variables if you want to customize various things in
123123
| `WEBUIBOXEDLAYOUT: <boxed\|traditional>`<br/>*Optional Default: boxed* | Use boxed layout (helpful when working on large screens)
124124
| `SKIPGRAVITYONBOOT`: <Not Set\|1><br/> *Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be updated when the container starts up. Setting this environment variable to 1 (or anything) will cause the Gravity Database to not be updated when container starts up.
125125

126+
## Deprecated environment variables:
127+
While these may still work, they are likely to be removed in a future version. Where applicible, alternative variable names are indicated. Please review the table above for usage of the alternative variables
128+
129+
| Docker Environment Var. | Description | Replaced By |
130+
| ----------------------- | ----------- | ----------- |
131+
| `CONDITIONAL_FORWARDING: <"true"\|"false">`<br/> *Optional* *Default: "false"* | Enable DNS conditional forwarding for device name resolution | `REV_SERVER`|
132+
| `CONDITIONAL_FORWARDING_IP: <Router's IP>`<br/> *Optional* | If conditional forwarding is enabled, set the IP of the local network router | `REV_SERVER_TARGET` |
133+
| `CONDITIONAL_FORWARDING_DOMAIN: <Network Domain>`<br/> *Optional* | If conditional forwarding is enabled, set the domain of the local network router | `REV_SERVER_DOMAIN` |
134+
| `CONDITIONAL_FORWARDING_REVERSE: <Reverse DNS>`<br/> *Optional* | If conditional forwarding is enabled, set the reverse DNS of the local network router (e.g. `0.168.192.in-addr.arpa`) | `REV_SERVER_CIDR` |
135+
126136
To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1`
127137

128138
Here is a rundown of other arguments for your docker-compose / docker run.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v5.2
1+
v5.2.1

start.sh

+16-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export INTERFACE
1717
export DNSMASQ_LISTENING_BEHAVIOUR="$DNSMASQ_LISTENING"
1818
export IPv6
1919
export WEB_PORT
20+
export REV_SERVER
21+
export REV_SERVER_DOMAIN
22+
export REV_SERVER_TARGET
23+
export REV_SERVER_CIDR
2024
export CONDITIONAL_FORWARDING
2125
export CONDITIONAL_FORWARDING_IP
2226
export CONDITIONAL_FORWARDING_DOMAIN
@@ -61,10 +65,18 @@ change_setting "IPV6_ADDRESS" "$ServerIPv6"
6165
change_setting "DNS_BOGUS_PRIV" "$DNS_BOGUS_PRIV"
6266
change_setting "DNS_FQDN_REQUIRED" "$DNS_FQDN_REQUIRED"
6367
change_setting "DNSSEC" "$DNSSEC"
64-
change_setting "CONDITIONAL_FORWARDING" "$CONDITIONAL_FORWARDING"
65-
change_setting "CONDITIONAL_FORWARDING_IP" "$CONDITIONAL_FORWARDING_IP"
66-
change_setting "CONDITIONAL_FORWARDING_DOMAIN" "$CONDITIONAL_FORWARDING_DOMAIN"
67-
change_setting "CONDITIONAL_FORWARDING_REVERSE" "$CONDITIONAL_FORWARDING_REVERSE"
68+
change_setting "REV_SERVER" "$REV_SERVER"
69+
change_setting "REV_SERVER_DOMAIN" "$REV_SERVER_DOMAIN"
70+
change_setting "REV_SERVER_TARGET" "$REV_SERVER_TARGET"
71+
change_setting "REV_SERVER_CIDR" "$REV_SERVER_CIDR"
72+
if [ -z "$REV_SERVER" ];then
73+
# If the REV_SERVER* variables are set, then there is no need to add these.
74+
# If it is not set, then adding these variables is fine, and they will be converted by the Pi-hole install script
75+
change_setting "CONDITIONAL_FORWARDING" "$CONDITIONAL_FORWARDING"
76+
change_setting "CONDITIONAL_FORWARDING_IP" "$CONDITIONAL_FORWARDING_IP"
77+
change_setting "CONDITIONAL_FORWARDING_DOMAIN" "$CONDITIONAL_FORWARDING_DOMAIN"
78+
change_setting "CONDITIONAL_FORWARDING_REVERSE" "$CONDITIONAL_FORWARDING_REVERSE"
79+
fi
6880
setup_web_port "$WEB_PORT"
6981
setup_web_password "$WEBPASSWORD"
7082
setup_temp_unit "$TEMPERATUREUNIT"

0 commit comments

Comments
 (0)