View Full Version : How to add IPs at once?
Arthur
02-14-2004, 08:11 AM
Hello,
I need to add over thirty IPs to my server. Is there a easy way to do this except use DA IP Manager?
DirectAdmin Support
02-14-2004, 01:05 PM
Hello,
There isn't a quick add tool at this time... if you are farmiliar with scripting, you could try:
#!/bin/sh
#this will add IP's 1.2.3.4 - 1.2.3.10
IP_PREFIX=1.2.3.
IP_START=4
IP_END=10
for (( i=$IP_START ; i <= $IP_END ; i++)) ; do
{
IP=${IP_PREFIX}${i}
echo "$IP" >> /usr/local/directadmin/data/admin/ip.list
FILE=/usr/local/directadmin/data/admin/ips/$IP
echo "gateway=" > $FILE
echo "netmask=255.255.255.0" >> $FILE
echo "reseller=" >> $FILE
echo "status=free" >> $FILE
echo "value=" >> $FILE
}
done
exit 0;
Then run "service startips start" after you've run that script so that they'll be loaded into the network device.
John
Arthur
02-15-2004, 08:22 AM
The script works very fine! :)
Thank you so much!
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.