My hosting provider unfortunately requires the use of static routes for network configuration (gateway is on a different subnet than the host IP). For that purpose I added the following lines to the network configuration file (/etc/network/interfaces):
post-up route add -host 172.31.1.1 dev ens3 && route add default gw 172.31.1.1
To unlock an encrypted root drive with cryptsetup I install dropbear, so that I can SSH into a busybox to provide the encryption password. I haven't found a way, however, to add static routes in the initramfs configuration file. Does anyone have an idea how this could be accomplished? The server in question is running Ubuntu 16.04.