Configuration wifi AP + internet + pihole sur PI3B

Bonjour , j ' ai un pi 3B sous :

iznobe@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
iznobe@raspberrypi:~ $ 

j ' ain installer pihole et suivi ce tuto : Raspberry Pi 3: Wifi Access Point Router with Pi-Hole (DNS-based adblocker) #RaspberryPi - Qiita

Apres un redemarrage , le point d' acces n' est pas actif .
quel est le probleme svp ?

iznobe@raspberrypi:~ $ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0


# personnal configuration to give SINGLE fixed IP
#interface eth0
#static ip_address=192.168.1.132
#static ip_address=192.168.3.132/24
#static routers=192.168.1.1
#static domain_name_servers=9.9.9.9

# personnal configuration to give MULTIPLE fixed IP
#denyinterfaces eth0
#nogateway

interface eth0
static ip_address=192.168.1.132/24
static routers=192.168.1.1
#static domain_name_servers=
#static domain_search=
#denyinterfaces wlan0
#interface wlan0
#        static ip_address=192.168.42.1/24
#        static routers=192.168.42.1
#        static domain_name_servers= 
iznobe@raspberrypi:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

# The loopback network interface
#auto lo
#iface lo inet loopback

# The primary network interface
#auto eth0
#allow-hotplug eth0

# personnal configuration

#auto eth0:1

#iface eth0:1 inet static
#    adress 192.168.1.132
#    netmask 255.255.255.0
#    network 192.168.1.0
#    gateway 192.168.1.1


#iface eth0:1
#    iface eth0:1 inet static
#    adress 192.168.3.132
#    netmask 255.255.255.0
#    gateway 192.168.3.1
#    network 192.168.3.0
#
# wlan0 - static IP 
allow-hotplug wlan0 
iface wlan0 inet static 
    address 192.168.42.1
    netmask 255.255.255.0
    network 192.168.42.0
    broadcast 192.168.42.255
iznobe@raspberrypi:~ $ cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
#driver=rtl871xdrv
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
#ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
ssid=Pi-AP
wpa_passphrase=raspberry
iznobe@raspberrypi:~ $ cat /etc/default/hostapd
# Defaults for hostapd initscript
#
# WARNING: The DAEMON_CONF setting has been deprecated and will be removed
#          in future package releases.
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
#DAEMON_CONF=""

# Additional daemon options to be appended to hostapd command:-
# 	-d   show more debug messages (-dd for even more)
# 	-K   include key data in debug messages
# 	-t   include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""
DAEMON_CONF="/etc/hostapd/hostapd.conf"
iznobe@raspberrypi:~ $ 

autre question , il n' existe pas un tutot dans lequel on peut configurer le wifi + l ' ethernet en mode bridge ( donc sur le meme reseau local ) a la façon des box tout simplement ?

Derniere question , le paquet " dnsmaq " est indispensable au bon fonctionnement de pi-hole ?
si oui , faudrait peut etre dire aux dev qu ' ils l' ajoute aux dependances lors de l' installation de pi-hole , car j' ai un fichier de config , mais le paquet n' etait pas installé :

iznobe@raspberrypi:~ $ sudo apt install dnsmasq
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
Lecture des informations d'état... Fait      
Les NOUVEAUX paquets suivants seront installés :
  dnsmasq
0 mis à jour, 1 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 32,0 ko dans les archives.
Après cette opération, 120 ko d'espace disque supplémentaires seront utilisés.
Réception de :1 http://mirrors.ircam.fr/pub/raspbian/raspbian bullseye/main armhf dnsmasq all 2.85-1 [32,0 kB]
32,0 ko réceptionnés en 1s (60,0 ko/s)
Sélection du paquet dnsmasq précédemment désélectionné.
(Lecture de la base de données... 100100 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../dnsmasq_2.85-1_all.deb ...
Dépaquetage de dnsmasq (2.85-1) ...
Paramétrage de dnsmasq (2.85-1) ...

Fichier de configuration « /etc/dnsmasq.conf »
 ==> Fichier du système créé par vous ou par un script.
 ==> Fichier également présent dans le paquet fourni par le responsable du paquet.
   Que voulez-vous faire ? Vos options sont les suivantes :
    Y ou I  : installer la version du responsable du paquet
    N ou O  : garder votre version actuellement installée
      D     : afficher les différences entre les versions
      Z     : suspendre ce processus pour examiner la situation
 L'action par défaut garde votre version actuelle.
*** dnsmasq.conf (Y/I/N/O/D/Z) [défaut=N] ? o
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
invoke-rc.d: initscript dnsmasq, action "start" failed.
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-05-01 13:04:02 CEST; 32ms ago
    Process: 1892 ExecStartPre=/etc/init.d/dnsmasq checkconfig (code=exited, status=0/SUCCESS)
    Process: 1900 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
        CPU: 104ms

mai 01 13:04:02 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
mai 01 13:04:02 raspberrypi dnsmasq[1900]: dnsmasq: impossible de créer une socket d'écoute pour port 53 : Adresse déjà utilisée
mai 01 13:04:02 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
mai 01 13:04:02 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
mai 01 13:04:02 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
iznobe@raspberrypi:~ $

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.