0

I just deployed fresh Ubuntu 18.04 on Azure. Installed dnsmasq and noticed that it is missing service files completely. Daemon itself runs fine but I would like it to start on boot. How could I achieve this?

7
  • sudo apt install dnsmasq worked for me in ubuntu server 18.04. After the installation you can run the following command : sudo systemctl enable dnsmasq . May 26, 2020 at 15:10
  • It does not work for me some reason. It does not provide the files necessary for service.
    – kamsiinov
    May 27, 2020 at 8:30
  • The desired service file should be in the dnsmasq package as I said in the answer. So if in your case it's not there , maybe it's not installed correctly or in a very unlikely scenario , it maybe a fault within the ubuntu repo. May 27, 2020 at 9:55
  • Another solution for you is to clone to the [dnsmasq git repo](git://thekelleys.org.uk/dnsmasq.git) and compile and install it. It surely contains the missing "dnsmasq.service" file . May 27, 2020 at 10:01
  • 1
    I know how I managed to incorrectly install this. I opened my firewall only to azure.archive.ubuntu.com which is not enough. Opening the firewall to *.ubuntu fixed this problem.
    – kamsiinov
    May 27, 2020 at 10:43

1 Answer 1

0

Install dnsmasq via

sudo apt install dnsmasq

at it contains the required service file :

$ dpkg-query -L dnsmasq | grep service -i    
/lib/systemd/system/dnsmasq.service

So the only thing you need to do is to enable the service to be executed during bootup.

 sudo systemctl enable dnsmasq

And it worked for me in ubuntu server 18.04.

Have fun using ubuntu ;)

2
  • that is the thing. I do not have that dnsmasq.service file at all. If I run "systemctl enable dnsmasq" I get error message stating that this service does not exist.
    – kamsiinov
    May 26, 2020 at 16:48
  • @kamsiinov The problem was that you had to install dnsmasq not dnsmasq-base. May 27, 2020 at 10:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .