Hello,
Can anyone help me how to add IP address to my dedicated server ...?
Thanks
how to add IP address to dedicated server
-
- Posts: 6
- Joined: Thu Jan 22, 2015 4:20 pm
-
- Posts: 6
- Joined: Thu Jan 22, 2015 4:47 pm
Re: How to add IP address to dedicated server
For cPanel:
Add the IP Address by logging into Dedicated Server's WHM and going to
WHM > IP Functions >> Add a New IP Address
When adding multiple IP addresses, you must use the Class C CIDR format or the 191.163.0.1-254 format.
For DirectAdmin:
Add the IP Address by logging into DirectAdmin at the Admin Level and going to
Direct Admin > Admin Tools >> IP Management
For WHCP:
Go to Site Management >> Dedicated IP Addresses to request the IP Address.
For No Control Panel:
Log in as root and Add a new IP address to any Red Hat Linux-based system, such as CentOS, for example:
cd /etc/sysconfig/network-scripts
Back up your main config file:
cp ifcfg-eth0 ifcfg-eth0.bak
Then copy the config file for your new IP Address:
cp ifcfg-eth0 ifcfg-eth0:1
Then we need to edit the new config file:
nano ifcfg-eth0:1
The lines you need to change:
DEVICE="eth0
to
DEVICE="eth0:1"
Then change the
IPADDR="xxx.xxx.xxx.xxx"
to be your NEW IP address (it will have your primary IP Address listed, since you have copied the main eth config file)
Once this is done, press CTRL + X then press Y and <enter>
This is done with /sbin/ifup eth0:1
Having done this,
/sbin/ifconfig
we will see that the new interface is up and running!
For Debian-based Linux distributions such as Ubuntu,
we will have to edit /etc/network/interfaces file and have something like this:
auto eth0
auto eth0:1
iface eth0 inet static
address 191.164.1.1
netmask ...
...
iface eth0:1 inet static
addres 194.167.14.21
netmask ...
Add the IP Address by logging into Dedicated Server's WHM and going to
WHM > IP Functions >> Add a New IP Address
When adding multiple IP addresses, you must use the Class C CIDR format or the 191.163.0.1-254 format.
For DirectAdmin:
Add the IP Address by logging into DirectAdmin at the Admin Level and going to
Direct Admin > Admin Tools >> IP Management
For WHCP:
Go to Site Management >> Dedicated IP Addresses to request the IP Address.
For No Control Panel:
Log in as root and Add a new IP address to any Red Hat Linux-based system, such as CentOS, for example:
cd /etc/sysconfig/network-scripts
Back up your main config file:
cp ifcfg-eth0 ifcfg-eth0.bak
Then copy the config file for your new IP Address:
cp ifcfg-eth0 ifcfg-eth0:1
Then we need to edit the new config file:
nano ifcfg-eth0:1
The lines you need to change:
DEVICE="eth0
to
DEVICE="eth0:1"
Then change the
IPADDR="xxx.xxx.xxx.xxx"
to be your NEW IP address (it will have your primary IP Address listed, since you have copied the main eth config file)
Once this is done, press CTRL + X then press Y and <enter>
This is done with /sbin/ifup eth0:1
Having done this,
/sbin/ifconfig
we will see that the new interface is up and running!
For Debian-based Linux distributions such as Ubuntu,
we will have to edit /etc/network/interfaces file and have something like this:
auto eth0
auto eth0:1
iface eth0 inet static
address 191.164.1.1
netmask ...
...
iface eth0:1 inet static
addres 194.167.14.21
netmask ...