How to Add New Failover IP to Ubuntu 18.04 with Aapanel

RLitana
2 min readSep 24, 2020

Since aapanel is made for centos, a lot of apps on its app store not support for ubuntu. and one of it is to add another IP to the server

Here is how :

for this example, i use dedicated server from oneprovider, so go to server panel and find this : netmask and gateway from ip manager section on the top left and write it down.

the next step is go to /etc/netplan. you can use file manager from aapanel, and open 01-netcfg.yaml.

Edit the file, and here is example of the default config

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp1s0f0:
dhcp4: yes

that file need to be replace with this

network:
version: 2
renderer: networkd
ethernets:
enp1s0f0:
dhcp4: no
addresses: [aaa.aaa.aaa.aaa/24, bbb.bbb.bbb.bbb/24]
gateway4: ccc.ccc.ccc.ccc
routes:
— to: ccc.ccc.ccc.ccc/32
via: bbb.bbb.bbb.bbb
scope: link

to check enp1s0f0, you can find it with ip a from terminal

aaa.aaa.aaa.aaa is your current public ip

bbb.bbb.bbb.bbb is your new ip you want to attach to the server

ccc.ccc.ccc.ccc is your gateway from ip manager

after all the setup done, sudo netplan apply from terminal

to verify the config press again ip a or ip addr show dev enp1s0f0

if your new ip is there, you re good to go

--

--