How to configure a failover ip for your server’s Virtual Machine running Ubuntu 18,19 or 20

Here’s what you need to configure a failover ip in your server’s Virtual machine running Ubuntu >= 18.
  • You need to by a server (mine is hosted by online.net – aka scaleway)
  • Then you need to buy a fail over IP from them (from your servers back office
  • Your virtual machine (mine is powered by Virtualbox) needs to be configured in bridge mode (NAT won’t work) and your virtual network card must use a special MAC ADDRESS (see Img-1 below)
  • You must know what’s your server’s gateway (in this guide mine 62.210.0.1)
Let’s get started by getting a MAC address for our server’s and set that same MAC address in our VM’s Virtual Network configuration.
Img-1. Configuring the mac address
1) Create a backup of your netplan configuration file $ sudo cp /etc/netplan/00-installer-config.yaml /etc/netplan/00-installer-config.yaml-bak 2) Determine your network interface ID (mine is enp0s3) $ ifconfig -a
3) Edit your netplan as follows $ vim /etc/netplan/00-installer-config.yaml
Make sure your netplan file looks like mine but make the necessary changes as indicated in the above picture. As you can see, I show you that I assigned my failover IP to one of my servers (here presented in a blured green) 4) Apply your changes using the command that follows $ sudo netplan apply 5) Finally, test your configuration 5.1) Check that you can reach external servers $ ping google.pt 5.2) Check that your server is reachable $ ping YOUR_FAILOVER_IP If 5.1 and 5.2 worked, then your configuration worked. Hope it helps. Leave a thumbs up in the comments 🙂 References: Ubuntu >= 18 https://documentation.online.net/en/dedicated-server/network/network-configuration-with-netplan
Ubuntu < 18 https://documentation.online.net/en/dedicated-server/network/ip-failover/debian-ubuntu
SubMasks https://askubuntu.com/a/972964
SubMasks https://www.calculator.net/ip-subnet-calculator.html?cclass=any&csubnet=32&cip=92.150.14.188&ctype=ipv4&printit=0&x=51&y=18

Leave a Reply

Close Menu