Sample Header Ad - 728x90

hostapd disables and enables interface

1 vote
1 answer
3602 views
My hostapd, after some minutes of execution, it does this:
wlan1: INTERFACE-DISABLED
wlan1: INTERFACE-ENABLED
then, connected clients lose connection and, if i try reconnecting, it wont't connect anymore. I also tried with WPA2, but if reconnecting it says wrong password. My hostapd.conf:
interface=wlan1
driver=nl80211
ssid=the-bash-guy
hw_mode=g
channel=6
macaddr_acl=0
ignore_broadcast_ssid=0
ieee80211n=1
wme_enabled=1
My dnsmasq.conf:
interface=wlan1
dhcp-range=192.168.1.2,192.168.1.30,255.255.255.0,12h
dhcp-option=3,192.168.1.1
dhcp-option=6,192.168.1.1
server=8.8.8.8
server=8.8.4.4
log-queries
log-dhcp
listen-address=127.0.0.1
Before starting hostapd, i did these (.sh file):
echo "BEFORE MONITOR MODE\n\n"
iwconfig wlan1
ifconfig wlan1 down
iwconfig wlan1 mode monitor
ifconfig wlan1 up
echo "AFTER MONITOR MODE\n\n"
iwconfig wlan1
echo "\n\nSTART HOSTAPD!\n\n"
ifconfig wlan1 192.168.1.1 netmask 255.255.255.0
hostapd ./hostapd.conf
then:
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface wlan1 -j ACCEPT
dnsmasq -C dnsmasq.conf -d
(wlan0 is Intel Wi-Fi AX200) (wlan1 is RTL8812BU with the following driver: https://github.com/morrownr/88x2bu-20210702) OS: 5.16.0-kali7-amd64
Asked by DoggoPlayer (11 rep)
Apr 22, 2022, 09:09 AM
Last activity: Apr 29, 2025, 10:06 PM