On Sat, 2021-02-06 at 11:00 -0800, John Conover wrote: > Stefan Monnier writes: > > > A wireless router made with hostapd/dnsmasq/dhcpcd is fairly easy, and > > > works well with iptables, with one shortcoming. > > > > > > After antagonizing the Google for hours, I can not find any way to add > > > reserved IPs based on the the MAC address of devices connected on > > > wlan0, (presumably in dhcpcd.conf.) Seems kind of a simple oversight > > > for a wireless AP. > > > > I'm not familiar with dhcpd, but dnsmasq's built-in DHCP server has been > > perfectly sufficient so far and it lets you specify fixed IPs based on > > MACs by simply putting those in the `/etc/ethers` file. > > > > Thank you, Stefan. > > Works like a charm. The syntax of /etc/ethers is ':' delimited MAC > address, followed by a space delimiter, followed by the IPv4 IP > address, per IP reservation. That IP address must also be in > /etc/hosts.
I didn't know about /etc/ethers, on my system I allocate fixed IP addresses and hostnames by adding a lines to dnsmasq.conf like dhcp-host=MAC-Address,IP-Address,Hostname,Lease-Time I guess there's more than one way to skin this cat. -- Tixy