Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #231450

Re: Linux router AP with reserved IPs on wlan0?

From conover@rahul.net (John Conover)
Newsgroups linux.debian.user
Subject Re: Linux router AP with reserved IPs on wlan0?
Date 2021-02-07 10:40 +0100
Message-ID <BFOHT-4q7-1@gated-at.bofh.it> (permalink)
References <BFt0J-6X2-3@gated-at.bofh.it> <BFxxn-1q2-3@gated-at.bofh.it> <BFB7Y-3NN-9@gated-at.bofh.it> <BFOeS-4cu-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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, conover@rahul.net, http://www.johncon.com/

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Linux router AP with reserved IPs on wlan0? conover@rahul.net (John Conover) - 2021-02-06 11:30 +0100
  Re: Linux router AP with reserved IPs on wlan0? <tomas@tuxteam.de> - 2021-02-06 11:50 +0100
  Re: Linux router AP with reserved IPs on wlan0? Dan Ritter <dsr@randomstring.org> - 2021-02-06 13:10 +0100
  Re: Linux router AP with reserved IPs on wlan0? Stefan Monnier <monnier@iro.umontreal.ca> - 2021-02-06 16:20 +0100
    Re: Linux router AP with reserved IPs on wlan0? conover@rahul.net (John Conover) - 2021-02-06 20:10 +0100
      Re: Linux router AP with reserved IPs on wlan0? Tixy <tixy@yxit.co.uk> - 2021-02-07 10:10 +0100
        Re: Linux router AP with reserved IPs on wlan0? conover@rahul.net (John Conover) - 2021-02-07 10:40 +0100
  Re: Linux router AP with reserved IPs on wlan0? Gregory Seidman <gsslist+debian@anthropohedron.net> - 2021-02-08 03:30 +0100
    Re: Linux router AP with reserved IPs on wlan0? Dan Ritter <dsr@randomstring.org> - 2021-02-08 12:50 +0100
      Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Celejar <celejar@gmail.com> - 2021-02-08 14:10 +0100
        Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Dan Ritter <dsr@randomstring.org> - 2021-02-08 14:40 +0100
          Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Celejar <celejar@gmail.com> - 2021-02-08 15:40 +0100
            Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Dan Ritter <dsr@randomstring.org> - 2021-02-08 16:00 +0100
              Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Celejar <celejar@gmail.com> - 2021-02-08 16:30 +0100
                Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Dan Ritter <dsr@randomstring.org> - 2021-02-08 17:10 +0100
                Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Celejar <celejar@gmail.com> - 2021-02-08 21:40 +0100
                Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Dan Ritter <dsr@randomstring.org> - 2021-02-08 22:50 +0100
                Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with  reserved IPs on wlan0? Celejar <celejar@gmail.com> - 2021-02-09 00:30 +0100
                RE: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP  withreserved IPs on wlan0? Michael Grant <mgrant@grant.org> - 2021-02-09 13:00 +0100
                Re: Security: OpenWRT vs. Debian [Was:] Re: Linux router AP with reserved IPs on wlan0? Stefan Monnier <monnier@iro.umontreal.ca> - 2021-02-08 17:30 +0100

csiph-web