Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 22279  / 3 Years ago, sat, may 1, 2021, 10:33:30

Where is dnsmasq started and configured during the system startup under Ubuntu Lucid server?



I have not been able to find any startup script or service that actually starts and sets up dnsmasq.



I would like to get rid of the dhcp service, or prevent it from starting altogether.


More From » 10.04

 Answers
4

The dnsmasq startup script is /etc/init.d/dnsmasq. It's called by symlinks from the /etc/rcX.d/ directories, for example: /etc/rc2.d/S15dnsmasq



If you don't want it to start, you can remove the package with sudo apt-get remove dnsmasq. Or you can leave it installed and just remove all symlinks from the /etc/rcX.d/ directories with the command: update-rc.d -f dnsmasq remove.



You can also edit /etc/default/dnsmasq and change "ENABLED=1" to "ENABLED=0" which will also tell it not to run in daemon mode.



Lastly, you can disable just the DHCP function by editing /etc/dnsmasq.conf and adding lines for your interfaces that you don't want DHCP on by adding, for example: "no-dhcp-interface=eth0". You might do this if you still wanted to use the DNS functionality.



Note: sometimes dnsmasq is installed as dnsmasq-base instead of dnsmasq in order to work with other packages such as NetworkManager (when sharing an internet connection) or Libvirt (for giving addresses to virtual machines).


[#43325] Monday, May 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gliroopy

Total Points: 290
Total Questions: 115
Total Answers: 114

Location: Egypt
Member since Tue, May 3, 2022
2 Years ago
;