---
title: How to configure a failover IP on FreeBSD
description: This page explains how to configure a failover IP on Debian or FreeBSD.
tags: dedibox failover-failover IP freebsd
dates:
  validation: 2025-10-28
  posted: 2021-07-29
---

This page shows you how to configure a [failover IP](/en/docs/dedibox-ip-failover/concepts/#failover-ips) on Dedibox servers running on FreeBSD.

## Before you start

To complete the following actions, you must have:

* A Dedibox account logged into the [console](https://console.online.net)
* [Created](/en/docs/dedibox/how-to/order-a-server/) a Dedibox dedicated server

## Failover IP configuration on FreeBSD

1. Connect to your server using SSH.

2. Open the network configuration file in a text editor, for example `nano`:

   ```
   nano /etc/rc.conf
   ```

3. Add the following line to the file, replace `FAILOVER_IP` with your failover IP address:

   ```
   ifconfig_em0_alias0="inet FAILOVER_IP netmask 255.255.255.255"
   ```

   Your modified configuration file should look like the following example:

   ```
   ifconfig_em0="inet IP_ADDRESS netmask 255.255.255.0"
   defaultrouter="IP_ADDRESS"
   sshd_enable="YES"
   ntpd_enable="YES"
   ntpd_sync_on_start="YES"
   syslogd_flags="-ss"
   fsck_y_enable="YES"
   ifconfig_em0_alias0="inet FAILOVER_IP netmask 255.255.255.255"
   ```

4. Save the file and exit the text editor.

5. Restart the network to activate the new IP address:

   ```
   /etc/rc.d/netif restart && /etc/rc.d/routing restart
   ```
