Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
User Journal

Journal chill's Journal: Systemd and Services Dependent on DHCP

I'm writing this down because it was driving me crazy, but I just figured it out.

I have a small system running Armbian, that I use as a DNS-Over-TLS proxy for my home network, using Stubby. This works by acting as a DNS stub resolver that then loops the DNS requests to encrypted DNS servers. This hides my DNS queries from my ISP -- the evil that is Comcast.

My problem has been that the service, managed by Systemd, fails to load on boot but will load if I log in and start it by hand. The error was the service couldn't bind to my chosen IP address, as it was starting up before DHCP finished setting things up.

The standard instructions for getting a service to wait is to use the network-online.target instead of the network.target.

What everything I researched failed to mention was this only works if systemd is handling the network interface and DHCP. If something else -- Network Manager, /etc/network/interfaces, etc. -- is handling your network interface, it just won't work.

Yes, in hindsight, that seems sort of obvious. But, it wasn't explicitly mentioned anywhere and Debian insists on providing half-a-dozen ways to manage your network interfaces, which is why I'm writing this down.

This discussion has been archived. No new comments can be posted.

Systemd and Services Dependent on DHCP

Comments Filter:

Never call a man a fool. Borrow from him.

Working...