Tixy writes: > 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. >
Hi Tixy. For the archives, the documentation to configuration of dnsmasq(1) is in /etc/dnsmasq.conf, the dnsmasq configuration file. It is verbose, and there are many options. Read thoroughly. It is a very impressive accomplishment, and works well, and is fairly easy to get working, (once familiar with the configuration file.) As a closing note, the DHCP/DNS services, (for wlan0,) are configured in the /etc/dnsmasq.conf file, *_NOT_* /etc/dhcpcd.conf, which is the usual alternative. (This is where I went astray-I mean the name is dnsmasq, probably meaning it is something to do with dns, duh.) Thanks to all, John -- John Conover, cono...@rahul.net, http://www.johncon.com/