I use kali rolling and I try to set up a fake access point using airbase-ng. First I run airbase then I set up my dhcp server in /etc/dhcp/dhcpd.conf as follows:
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.199;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option domain-name-servers 8.8.8.8;
}
the contents of /etc/default/isc-dhcp-server :
INTERFACESv4="at0"
INTERFACESv6=""
then I use those commands to set up the interface at0 and allow for network access:
ifconfig at0 up
ifconfig at0 192.168.2.1 netmask 255.255.255.0
service isc-dhcp-server restart
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
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
But when I connect with any device to this AP it doesn't connect at all. Can someone help with what is causing this problem?
Be the First to Respond
Share Your Thoughts