Categories

Wednesday 4 April 2012

How to configure the ip in cpanel server through back end

The Command Line Method
You can also add IPs via command line in a way that cPanel understands, which is mainly useful when doing automated server setups, or adding multiple IPs across multiple servers. To do this, you’d edit the ipaliases load file, which is /etc/ips . If you already have additional IP addresses on your server added as aliases you may already see how this file is formatted, but here’s an example:
123.456.789.123:255.255.255.0:123.456.789.255
This is a colon-delimited file with each IP address on its own line. The first field is the IP itself, the second is its subnet mask, and the third is its broadcast. You can add as many IPs as you need, putting each on its own line.  When you’re done, run the following commands:
service ipaliases reload (or service ipaliases restart)
/scripts/rebuildippool
To check whether the IPs have been added successfully, you can perform any of the following tests:
/scripts/ipusage  <~ will show the IP usage of the server
ifconfig <~ will show all IPs on the server
ping $ip <~ will ping the IP ($ip) you added to make sure it’s routing

No comments:

Post a Comment

Ad