Configure Failover IP in Ubuntu 18.04 OVH VPS

Default /etc/network/interfaces in Ubuntu 18.04 in OVH VPS look like following. Click here for Ubuntu 20.04 instructions.

First install

Configure Main IP

use “ip a” command to find out interface name and IP of the VPS

In this case,

IP = 51.77.149.182
Interface Name = ens3

Use “route -n” command to find out gateway.

GATEWAY = 51.77.148.1

Edit /etc/network/interfaces

Add following

In the above, replace INTERFACE_NAME, SEVER_MAIN_IP and GATEWAY_IP.

For this server, i added.

Now reboot the server.

Once server is back online, you can configure failover IPS.

Configure Failover IP

Use following script to generate your config, add in end of /etc/network/inferfaces file

php script to generate ip config

Once configured, you need to reboot the servr.

Verify IP is up with fping command.

fping
/etc/inetnet/interfaces

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *