Pi hole for DNS serveur

arréter le dns embaquer dans ubuntu

sudo systemctl stop systemd-resolved.service
sudo systemctl disable systemd-resolved.service

temporairement forcer le dns d’ubuntu

sur un dns public (8.8.8.8 par exemple)

sudo nano /etc/resolv.conf
nameserver 8.8.8.8

installer un loadbalancer

installer metalLB

https://metallb.universe.tf/installation/

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.1.1-192.168.1.5,192.168.1.200-192.168.1.250

installer les services loadbalancer

apiVersion: v1
kind: Service
metadata:
  name: pihole-web-service
  namespace: pihole-ns  
spec:
  selector:
    app: pihole
  ports:
    - name: web
      protocol: TCP
      port: 80
      targetPort: 80
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name: pihole-dns-service
  namespace: pihole-ns  
spec:
  selector:
    app: pihole
  ports:
    - name: dns
      protocol: UDP
      port: 53
      targetPort: 53
  type: LoadBalancer

remettre le dns d’ubuntu

sur le dns pihole (192.168.1.241)

sudo nano /etc/resolv.conf
nameserver 192.168.1.241

Leave a Comment