Hosting wifi AP broken (maybe by recent update)

I sometimes host a wifi AP on my laptop, so that I can connect directly to the laptop with my phone for testing web apps etc. with a test server on the laptop. However, the shared wifi connection recently stopped working. I tried it with several different phones, same result. I tried hosting a wifi AP from my desktop PC (also Fedora) with the same result.

The wifi network is created and is visible to other devices, but when another device joins it gets stuck at “obtaining IP address” or similar and never gets an address. This was never a problem before, and I haven’t changed any network settings.

I’ve tried this on my laptop (F39) and my desktop (F40), both using the KDE spin. I’ve been creating the wifi networks from the network settings in KDE by creating a new network of type “Wifi (shared)”, making sure the mode is set to “access point”, and using the restrict to device option to tie it to a secondary USB wifi adapter. I haven’t enabled any security on the wifi networks, since that’s always caused problems with Fedora’s wifi APs.

What happens if you configure a static IP on the client?

I just tested it, and creating a network on my desktop and joining it from my laptop does work with a static IP. Perhaps the wifi AP used to run a DHCP server but doesn’t any more?

Going to look into how hard it is to set static IPs on phones now, but it would be nice if I could have DHCP back.

It works for me, let’s check your setup:

rpm -V dnsmasq
sudo ss -lnpAinet | grep -e dnsmasq
sudo firewall-cmd --get-active-zones
sudo firewall-cmd --info-zone=nm-shared
1 Like

Here is what I get running these commands on my desktop (laptop also gives similar results):

rpm -V dnsmasq # No response

sudo ss -lnpAinet | grep -e dnsmasq
udp   UNCONN 0      0          10.42.0.1:53         0.0.0.0:*    users:(("dnsmasq",pid=835403,fd=6))      
udp   UNCONN 0      0            0.0.0.0:67         0.0.0.0:*    users:(("dnsmasq",pid=835403,fd=4))      
tcp   LISTEN 0      32         10.42.0.1:53         0.0.0.0:*    users:(("dnsmasq",pid=835403,fd=7))

sudo firewall-cmd --get-active-zones
public (default)
  interfaces: enp4s0 wlp3s0

sudo firewall-cmd --info-zone=nm-shared
nm-shared
  target: ACCEPT
  ingress-priority: 0
  egress-priority: 0
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: dhcp dns ssh
  ports: 
  protocols: icmp ipv6-icmp
  forward: no
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
        rule priority="32767" reject

Change the firewall zone for your AP connection:

sudo nmcli connection show
sudo nmcli connection modify AP_CON connection.zone nm-shared
sudo nmcli connection up AP_CON
1 Like

Seems to be working now, thanks! Not sure what caused that change, but I’ll add it to my setup notes…

1 Like