Wifi Bridge With Dnsmasq

for me dnsmasq is running in wifi bridge

does the wifi brigde works if I remove dnsmasq?
If not, I need an other solution :frowning:

Thanks for your assistance

The new Pi-hole is forked from dnsmasq so its got exactly the same capabilities.
But instead of using that "RaspAP" interface to configure DHCP, you can use Pi-hole's own web admin interface to configure DHCP.

If you still run into issues, better create a new thread here to get support.
And post details how you've setup this "wifi bridge".

I fell for it again and wanted to tell @rockyfella to create his own thread and post details :wink:

Owh ps. you wont need to remove dnsmasq.
Just make sure its disabled from starting at boot:

sudo systemctl stop dnsmasq

sudo systemctl disable dnsmasq

doesn't work
wifi doesn't work anymore and FLT the same

Whats outcome for below ones ?

hostnamectl

ip a; ip l; ip r

sudo brctl show

grep -v '#\|^$' /etc/network/interfaces

grep -v '#\|^$' /etc/dhcpcd.conf

sudo grep -v '#\|^$' /etc/wpa_supplicant/wpa_supplicant.conf | sed -e 's/^.*psk.*$/ **PSKPASS**/' | sed -e 's/^.*ssid.*$/ **SSID**/'

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'

sudo systemctl status pihole-FTL -l

sudo systemctl status dnsmasq -l

And try generate token and post it here or upload to pastbin for the developers to have a look:

debug token is:
o8ctasa0pk

hostnamectl:
Static hostname: matrix-sever
Icon name: computer
Machine ID: 70c1d0e17d0e4ca393013840359da12a
Boot ID: 3061492d8181462ca351d0d2bc873775
Operating System: Raspbian GNU/Linux 9 (stretch)
Kernel: Linux 4.14.52-v7+
Architecture: arm

ip a; ip l; ip r :
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:e0:9c:ae brd ff:ff:ff:ff:ff:ff
inet 192.168.178.10/24 brd 192.168.178.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fd00::7eb:7391:3138:def7/64 scope global mngtmpaddr noprefixroute dynamic
valid_lft 6847sec preferred_lft 3247sec
inet6 fe80::b843:4fdd:d3f9:2e8/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:b5:c9:fb brd ff:ff:ff:ff:ff:ff
inet 10.3.141.1/24 brd 10.3.141.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::de78:fd9f:c4c3:21cc/64 scope link
valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::4910:1b3a:636a:e3cd/64 scope link flags 800
valid_lft forever preferred_lft forever
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:e0:9c:ae brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
link/ether b8:27:eb:b5:c9:fb brd ff:ff:ff:ff:ff:ff
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
link/none
default via 192.168.178.1 dev eth0 src 192.168.178.10 metric 202
default via 10.3.141.1 dev wlan0 src 10.3.141.1 metric 303
10.3.141.0/24 dev wlan0 proto kernel scope link src 10.3.141.1 metric 303
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1
192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.10 metric 202

sudo brctl show :
sudo: brctl: command not found

grep -v '#|^$' /etc/network/interfaces :
source-directory /etc/network/interfaces.d

grep -v '#|^$' /etc/dhcpcd.conf :
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
interface wlan0
static ip_address=10.3.141.1/24
static routers=10.3.141.1
static domain_name_server=1.1.1.1 8.8.8.8
interface eth0
static ip_address=192.168.178.10/24
static routers=192.168.178.1
static domain_name_servers=127.0.0.1

sudo grep -v '#|^$' /etc/wpa_supplicant/wpa_supplicant.conf | sed -e 's/^.psk.$/ PSKPASS/' | sed -e 's/^.ssid.$/ SSID/' :
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE

sudo netstat -nltup | grep 'Proto|:53 |:67 |:80 |:471' :
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 652/lighttpd
tcp6 0 0 :::80 :::* LISTEN 652/lighttpd

sudo systemctl status pihole-FTL -l :
● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: active (exited) since Tue 2018-08-14 22:11:26 CEST; 31min ago
Docs: man:systemd-sysv-generator(8)
Process: 385 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUC
CGroup: /system.slice/pihole-FTL.service

Aug 14 22:11:15 matrix-sever systemd[1]: Starting LSB: pihole-FTL daemon...
Aug 14 22:11:15 matrix-sever pihole-FTL[385]: Not running
Aug 14 22:11:15 matrix-sever pihole-FTL[385]: chown: cannot access '/etc/pihole/
Aug 14 22:11:26 matrix-sever su[1139]: Successful su for pihole by root
Aug 14 22:11:26 matrix-sever su[1139]: + ??? root:pihole
Aug 14 22:11:26 matrix-sever su[1139]: pam_unix(su:session): session opened for
Aug 14 22:11:26 matrix-sever pihole-FTL[385]: dnsmasq: cannot open or create lea
Aug 14 22:11:26 matrix-sever systemd[1]: Started LSB: pihole-FTL daemon.

sudo systemctl status dnsmasq -l :
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset:
Active: inactive (dead)

thx

You dont seem to have a network bridge setup:

What do you exactly mean with "bridge" ?

For the WiFi part, try put the WiFi SSID and password in below file:

$ cat /etc/wpa_supplicant/wpa_supplicant.conf
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="YOUR_WIFI_SSID"
  psk="YOUR_WIFI_PASSWORD"
}

Reboot and check if connected with:

iw dev wlan0 link

For the pihole-FTL part, the status output seems to be cut off on the right.
Can you try post again and maybe it helps if you enclose the output in between "Preformatted text" tags when replying ?

sudo systemctl status pihole-FTL -l

image

1 Like

One more thing, you seem to have configured DNS servers twice in dhcpcd.conf.
Either choose the first or second line but not both.
Default is the second line.

Same goes for "static routers=" ... choose one !

iw dev wlan0 link
Not connected

sudo systemctl status pihole-FTL -l
● pihole-FTL.service - LSB: pihole-FTL daemon Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled) Active: active (exited) since Thu 2018-08-16 22:19:37 CEST; 10min ago Docs: man:systemd-sysv-generator(8) Process: 363 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS) CGroup: /system.slice/pihole-FTL.service

Aug 16 22:19:25 matrix-sever systemd[1]: Starting LSB: pihole-FTL daemon... Aug 16 22:19:26 matrix-sever pihole-FTL[363]: Not running Aug 16 22:19:26 matrix-sever pihole-FTL[363]: chown: Zugriff auf '/etc/pihole/dhcp.leases' nicht möglich: Datei oder Verzeichnis n Aug 16 22:19:37 matrix-sever su[1142]: Successful su for pihole by root Aug 16 22:19:37 matrix-sever su[1142]: + ??? root:pihole Aug 16 22:19:37 matrix-sever su[1142]: pam_unix(su:session): session opened for user pihole by (uid=0) Aug 16 22:19:37 matrix-sever pihole-FTL[363]: dnsmasq: cannot open or create lease file /var/lib/misc/dnsmasq.leases: Permission d Aug 16 22:19:37 matrix-sever systemd[1]: Started LSB: pihole-FTL daemon.

Yes, there are two Server, because there are two wifi's/networks
first is eth0 connected
second is wlan0 and tun0 connected

seems to be I have to reinstall all software for upgrade to version 4

Your /etc/network/interfaces file appears to be missing some entries like wpa_supplicant which holds your WiFi SSID and pass.
Edit this interfaces file so its identical to mine(defaut):

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Reboot and post results here for below three:

grep -v '#\|^$' /etc/network/interfaces

sudo grep -v '#\|^$' /etc/wpa_supplicant/wpa_supplicant.conf | sed -e 's/^.*psk.*$/ **PSKPASS**/' | sed -e 's/^.*ssid.*$/ **SSID**/'

sudo iw dev wlan0 link

If still no luck, try see if a WiFi scan works and see if your WiFi SSID is detected:

sudo iw dev wlan0 scan

Again some output seems to be cut off from the status command.
It appears to be bugged trying to access the file /var/lib/misc/dnsmasq.leases which is not part of the standard Pi-hole install.
Whats output for below one ?

grep -v '#\|^$' -R /etc/dnsmasq.*

Check your /etc/resolv.conf file and you'll notice not all three DNS servers 1.1.1.1, 8.8.8.8 & 127.0.0.1 are contained in this file because of the two domain_name_servers= lines in dhcpcd.conf.
And for the two default routes (static routers=), I believe the OS will use only the first default route, not entirely sure, in the routing table and wont use the second configured default route (google "linux two default routes").

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