protected function getIp($config)
    {
        $remoteAddr = $_SERVER['REMOTE_ADDR'];
        if (filter_var($remoteAddr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
            $netmask = (isset($config["netmask_IPv4"]))
                ? $config["netmask_IPv4"] : self::DEFAULT_NETMASK_IPV4;
        } else {
            $netmask = (isset($config["netmask_IPv6"]))
                ? $config["netmask_IPv6"] : self::DEFAULT_NETMASK_IPV6;
        }

        $ipSubnet = $this->getSubnet($remoteAddr, $netmask);

        return $ipSubnet;
    }