In my previous article on the subject, I showed you how to configure multiple default routes in Ubuntu by using the /etc/network/interfaces file. Well… that’s gone now. In newer versions of Ubuntu (I’m using 18.04 LTS) the interfaces file and the ifup/ifdown scripts have been replaced with the new and shiny Netplan! The bad news is my previous method won’t work any more. So here’s how you do it with Netplan.
Your workstation/server has both a network connection to the local network with internet access, and a public IP address (or a second, different LAN/WAN/DMZ) on a separate interface. You’d like to run some services, perhaps the Apache web server, and serve them via the public IP address you have directly on your NIC, but still use the LAN connection for everything else. Or maybe you just want to be able to ssh directly to your workstation from home, without forwarding a port on the main firewall. Whatever you want to serve on the public IP address, this is how you can do it.
After banging my head on my desk for a couple of days trying to figure out how to get two OpenLDAP servers to mirror each other, I decided to create this post to detail how I got it working.
None of the tutorials I found had it quite right. Let’s get right into it.