IPmanager

Check IP addresses

IPmanager checks whether IP addresses can really be used or not.

This check goes in two steps:

  1. Check if an IP address is physically available in the network.
  2. Check if an IP address is in the DNSBL blacklists.

An IP address is checked:

  1. Every hour with cron:

    ## check awaiting ip
    0 * * * *    /usr/local/mgr5/sbin/cron-ipmgr sbin/checkip >/dev/null 2>&1

    The cron job works for addresses with the following statuses:

    1. "Being checked" — IPs that are available now.
    2. "Blocked by DNSBL" — IPs that are present in DNSBL blacklists.
    3. "Used in network" — IPs that are already used physically in the network.
  2. Before an IP address is provisioned.

The system checks IPv4 nd IPv6 addresses per default. Add the option Option DisableIPv6Checking to the config file of the control panel (/usr/local/mgr5/etc/ipmgr.conf per default) to disable the check of IPv6. You can also add the option Option DisableIpAllocationChecking to stop checking IP addresses before they are provisioned.

Check for physical availability in the network

The system uses the script /usr/local/mgr5/sbin/ipchecker.sh per default:

#!/bin/sh

ping -c3 -q $1 > /dev/null
if [ $? -ne "0" ]; then
    echo "OK"
fi

This script receives an IP address, checks its availability with ping, and results in OK if the IP address is unavailable in the network. Any other output means that the IP address hasn't passed the check and will receive the status "Used in network".

The script used for checking is defined by the parameter IpCheckerScript of the control panel configuration file (/usr/local/mgr5/etc/ipmgr.conf per default). If you need to use a more complicated check, then you can add your own script and specify the path to it with IpCheckerScript.

Check for presence in DNSBL blacklists

If an IP address is in one of the IPmanager blacklists, it will get the status "Blocked by DNSBL". Read more in DNSBL blacklists.

Checking results

If an IP address has not passed any of the checks above, it will be added to Statistics → Problem IP. Read more in Problem addresses statistics.