Score:0

Hostapd access point + isc-dhcp-server disconnects client after 2 seconds of authenticating

fi flag

I have Ubuntu 22.04 with a Wi-Fi access point Hostapd + isc-dhcp-server and every time I connect a client it automatically disconnects after 2 seconds.

Here are the contents of /etc/hostapd/hostapd.conf:

interface=wlp3s0
hw_mode=g
channel=10
ieee80211d=1
country_code=FR
ieee80211n=1
wmm_enabled=1
ssid=somename
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=somepassword

And of /etc/dhcp/dhcpd.conf:

option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.10.10.0 netmask 255.255.255.0 {
  interface wlp3s0;
  range 10.10.10.100 10.10.10.125;
  option routers 192.168.1.1;
  option subnet-mask 255.255.255.0;
}

Output of tail -f /var/log/syslog (dummyuser):

Jan  9 00:19:15 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: authenticated
Jan  9 00:19:15 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: associated (aid 1)
Jan  9 00:19:15 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 RADIUS: starting accounting session 9B7BD58F3E6D8283
Jan  9 00:19:15 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 WPA: pairwise key handshake completed (RSN)
Jan  9 00:19:15 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:16 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:16 user-Default-string dhcpd[69049]: reuse_lease: lease age 1 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:16 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:16 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:20 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: authenticated
Jan  9 00:19:20 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: associated (aid 1)
Jan  9 00:19:20 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 RADIUS: starting accounting session 73F73824FEAE4501
Jan  9 00:19:20 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 WPA: pairwise key handshake completed (RSN)
Jan  9 00:19:20 user-Default-string dhcpd[69049]: reuse_lease: lease age 5 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:20 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:20 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:20 user-Default-string dhcpd[69049]: reuse_lease: lease age 5 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:20 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:20 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:21 user-Default-string wpa_supplicant[772]: wlp3s0: CTRL-EVENT-SCAN-FAILED ret=-95
Jan  9 00:19:25 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: authenticated
Jan  9 00:19:25 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: associated (aid 1)
Jan  9 00:19:25 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 RADIUS: starting accounting session 316751CEC6B74E1B
Jan  9 00:19:25 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 WPA: pairwise key handshake completed (RSN)
Jan  9 00:19:25 user-Default-string dhcpd[69049]: reuse_lease: lease age 10 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:25 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:25 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:25 user-Default-string dhcpd[69049]: reuse_lease: lease age 10 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:25 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:25 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:30 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: did not acknowledge authentication response
Jan  9 00:19:42 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: authenticated
Jan  9 00:19:42 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: associated (aid 1)
Jan  9 00:19:42 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 RADIUS: starting accounting session 0CAAFD57300A938A
Jan  9 00:19:42 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 WPA: pairwise key handshake completed (RSN)
Jan  9 00:19:42 user-Default-string dhcpd[69049]: reuse_lease: lease age 27 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:42 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:42 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:42 user-Default-string dhcpd[69049]: reuse_lease: lease age 27 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:42 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:42 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:47 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: authenticated
Jan  9 00:19:47 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 IEEE 802.11: associated (aid 1)
Jan  9 00:19:47 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 RADIUS: starting accounting session 8835AC9D55825E6F
Jan  9 00:19:47 user-Default-string hostapd: wlp3s0: STA b2:8a:00:11:22:33 WPA: pairwise key handshake completed (RSN)
Jan  9 00:19:47 user-Default-string dhcpd[69049]: reuse_lease: lease age 32 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:47 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:47 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:47 user-Default-string dhcpd[69049]: reuse_lease: lease age 32 (secs) under 25% threshold, reply with unaltered, existing lease for 10.10.10.102
Jan  9 00:19:47 user-Default-string dhcpd[69049]: DHCPREQUEST for 10.10.10.102 from b2:8a:00:11:22:33 (OnePlus) via wlp3s0
Jan  9 00:19:47 user-Default-string dhcpd[69049]: DHCPACK on 10.10.10.102 to b2:8a:00:11:22:33 (OnePlus) via wlp3s0

The following lines also appear (always) in the log:

systemd[776074]: snap.snapd-desktop-integration.snapd-desktop-integration.service: Scheduled restart job, restart counter is at 6.
systemd[776074]: Stopped Service for snap application snapd-desktop-integration.snapd-desktop-integration.
systemd[776074]: Started Service for snap application snapd-desktop-integration.snapd-desktop-integration.
snapd-desktop-i[776798]: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
dummyuser avatar
uy flag
Welcome, please check the log (`tail -f /var/log/syslog`) while restarting the daemons and connecting
Raúl avatar
fi flag
Done and posted.
dummyuser avatar
uy flag
two comments: first please disable the wpa_supplicant service. second: the client is properly connecting, gets an IP but there are no messeges about disconnecting, before reconnecting. unknown Reason.
Raúl avatar
fi flag
I don't understand why I have to disable Wpa_supplicant. Is this service not necessary to establish the WiFi connection? If I disable Wpa_supplicant I still have the same problem. Is there a way to see more details in the log or another way to find the problem?
Score:2
ca flag

Problem solved.

I have changed the gateway to one within the same range of the DHCP server and the clients no longer disconnect.

Answer moved here from OP's question.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.