Skip to main content

Configure a Failover IP

This guide explains how to configure a Failover IP on your Linux VPS.

Prerequisites

  • SSH root or sudo access
  • A Failover IP assigned to your VPS
  • Debian/Ubuntu system

Configuration

  1. Disable automatic network configuration:

    sudo nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

    Add this line:

    network: {config: disabled}
  2. Configure the virtual interface:

    sudo nano /etc/network/interfaces.d/50-cloud-init

    Add these lines:

    # Failover IP interface
    auto eth0:1
    iface eth0:1 inet static
    address YOUR_FAILOVER_IP
    netmask 255.255.255.255
  3. Restart the network service:

    sudo systemctl restart networking

Verification

  1. Verify that the IP is properly configured:

    ip addr show eth0:1
  2. Test connectivity:

    ping -I YOUR_FAILOVER_IP 8.8.8.8

Best practices

  • Document your network configurations
  • Test the configuration before any production deployment
  • Keep a backup of configuration files
  • Configure alerts in case of connectivity loss

Troubleshooting

  • Check system logs: sudo journalctl -xe
  • Check network configuration: sudo networkctl status
  • Make sure the IP is properly assigned to your VPS
  • Verify there is no IP conflict

Important notes

  • The Failover IP must be configured with a network mask 255.255.255.255
  • Some services may require reconfiguration to use the new IP
  • Configuration may vary depending on your Linux distribution