I have a bit of a convoluted network setup, with an openvpn host internally that I route traffic through for vpn clients, separate from the default gateway that sits at the edge. I have ISC's dhcpd set up to push the route for that out to clients, but udhcpc on Turnkey doesn't seem to honor the option.

The general structure is this:

Main subnet:, with 10.0.2.x for statically defined clients and 10.0.3.x for dynamic clients. is the gateway, & 5 are dhcp, & 7 are dns, and is the openvpn host.

The VPN host internally has, the vpn network is, and all vpn clients get routed out to the network via

All of my clients get pushed a route for via as well as their default gateway via On everything that actually uses that configuration, routing back and forth to the vpn clients works without any issues.

Some clients (Ubuntu primarily) ignore the 'routers' dhcp option when option 121 (classless static route) is set, so I'm actually pushing the default route twice, and Microsoft clients require their own dhcp option for pushing routes (249), so that's set as well (and appears to work without issue for them).

Turnkey, on the other hand (at least the fileserver package) ignores both options 121 and 249, but at least still accepts the routers option to set the default gateway.

Aside from setting the route statically on the fileserver, is there any way to get udhcpc to accept option 121 and configure the routes DHCP has already told it to use?


(edit: I should note, the turnkey fileserver host's a VM, not container, on top of proxmox, and pulls the rest of its network config just fine from DHCP, it only seems to ignore the provided routes)

Jeremy Davis's picture

First up, it's worth noting that I don't know much about DHCP. So I'm not sure how much help I'm going to be... Having said that, I know TurnKey pretty well and am pretty handy with Debian (the base of TurnKey under the hood).

It's well worth noting that by default TurnKey uses the 'udhcpc' package to provide DHCP client services. udhcpc is a super lightweight, minimalist DHCP client. Actually, it's not a DHCP client in and of itself, but leverages the built-in busybox DHCP client.

So my guess (and it's only a guess...) is that if you replaced udhcpc with a more "full featured" DHCP client, that it should "just work". After a quick search, there are 2 packages in the Debian repos which I think should do the job, 'dhcpcd' (package name 'dhcpcd5') and 'isc-dhcp-client'. More on those below (in no particular order).

If you wish to try one of these other packages, then I suggest first removing the udhcpc package. Do that like this:

apt remove udhcpc

One possibility is dhcpcd. I can't vouch for it and have never used it, but I suspect that it might do the trick?! The Debian package is called 'dhcpcd5' (despite the fact that it provides dhcpcd v6.10.1). So you can install it like this:

apt update
apt install dhcpd5

Another possibility is the ISC dhcp-client. The Debian package is (perhaps) predictably called 'isc-dhcp-client'. AFAIK, ISC provide the "reference" implementation of DHCP, so I'd be surprised if it didn't support the "advanced" features you are after. As you might expect, it can be installed on TurnKey like this:

apt update
apt install isc-dhcp-client

I hope my suggestions head you in the right direction and you can get your network working as desired. It'd be great to hear how you go! :)

Add new comment