0

I use kali-rolling on a virutal machine and I try to set up a fake access point using airbase-ng, but my devices won't connect to it whatsoever. My steps are:

I put my wirless adapter in monitor mode with airmon-ng and then run airbase-ng to clone my original AP, then I set up the configuration for the dhcp server in /etc/dhcp/dhcpd.conf as follows:

authoritative;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0
{
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 8.8.8.8;
option routers 192.168.1.1;
range 192.168.1.10 192.168.1.100;
}

Interfaces in /etc/default/isc-dhcp-server:

INTERFACESv4="at0"
INTERFACESv6=""

I then fire up the interface at0:

ifconfig at0 up
ifconfig at0 192.168.2.1 netmask 255.255.255.0
route add default gw 192.168.1.1 at0

And to give my clients network access I set up iptables to forward traffic sent to my fake AP to the interface eth0 which is bridged to the ethernet interface of my host machine.

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD -j ACCEPT --in-interface at0
echo 1 > /proc/sys/net/ipv4/ip_forward

After that, I try to connect to this AP from any device, and none is able to connect to it, just says "Obtaining IP address" and that the AP is saved and then nothing. Could someone help me figure out what is going wrong?

  • I solved it and the problem was airmon-ng. I tried not putting my wireless card in monitor mode and then it worked just fine. – muhzi Feb 4 '18 at 18:38
-1

Yes, work on switching from monitor to managed mode:

  1. Stop your AP
  2. Type sudo airmon-ng stop wlan0mon
  3. Start it again
  • Hey Muhammad, thanks for your contribution. It's important to format your posts properly here. For example, use the preformatted text feature to post code/commands, and use numbered lists to indicate a sequence of steps. Thanks, and enjoy your stay! – user171922 Mar 28 '18 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.