17.7.2 Configuring Back-End Server Routing for Keepalived NAT-Mode Load Balancing

On each back-end real servers that you intend to use with the Keepalived load balancer, ensure that the routing table contains a default route for the virtual IP address of the load balancer's internal network interface.

For example, if the virtual IP address is, you can use the ip command to examine the routing table and to set the default route:

# ip route show dev enp0s8  proto kernel  scope link  src 
# ip route add default via dev enp0s8
# ip route show
default via dev enp0s8 dev enp0s8  proto kernel  scope link  src 

To make the default route for enp0s8 persist across reboots, create the file /etc/sysconfig/network-scripts/route-enp0s8:

# echo "default via dev enp0s8" > /etc/sysconfig/network-scripts/route-enp0s8