Adding a Public IPv4 Address to a Dedicated Server (CentOS 8)
For Dedicated Servers
This article explains how to add an additional public IPv4 address on a Dedicated Server where CentOS 8 is installed.
To configure an additional public IPv4 address in CentOS 8, please proceed as follows:
Requirements
In the Cloud Panel, you have assigned an additional public IPv4 address to your server.
You have logged on to the server as an administrator.
To check the current network configuration of your server, enter the following command:
[root@localhost ~]# nmcli connection show
The network interface will now be displayed. Example:
[root@localhost ~]# nmcli connection show
NAME UUID TYPE DEVICE
eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0To customize the network configuration of your server and use an additional public IPv4 address, enter the following command:
[root@localhost ~]# nmcli con mod NETWORK INTERFACE +ipv4.addresses "Additional IPv4 ADDRESS"
Example:
[root@localhost ~]# nmcli con mod eth0 +ipv4.addresses "123.456.789.12"
The additional public IPv4 address has now been added.Restart your server. To do this, enter the following command:
[root@localhost ~]# reboot
The SSH connection will be interrupted after the command is entered.Log on to the server again.
To check if the additional public IPv4 address has been added, type the following command:
[root@localhost ~]# ip addr
The additional public IPv4 address will now be displayed. Example:[root@3BB37B1 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether ac:1f:6b:9a:76:52 brd ff:ff:ff:ff:ff:ff
inet 82.165.190.99/32 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet 217.160.213.17/32 scope global dynamic noprefixroute eth0
valid_lft 42916sec preferred_lft 42916sec
inet6 2001:8d8:1800:419::1/128 scope global dynamic noprefixroute
valid_lft 3317sec preferred_lft 3317sec
inet6 fe80::ae1f:6bff:fe9a:7652/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether ac:1f:6b:9a:76:53 brd ff:ff:ff:ff:ff:ff