1

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

Tim Post
  • 1,525
  • 13
  • 25
Clear.Cache
  • 89
  • 1
  • 1
  • 11

1 Answers1

1

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 :)

Tim Post
  • 1,525
  • 13
  • 25