OpenVPN and Dnsmasq - Startup Order

I have a problem with my OpenVPN and Dnsmasq configuration running on a Ubuntu 11.04 machine. The problem is that Dnsmasq is set to only listen on my "lo" and "tun0" interfaces and uses "bind-interfaces". But, the problem is that Dnsmasq starts before OpenVPN does, so Dnsmasq fails to start stating that tun0 does not exist.

How do I go about changing the order in which Ubuntu starts the services? I need it such that OpenVPN starts, then Dnsmasq starts.

Thanks in advance!

1 Reply

check the init scripts, are openvpn and dnsmasq in /etc/init/ or /etc/init.d/

If in /etc/init/ edit the dns mask to start on tun0, if in init.d use update-rc.d defaults SS KK where SS is higher than openvpn's init.d and KK is lower (see the ubuntu man page for more details)


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct