Setting up Dnsmasq on Kali Linux. I'm attempting to configure a MITM attack on my home network. I have a USB Wireless Adapter (Alfa) that I'm using to host the AP through hostapd. When a device connects to the SSID being broadcasted via Hostapd, they need to be assigned an IP address via Dnsmasq's DHCP server. At the moment, the AP is up and running, but devices aren't being assigned an IP address as they should.

Wlan0 is the interface that I use to connect to the internet via my Home WiFi network.

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    inet6 2601:1c2:1101:6dc:9665:9cff:fe1a:2282  prefixlen 64  scopeid 0x0<global>
    inet6 fe80::9665:9cff:fe1a:2282  prefixlen 64  scopeid 0x20<link>
    ether 94:65:9c:1a:22:82  txqueuelen 1000  (Ethernet)
    RX packets 11280  bytes 5273931 (5.0 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 8929  bytes 1481821 (1.4 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Wlan1 is the interface that my Alfa is connected to, and I've assigned it the following IP address.

wlan1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    ether 00:c0:ca:84:74:ff  txqueuelen 1000  (Ethernet)
    RX packets 184  bytes 30160 (29.4 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 207  bytes 35343 (34.5 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Here is my dnsmasq.conf file configurations.


And finally, my hostapd.conf file.


The wireless AP is working as it should, but something isn't working correctly to assign the IP addresses via DHCP. The following is the output that I receive when I start my DHCP server;

dnsmasq -C /etc/dnsmasq.conf -d
dnsmasq: started, version 2.75 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6     no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq-dhcp: DHCP, IP range --, lease time 12h
dnsmasq: using nameserver
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver
dnsmasq: using nameserver
dnsmasq: using nameserver
dnsmasq: using nameserver 2001:558:feed::1#53
dnsmasq: using nameserver 2001:558:feed::2#53
dnsmasq: read /etc/hosts - 5 addresses

I know that I'm getting the Discover requests when devices connect, because I can see the requests come across in Ettercap. Any suggestions on how to move forward from here would be appreciated.

  • Have you got the answer? can you connect anyother device to that AP?
    – vishnu m c
    Oct 19, 2020 at 10:47

1 Answer 1


Might be a firewall issue, you need to assign your network interfaces to zones, and enable DNS service where needed. You could try to stop your firewall at all, for example with: systemctl stop firewalld

If this will help, then restart firewall, perform necessary steps (depends on your linux distro) and restart.

  • This was it, for me at least. Past me was trying desperately to screw over present me using ufw.
    – Brannon
    Jul 19, 2018 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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