Adding IP Addresses to Your Linux Server (Traditional)
WARNING: We have multiple configuration methods for our servers' networking. To make sure you use the correct procedure when configuring additional IPs on your server, please see Adding IP Addresses to Your Dedicated Server.
Some of the information in this article is advanced material we make available as a courtesy. Please be advised that you are responsible for properly following the procedures below. Customer Support cannot assist with these topics.
When you receive additional IPs for your server, you have to configure your server to accept requests from them. The process to add IP addresses to your server depends on your control panel or operating system.
NOTE: We automatically configure additional IP addresses for Virtual Private Servers (VPS).
Parallels Plesk Panel 9
- Log in to Plesk as admin.
- Click IP Addresses.
- From the Tools section, click Add IP Address.
- In the IP address and subnet mask field, enter the IP address you want to add followed by
/255.255.255.0
. For example, if the new IP is "192.168.0.1" you would enter "192.168.0.1/255.255.255.0". - From the IP address distributed as menu, select Shared.
- Click OK.
- If you use Client accounts, you must add the new IP to the client's IP pool before they can use it for their domains.
Parallels Small Business Panel
- Log in to the Parallels Small Business Panel as admin.
- Go to the Settings tab.
- Click Advanced Settings.
- Click IP Addresses.
- From the Tools section, click IP Address.
- In the IP address and subnet mask field, enter the IP address you are adding followed by
/255.255.255.0
. For example, if the new IP is "192.168.0.1" you would type192.168.0.1/255.255.255.0
. - From the IP address distributed as menu, select Shared.
- Click OK.
cPanel
- Log in to cPanel Web Host Manager (WHM) as root.
- Click IP Functions.
- Click Rebuild the IP Address Pool.
- Click Proceed.
- Log in to cPanel Web Host Manager (WHM) as root.
- Click IP Functions.
- Click Add a New IP Address.
- In the Ips to add field, enter the new IP address, ensure the subnet mask is set to 255.255.255.0, and then click Submit.
Fedora/CentOS/Redhat with No Control Panel and Simple Control Panel
- Connect to your server via SSH (more info).
- Switch to the root user (more info).
- Run cd /etc/sysconfig/network-scripts/to switch to the folder where the network configuration scripts are located.
- Run ls ifcfg*to view the current network adapters.
Your server's primary IP displays as "ifcfg-eth0" and "ifcfg-lo" and additional IPs display as "ifcfg-eth0:0", "ifcfg-eth0:1", etc. - Run
cp ifcfg-eth0 ifcfg-eth0:Xwhere
X
is two digits less than the number of IPs the server currently will have after adding the new IP. For example, to add the server's third IP address, runcp ifcfg-eth0 ifcfg-eth0:1
. - Run vi ifcfg-eth0:Xwhere
X
is the same value as the previous step, to edit the configuration file. - Change the "IPADDR" value to the new IP address and the "DEVICE" value to
eth0:X
whereX
is the value from the previous steps. - Save the file and exit the editor.
- Run /etc/init.d/network restartto restart the network service so that it recognizes the new IP.
Ubuntu with No Control Panel
- Connect to your server via SSH (more info).
- Switch to the root user (more info).
- Run vi /etc/network/interfacesto edit the network configuration file.
Your server's primary IP displays as "eth0" and additional IPs display as "eth0:0", "eth0:1", etc. - Review the listing for "eth0" to determine the netmask and gateway IP for your server.
- Add the following to the bottom of this file, replacing the fields in brackets with the appropriate values:
auto [interface name]For example:
iface [interface name] inet static
address [IP address]
netmask [netmask]
gateway [gateway IP]
auto eth0:0
iface eth0:0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.254
- Save the file and exit the editor.
- Run /etc/init.d/networking restartto restart the network service so that it recognizes the new IP.