Re: how to disable WiFi / wpa-supplicant so hostapd can be used ?

2021-07-21 Thread Jason Vas Dias via networkmanager-list
Thank You so much, Thomas, for the most useful info !

RE: > Patch welcome to properly handle the release of a device
  > by setting it unmanaged.

I will investigate this and see what I can do to improve
management of wpa_supplicant (W_S) & wireless interfaces.

I'd also like to develop a patch to make NM fully hostapd aware ,
so that the code realizes that use of W_S and hostapd are
mutually exclusive for an interface , and which add settings
for fully setting up & managing hostapd as well as W_S .
And to allow switching between hostpd & W_S modes.

hostapd probably needs its own module to manage things
like providing dhcp service to connecting usits - I've been
using static IP because I only have a few connecting
devices - happily Android phones do allow connections to
WEP APs with a static IP . But full Address Pool & DHCP
server mgmt is needed for arbitrarily large numbers of
 connecting  units.  And the NM GUIs / applets would need
changes to support the new hostapd settings .



On 21/07/2021, Thomas Haller  wrote:
> On Tue, 2021-07-20 at 22:04 +0100, Jason Vas Dias via networkmanager-
> list wrote:
>> If I do :
>>   # nmcli radio wifi off
>> , it disassociates the PHY for the device and I have to
>>   'rfkill $id unblock' .
>>   If I reenable wireless, and  do
>>   # systemctl stop wpa_supplicant
>>   # mv /usr/sbin/wpa_supplicant /usr/sbin/wpa_supplicant.bin
>>  after starting NM, then I can run hostapd .
>> I have to remember to move wpa_supplicant back after I stop
>> using hostapd .
>> Please add support for enabling either hostapd or wpa_supplicant,
>> not both, to NM = or is there some way of disabling running the
>> wpa_supplicant service only, without rfkill ?
>
> Hi,
>
>
> configure the device as unmanaged.
>
> Temporarily, with `nmcli device set wlan0 managed no`
>
>
> Permanently, there are several means (udev rules, config files). the
> best seems to be a file
>
>   /etc/NetworkManager/conf.d/90-wlan-unmanaged.conf
>
> with
>
>   [device-90-wlan-unmanaged]
>   match-device=interface-name:wlan0
>   managed=0
>
> see `man NetworkManager.conf`.
>
>
> If you do it that way, you can still override it at runtime with `nmcli
> device set wlan0 managed yes`.
>
>
>
> I think `nmcli device set wlan0 managed yes` may not sufficiently
> instruct wpa_supplicant to let go of the device. That means, you still
> might need `systemctl stop wpa_supplicant.service`. Patch welcome to
> properly handle the release of a device by setting it unmanaged.
>
>
>
> best,
> Thomas
>
>
>>
>>
>> On 20/07/2021, Jason Vas Dias  wrote:
>> >
>> > Good day -
>> >
>> >  Whenever I try to run hostapd, NM still runs wpa-supplicant,
>> >  which periodically tries to put the WiFi interface into scanning
>> >  mode, which messes up the hostapd session .
>> >
>> >  Please is there a config file setting or applet interaction
>> >  to disable wpa-supplicant (and maybe configure & run hostapd) ?
>> >
>> >  I'd like NM to start dhclient on my Wired interface, and
>> >  be able to bring up my L2TP VPN, but leave the Wireless
>> >  interface entirely alone.
>> >
>> >  Any way to do this in NetworkManager.conf or GUI ?
>> >
>> > Thanks in advance for any replies,
>> > Best Regards,
>> > Jason
>> >
>> ___
>> networkmanager-list mailing list
>> networkmanager-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/networkmanager-list
>>
>
>
>
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: how to disable WiFi / wpa-supplicant so hostapd can be used ?

2021-07-20 Thread Jason Vas Dias via networkmanager-list
If I do :
  # nmcli radio wifi off
, it disassociates the PHY for the device and I have to
  'rfkill $id unblock' .
  If I reenable wireless, and  do
  # systemctl stop wpa_supplicant
  # mv /usr/sbin/wpa_supplicant /usr/sbin/wpa_supplicant.bin
 after starting NM, then I can run hostapd .
I have to remember to move wpa_supplicant back after I stop
using hostapd .
Please add support for enabling either hostapd or wpa_supplicant,
not both, to NM = or is there some way of disabling running the
wpa_supplicant service only, without rfkill ?


On 20/07/2021, Jason Vas Dias  wrote:
>
> Good day -
>
>  Whenever I try to run hostapd, NM still runs wpa-supplicant,
>  which periodically tries to put the WiFi interface into scanning
>  mode, which messes up the hostapd session .
>
>  Please is there a config file setting or applet interaction
>  to disable wpa-supplicant (and maybe configure & run hostapd) ?
>
>  I'd like NM to start dhclient on my Wired interface, and
>  be able to bring up my L2TP VPN, but leave the Wireless
>  interface entirely alone.
>
>  Any way to do this in NetworkManager.conf or GUI ?
>
> Thanks in advance for any replies,
> Best Regards,
> Jason
>
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


how to disable WiFi / wpa-supplicant so hostapd can be used ?

2021-07-20 Thread Jason Vas Dias via networkmanager-list


Good day -

 Whenever I try to run hostapd, NM still runs wpa-supplicant,
 which periodically tries to put the WiFi interface into scanning
 mode, which messes up the hostapd session .

 Please is there a config file setting or applet interaction
 to disable wpa-supplicant (and maybe configure & run hostapd) ?

 I'd like NM to start dhclient on my Wired interface, and
 be able to bring up my L2TP VPN, but leave the Wireless
 interface entirely alone.

 Any way to do this in NetworkManager.conf or GUI ?

Thanks in advance for any replies,
Best Regards,
Jason
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: dhclient-${IFNAME}.conf stopped working after upgrade FC32 -> FC34

2021-05-31 Thread Jason Vas Dias via networkmanager-list
I did try :
   'set ipv4.dns 127.0.0.1
save persistant
  '
in  'nmcli c e $uuid', but this did not work either after an up / down -
/etc/resolv.conf was not updated to contain only '127.0.0.1' - it did
ALSO contain '127.0.0.1', but as a suffix, not a prefix - this is not
what I want .
This did used to work with my old setup on FC32, but not on FC34 .
Is there any custom dhclient.conf file that is included in the current
implementation anymore ?
Thanks, Jason

On 31/05/2021, Jason Vas Dias  wrote:
>
> Good day -
>
>   On an FC32 x86_64 box, which I just successfully upgraded to FC34 ,
>   now running NM 1.30.4-1.fc34.x86_64 :
>   I had some custom dhclient configuration files, which used to be honored
>   by NM - ie. they took effect before upgrade, but not after:
>
> /etc/dhcp/{dhclient-ens1u2u4.conf,dhclient-wlp59s0.conf}
>
>   which contain:
>
> dhclient.ens1u2u4.conf :
>
> interface "ens1u2u4" {
>  send dhcp-client-identifier 34:48:ed:a8:7c:be;
>  send host-name "jvdspc.jvds.net";
>  supersede domain-name-servers 127.0.0.1;
> }
>
>
> dhclient.wlp59s0.conf :
> interface "wlp59s0" {
>  send dhcp-client-identifier 5c:80:b6:72:cb:7b;
>  send host-name "jvdspc.jvds.net";
>  supersede domain-name-servers 127.0.0.1;
> }
>
>
>   There are links to these files in /etc/dhclient-{ens1u2u4,wlp59s0}.conf ,
> and
>   /etc/dhclient.{ens1u2u4,wlp59s0}.conf .
>
>   These files used to be merged in to the effective DHCP client
>   configuration , on FC32, and all prior FC & RHEL releases I've used, in:
>   /var/lib/NetworkManager/dhclient-{ens1u2u4,wlp59s0}.conf
>   , in use for each interface, which is written for each 'up' transition,
>   but no longer.
>
>   I have in /etc/NetworkManager/NetworkManager.conf:
>
> [main]
> #plugins=ifcfg-rh
> dhcp=dhclient
>
>
>   I want to run my own ISC BIND caching nameserver,
>   which serves some authoritative zones and some RPZ (response policy) zones
> ,
>   and also tell any Dynamic DNS configured DHCP servers what I consider
>   my domain name to be.
>
>   I already had to disable systemd-resolved service after the upgrade, which
> also
>   broke using my own nameserver.
>
>   Please can anyone suggest how I can get this custom DHCP option content
>   included in the effective ISC dhclient (v4) options , without
>   hacking the source and building my own NetworkManager to write
>   its dhclient.conf differently,  which would be my logical next step ?
>
>   The command:
>
>   $ nmcli c m $UUID 'DHCP4.OPTION+=supersede
> domain-name-servers=(127.0.0.1)'
>
>   does not let me add a 'DHCP4.OPTION[32]', though DHCP4.OPTION[0 ... 31]
>   is listed in
>
>   $ nmcli c s $UUID
>
>   output - none of them are my custom dhclient-${ifname}.conf options
>   above.
>
>   It would be nice if there was some way to run a script to output
>   the superseded domain-name-servers list to a file like:
>   /etc/named-dns-forwarders.conf, which contains a named.conf
>   'forwarders {  $domain_name_server ; }; ' statement, for
>   my caching-only-nameserver, which has 'recursion' enabled,
>   which I could include in my /etc/named.conf, but since my
>   forwarders list does not change often, I can live with this.
>
>
> Thanks in Advance for any helpful replies, Best Regards,
> Jason
>
>
>
>
>
>
>
>
>
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


dhclient-${IFNAME}.conf stopped working after upgrade FC32 -> FC34

2021-05-31 Thread Jason Vas Dias via networkmanager-list


Good day -

  On an FC32 x86_64 box, which I just successfully upgraded to FC34 ,
  now running NM 1.30.4-1.fc34.x86_64 :
  I had some custom dhclient configuration files, which used to be honored
  by NM - ie. they took effect before upgrade, but not after:

/etc/dhcp/{dhclient-ens1u2u4.conf,dhclient-wlp59s0.conf}

  which contain:

dhclient.ens1u2u4.conf :
 
interface "ens1u2u4" {
 send dhcp-client-identifier 34:48:ed:a8:7c:be;
 send host-name "jvdspc.jvds.net";
 supersede domain-name-servers 127.0.0.1;
}


dhclient.wlp59s0.conf :
interface "wlp59s0" {
 send dhcp-client-identifier 5c:80:b6:72:cb:7b;
 send host-name "jvdspc.jvds.net";
 supersede domain-name-servers 127.0.0.1;
}


  There are links to these files in /etc/dhclient-{ens1u2u4,wlp59s0}.conf , and
  /etc/dhclient.{ens1u2u4,wlp59s0}.conf .

  These files used to be merged in to the effective DHCP client
  configuration , on FC32, and all prior FC & RHEL releases I've used, in:
  /var/lib/NetworkManager/dhclient-{ens1u2u4,wlp59s0}.conf
  , in use for each interface, which is written for each 'up' transition,
  but no longer.

  I have in /etc/NetworkManager/NetworkManager.conf:

[main]
#plugins=ifcfg-rh
dhcp=dhclient


  I want to run my own ISC BIND caching nameserver,
  which serves some authoritative zones and some RPZ (response policy) zones ,
  and also tell any Dynamic DNS configured DHCP servers what I consider
  my domain name to be.
  
  I already had to disable systemd-resolved service after the upgrade, which 
also
  broke using my own nameserver.

  Please can anyone suggest how I can get this custom DHCP option content
  included in the effective ISC dhclient (v4) options , without
  hacking the source and building my own NetworkManager to write
  its dhclient.conf differently,  which would be my logical next step ?

  The command:
  
  $ nmcli c m $UUID 'DHCP4.OPTION+=supersede domain-name-servers=(127.0.0.1)' 

  does not let me add a 'DHCP4.OPTION[32]', though DHCP4.OPTION[0 ... 31]
  is listed in

  $ nmcli c s $UUID

  output - none of them are my custom dhclient-${ifname}.conf options
  above.

  It would be nice if there was some way to run a script to output
  the superseded domain-name-servers list to a file like:
  /etc/named-dns-forwarders.conf, which contains a named.conf
  'forwarders {  $domain_name_server ; }; ' statement, for
  my caching-only-nameserver, which has 'recursion' enabled,
  which I could include in my /etc/named.conf, but since my
  forwarders list does not change often, I can live with this.
  

Thanks in Advance for any helpful replies, Best Regards,
Jason



  



   
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list