# Dnsmasq restart hangs

**URL:** <https://discourse.pi-hole.net/t/dnsmasq-restart-hangs/2821>\
**Category:** Help\
**Created:** [April 30, 2017, 3:57pm UTC](https://discourse.pi-hole.net/t/dnsmasq-restart-hangs/2821 "2017-04-30T15:57:10Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![fred.c](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/f/e99b99/32.png) [@fred.c](https://discourse.pi-hole.net/u/fred.c)\
**Post date:** [May 15, 2019, 3:28pm UTC](https://discourse.pi-hole.net/t/dnsmasq-restart-hangs/2821/24 "2019-05-15T15:28:06Z")

</div>

I was having a very similar issue (or the same?) to the one described in here.

In my case I am attempting to install pi-hole on a fresh streisand installation; I must differ with the recommended steps from the official documentation on how to set pi-hole with a vpn as choosing the interface ip does not work; instead i choose one of the vpn interfaces as the main one (i've tried wg0 and tun0) but with the public ip address and gateway (as per the defaults) - it works like a charm but on reboot the dnsmasq service fails to start and the vpn interfaces would be down (although I could manually up them);

The problem is that dnsmasq installed by Streisand enters in conflict with the custom dnsmasq shipped with pihole on pihole-FTL.service, as described [here](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630/2)

```auto
sudo systemctl stop dnsmasq.service
sudo systemctl restart pihole-FTL.service

```

running this commands brings all vpn interfaces back up and everything is working with pi-hole filtering on all interfaces and as closed-relay. So I've tried disabling the default dnsmasq from boot but I am faced with errors:

> root@pihole:~# systemctl disable dnsmasq  
> Synchronizing state of dnsmasq.service with SysV init with /lib/systemd/systemd-sysv-install...  
> Executing /lib/systemd/systemd-sysv-install disable dnsmasq  
> insserv: warning: current start runlevel(s) (empty) of script `dnsmasq' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dnsmasq' overrides LSB defaults (0 1 6).  
> insserv: warning: current start runlevel(s) (empty) of script `dnsmasq' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dnsmasq' overrides LSB defaults (0 1 6).

> root@pihole:~# update-rc.d dnsmasq disable  
> insserv: warning: current start runlevel(s) (empty) of script `dnsmasq' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dnsmasq' overrides LSB defaults (0 1 6).

My solutions was to remove the systemd and init.d scripts for dnsmasq (I'm hoping there is a better suggestion on how to deal with it?)

```auto
rm /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/dnsmasq.service
rm /etc/init.d/dnsmasq
rm /etc/systemd/system/dnsmasq.service.d

```

Everything seems to work correctly now and the server is not working as an open-relay.

---

_[View the full topic](https://discourse.pi-hole.net/t/dnsmasq-restart-hangs/2821)._
