• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Add a block of IPs

CruzMark

Regular Pleskian
Here's a simple (and insecure) perl script that will add a block of IPs to plesk from the command line. I accept no responsibility for its use or mis-use. Since it uses the plesk ipmanage tool, it is unlikely that you'll cause your system to implode.

#!/usr/bin/perl

# This script causes heavy load on the server and takes several minutes
# to run.

# The script assumes that the block is Class C or less.
# IP_SUBNET should be the first three octets of the IP.
# MASK should be in octet form (ex. 255.255.255.0)
#
# See (DIRECTORY)/psa/bin/ipmanage --help for more info

if (@ARGV != 5) {
print "Usage: create_ip_block.pl IP_SUBNET MASK INTERFACE TYPE CERT\n";
exit;
}

# Turn debug 'on' to test script before actually adding IPs!
# $debug = 'on';

# Change count based on the IPs you are trying to add. Settings below
# are for a class C subnet

my $start_count = 1;
my $end_count = 254;

# replace with path to your psa/bin directory. Below is for FreeBSD
my $psa_bin_path = "/usr/local/psa/bin";

my $ip_subnet = $ARGV[0];
my $mask = $ARGV[1];
my $interface = $ARGV[2];
my $type = $ARGV[3];
my $ssl = $ARGV[4];

for ($count="$start_count"; $count <= $end_count; $count++) {
$ip = "$ip_subnet" . "." . "$count";
if ($debug eq 'on') {
print "$psa_bin_path/ipmanage -c $ip -mask $mask -interface $interface -type $type -ssl_certificate $ssl\n";
} else {
`$psa_bin_path/ipmanage -c $ip -mask $mask -interface $interface -type $type -ssl_certificate $ssl`;
}
}
 
Back
Top