all
This commit is contained in:
3
Reseaux/Pihole/LICENSE
Normal file
3
Reseaux/Pihole/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Reseaux/Pihole/README.md
Normal file
66
Reseaux/Pihole/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : https://github.com/mastodon/mastodon
|
||||
|
||||
# Pihole
|
||||
|
||||
Pi-Hole est une application de blocage de publicit? au niveau du r?seau et de suivi Internet de blocage de Linux qui sert de gouffre DNS (et, ?ventuellement, d'un serveur DHCP), destin?e ? ?tre utilis?e sur un r?seau priv?.
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Pihole
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Reseaux\Pihole
|
||||
```
|
||||
|
||||
## Modifier la configuration de Pihole
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Reseaux\Pihole
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Pihole
|
||||
|
||||
Pour utiliser Pihole tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Pihole avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Pihole.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Reseaux/Pihole/docker-compose-traefik.yml
Normal file
66
Reseaux/Pihole/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
78
Reseaux/Pihole/docker-compose.yml
Normal file
78
Reseaux/Pihole/docker-compose.yml
Normal file
@ -0,0 +1,78 @@
|
||||
version: "3.6"
|
||||
|
||||
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
|
||||
services:
|
||||
cloudflared:
|
||||
container_name: cloudflared
|
||||
# Restart on crashes and on reboots
|
||||
restart: unless-stopped
|
||||
image: cloudflare/cloudflared:latest
|
||||
command: proxy-dns
|
||||
environment:
|
||||
- "TUNNEL_DNS_UPSTREAM=https://1.1.1.1/dns-query,https://1.0.0.1/dns-query,https://9.9.9.9/dns-query,https://149.112.112.9/dns-query"
|
||||
|
||||
# Listen on an unprivileged port
|
||||
- "TUNNEL_DNS_PORT=5053"
|
||||
|
||||
# Listen on all interfaces
|
||||
- "TUNNEL_DNS_ADDRESS=0.0.0.0"
|
||||
|
||||
# Attach cloudflared only to the private network
|
||||
networks:
|
||||
pihole_internal:
|
||||
ipv4_address: 172.70.9.2
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
|
||||
pihole:
|
||||
container_name: pihole
|
||||
image: pihole/pihole:latest
|
||||
ports:
|
||||
- "53:53/tcp"
|
||||
- "53:53/udp"
|
||||
- "67:67/udp"
|
||||
- "500:80/tcp"
|
||||
# - "443:443/tcp"
|
||||
networks:
|
||||
pihole_internal:
|
||||
ipv4_address: 172.70.9.3
|
||||
proxy:
|
||||
environment:
|
||||
TZ: 'Europe/London'
|
||||
WEBPASSWORD: 'password'
|
||||
PIHOLE_DNS_: '172.70.9.2#5053'
|
||||
DNSMASQ_LISTENING: 'all'
|
||||
VIRTUAL_HOST: pihole.yourdomain.com
|
||||
# Volumes store your data between container upgrades
|
||||
volumes:
|
||||
- '/home/ubuntu/docker/pihole/:/etc/pihole/'
|
||||
- '/home/ubuntu/docker/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
|
||||
# Recommended but not required (DHCP needs NET_ADMIN)
|
||||
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
|
||||
#cap_add:
|
||||
# - NET_ADMIN
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- cloudflared
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.pihole.entrypoints=http"
|
||||
- "traefik.http.routers.pihole.rule=Host(`pihole.yourdomain.com`)"
|
||||
- "traefik.http.middlewares.pihole-https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.pihole.middlewares=pihole-https-redirect"
|
||||
- "traefik.http.routers.pihole-secure.entrypoints=https"
|
||||
- "traefik.http.routers.pihole-secure.rule=Host(`pihole.yourdomain.com`)"
|
||||
- "traefik.http.routers.pihole-secure.tls=true"
|
||||
- "traefik.http.routers.pihole-secure.service=pihole"
|
||||
- "traefik.http.services.pihole.loadbalancer.server.port=80"
|
||||
- "traefik.docker.network=proxy"
|
||||
|
||||
networks:
|
||||
pihole_internal:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.70.9.0/29
|
||||
name: pihole_internal
|
||||
proxy:
|
||||
external: true
|
BIN
Reseaux/Pihole/img/banniere-Pihole.png
Normal file
BIN
Reseaux/Pihole/img/banniere-Pihole.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
7
Reseaux/Pihole/ubuntu port 53 fix
Normal file
7
Reseaux/Pihole/ubuntu port 53 fix
Normal file
@ -0,0 +1,7 @@
|
||||
#run these commands to fix port bind error
|
||||
|
||||
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
|
||||
|
||||
sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'
|
||||
|
||||
systemctl restart systemd-resolved
|
Reference in New Issue
Block a user