diff --git a/docs/ftldns/configfile.md b/docs/ftldns/configfile.md index 565a419..9831ed6 100644 --- a/docs/ftldns/configfile.md +++ b/docs/ftldns/configfile.md @@ -142,8 +142,11 @@ Controls whether and how FTL will reply with for address for which a local inter - `PI.HOLE` (the default) respond with `pi.hole` - `HOSTNAME` serve the machine's global hostname +- `HOSTNAMEFQDN` serve the machine's global hostname as fully qualified domain by adding the local suffix. See note below. - `NONE` Pi-hole will **not** respond automatically on PTR requests to local interface addresses. Ensure `pi.hole` and/or hostname records exist elsewhere. +Note about `HOSTNAMEFQDN`: If no local suffix has been defined, FTL appends the local domain `.no_fqdn_available`. In this case you should either add `domain=whatever.com` to a custom config file inside `/etc/dnsmasq.d/` (to set `whatever.com` as local domain) or use `domain=#` which will try to derive the local domain from `/etc/resolv.conf` (or whatever is set with `resolv-file`, when multiple `search` directives exist, the first one is used). + #### `DELAY_STARTUP=0` (PR [#716](https://github.com/pi-hole/FTL/pull/716)) {#delay_startup data-toc-label='Delay resolver startup'} In certain configurations, you may want FTL to wait a given amount of time before trying to start the DNS revolver. This is typically found when network interfaces appear only late during system startup and the interface startup priorities are configured incorrectly. This setting takes any integer value between 0 and 300 seconds. diff --git a/docs/guides/vpn/wireguard/client.md b/docs/guides/vpn/wireguard/client.md index 86a6a06..ac040e8 100644 --- a/docs/guides/vpn/wireguard/client.md +++ b/docs/guides/vpn/wireguard/client.md @@ -5,35 +5,65 @@ Adding clients is really simple and easy. The process for setting up a client is For each new client, the following steps must be taken. For the sake of simplicity, we will create the config file on the server itself. This, however, means that you need to transfer the config file *securely* to your server as it contains the private key of your client. An alternative way of doing this is to generate the configuration locally on your client and add the necessary lines to your server's configuration. -??? info "All commands described below at once" +??? info "Script to generate clients automatically" + Script content: + + ```bash + #!/bin/bash + ipv4="$1$4" + ipv6="$2$4" + serv4="${1}1" + serv6="${2}1" + target="$3" + name="$5" + + wg genkey | tee "${name}.key" | wg pubkey > "${name}.pub" + wg genpsk > "${name}.psk" + + echo "# $name" >> /etc/wireguard/wg0.conf + echo "[Peer]" >> /etc/wireguard/wg0.conf + echo "PublicKey = $(cat "${name}.pub")" >> /etc/wireguard/wg0.conf + echo "PresharedKey = $(cat "${name}.psk")" >> /etc/wireguard/wg0.conf + echo "AllowedIPs = $ipv4/32, $ipv6/128" >> /etc/wireguard/wg0.conf + echo "" >> /etc/wireguard/wg0.conf + + echo "[Interface]" > "${name}.conf" + echo "Address = $ipv4/32, $ipv6/128" >> "${name}.conf" + echo "PrivateKey = $(cat "${name}.key")" >> "${name}.conf" + echo "" >> "${name}.conf" + echo "[Peer]" >> "${name}.conf" + echo "PublicKey = $(cat server.pub)" >> "${name}.conf" + echo "PresharedKey = $(cat "${name}.psk")" >> "${name}.conf" + echo "Endpoint = $target" >> "${name}.conf" + echo "AllowedIPs = ${serv4}/32, ${serv6}/128" >> "${name}.conf" # clients isolated from one another + # echo "AllowedIPs = ${1}0/24, ${2}/64" >> "${name}.conf" # clients can see each other + echo "PersistentKeepalive = 25" >> "${name}.conf" + + # Print QR code scanable by the Wireguard mobile app on screen + qrencode -t ansiutf8 < "${name}.conf" + + systemctl restart wg-quick@wg0 + ``` + + Run the script like + ```bash sudo -i cd /etc/wireguard umask 077 - name="client_name" - - wg genkey | tee "${name}.key" | wg pubkey > "${name}.pub" - wg genpsk > "${name}.psk" - - echo "[Peer]" >> /etc/wireguard/wg0.conf - echo "PublicKey = $(cat "${name}.pub")" >> /etc/wireguard/wg0.conf - echo "PresharedKey = $(cat "${name}.psk")" >> /etc/wireguard/wg0.conf - echo "AllowedIPs = 10.100.0.2/32, fd08:4711::2/128" >> /etc/wireguard/wg0.conf - - systemctl restart wg-quick@wg0 - - echo "[Interface]" > "${name}.conf" - echo "Address = 10.100.0.2/32, fd08:4711::2/128" >> "${name}.conf" # May need editing - echo "DNS = 10.100.0.1" >> "${name}.conf" # Your Pi-hole's IP - echo "PrivateKey = $(cat "${name}.key")" >> "${name}.conf" - echo "PublicKey = $(cat server.pub)" >> "${name}.conf" - echo "PresharedKey = $(cat "${name}.psk")" >> "${name}.conf" - - qrencode -t ansiutf8 -r "${name}.conf" + bash "10.100.0." "fd08:4711::" "my_server_domain:47111" 2 "annas-android" + bash "10.100.0." "fd08:4711::" "my_server_domain:47111" 3 "peters-laptop" exit ``` + + to generate two clients: + + - `annas-android` with addresses `10.100.0.2` and `fd08:4711::2` + - `peters-laptop` with addresses `10.100.0.3` and `fd08:4711::3` + + connecting to the server running at `my_server_domain:47111` ## Key generation @@ -84,7 +114,6 @@ After a restart, the server file should look like: [Interface] Address = 10.100.0.1/24, fd08::1/128 ListenPort = 47111 -SaveConfig = true PrivateKey = XYZ123456ABC= # PrivateKey will be different [Peer] @@ -134,7 +163,7 @@ Next, add your server as peer for this client: ```plain [Peer] -AllowedIPs = 10.100.0.0/24, fd08::/64 +AllowedIPs = 10.100.0.1/32, fd08::1/128 Endpoint = [your public IP or domain]:47111 PersistentKeepalive = 25 ``` diff --git a/mkdocs.yml b/mkdocs.yml index 5523b92..2f9da9d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,6 +17,7 @@ theme: code: 'Roboto Mono' features: - navigation.top + - navigation.instant - search.suggest - search.highlight - search.share diff --git a/package-lock.json b/package-lock.json index d01b2d0..cd15ec1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -568,9 +568,9 @@ } }, "fastq": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", - "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -847,9 +847,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -968,9 +968,9 @@ "dev": true }, "linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", "dev": true, "requires": { "uc.micro": "^1.0.1" @@ -1073,9 +1073,9 @@ } }, "markdownlint-cli2": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.3.0.tgz", - "integrity": "sha512-0nmB8MMqxwTolfkOaGW9RLqkBVG6DW6oBTyDKd3SP+7e8FPhihg6KBqpz1puj37C2Wd3POS98xiE1GljEVNyHw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.3.2.tgz", + "integrity": "sha512-Wj4iQy2J49m9CVkWkLTdFxMTPDqD3AyL3NbLQgz/nUnTu8LnDguFCbQtFhdzQPvncHVjrKT2vYqg7DifzVP4tA==", "dev": true, "requires": { "globby": "~11.0.4", diff --git a/package.json b/package.json index f9e69c0..988f646 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,6 @@ }, "devDependencies": { "linkinator": "^2.14.4", - "markdownlint-cli2": "0.3.0" + "markdownlint-cli2": "0.3.2" } } diff --git a/requirements.txt b/requirements.txt index 8d2f756..80498ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ markdown-include==0.6.0 mkdocs==1.2.3 mkdocs-git-revision-date-localized-plugin==0.10.0 -mkdocs-material==7.3.4 +mkdocs-material==7.3.5 mkdocs-redirects==1.0.3