1

I have setup a Raspberry Pi Zero W as both Wifi Client and Wifi AP using @Ingo's guide. Everything is working fine. The Pi is running mosquitto MQTT broker, Node-Red, lighttpd.

I'm currently in the optimization phase, closing all unnecessary ports on the Client side for security reasons, all services being only available to the AP side. I've successfully achieved that for all services but the DHCP server (port 67) is still on 0.0.0.0.

netstat -an

Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 0.0.0.0:67              0.0.0.0:*

I've searched systemd-networkd documentation for a possible binding setting but wasn't able to identify one.

Here below are my various configuration files which are very close to Ingo's samples. Any suggestion or pointer will be much appreciated.

Thanks


/etc/systemd/network/08-wifi.network

[Match]
Name=wl*
[Network]
LLMNR=no
LinkLocalAddressing=no
MulticastDNS=no
DHCP=ipv4
DNS=1.1.1.1 208.67.222.222 208.67.220.220
[DHCP]
# use only my choice of DNS, ignore those from DHCP
UseDNS=no

/etc/systemd/network/

[Match]
Name=ap@*
[Network]
LLMNR=no
MulticastDNS=yes
IPMasquerade=yes
Address=192.168.170.1/24
DHCPServer=yes
[DHCPServer]
DNS=192.168.170.1

/etc/hostapd/hostapd.conf

driver=nl80211
ssid=somessid
country_code=FR
hw_mode=g
channel=1
auth_algs=1
wpa=2
wpa_passphrase=letskeepoursecretssecret
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
Barbudor
  • 31
  • 4
  • I had a similar issue.. I resorted to installing the netplan.io package as it makes it very easy to pinpoint which devices you want to configure. – Simon Banks Mar 25 '21 at 09:10

0 Answers0