Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I mass delete IPs I no longer use on the server (secondary assignment, not prime subnet)

For example I have a specific /27 I want to remove in one shot, instead of one IP at a time via whm delete IPs function

I'm using Cpanel/WHM with Centos 5x

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can just edit /etc/ips and rebuild the IP address pool in WHM after you are done.

A simple operation might be:

cat /etc/ips | sed '/^192.168.2/d' > /etc/ips.new

.. verify it

mv /etc/ips.new /etc/ips

Not sure on what you have in there in the neighborhood of the subnet you want to remove, so you will probably want to make the regex a bit more precise :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.