2

So what I did was, I installed dnsmasq using the command

apt-get install dnsmasq

Now, what happens is

root@kali:~# dnsmasq
bash: dnsmasq: command not found

root@kali:~# /etc/init.d/dnsmasq start
root@kali:~# 

root@kali:~# service dnsmasq start
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.

So, I typed

root@kali:~# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-10-30 01:59:14 IST; 52s ago
  Process: 6132 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=203/EXEC)

Oct 30 01:59:14 kali systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Oct 30 01:59:14 kali systemd[6132]: dnsmasq.service: Failed to execute command: No such file or directory
Oct 30 01:59:14 kali systemd[6132]: dnsmasq.service: Failed at step EXEC spawning /usr/sbin/dnsmasq: No such file or directory
Oct 30 01:59:14 kali systemd[1]: dnsmasq.service: Control process exited, code=exited, status=203/EXEC
Oct 30 01:59:14 kali systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Oct 30 01:59:14 kali systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.

Please help.

DeshBhakt
  • 817

1 Answers1

3

The solution is to apt install dnsmasq-base and not to apt install dnsmasq.

Tested on Ubuntu 20.04.

See other posts on the differences between dnsmasq-base and dnsmasq, for example:

  1. https://help.ubuntu.com/community/Dnsmasq (first section, "Note that...")
  2. https://unix.stackexchange.com/questions/304050/how-to-avoid-conflicts-between-dnsmasq-and-systemd-resolved
  3. Ubuntu 18.04: Disable dnsmasq-base and enable full dnsmasq