public boolean isIpAllowed (String ip)
    {
		if (de.guruz.p300.utils.IP.isLocalhostIP(ip)) {
			return true;
		}
		
		if (de.guruz.p300.utils.IP.isOurIP(ip)) {
			return true;
		}
		
		if (isImplicitAllowOn () && m_implicitlyAllowedIps.containsKey(ip))
		{
			//D.out(ip + " implicitly allowed");
			return true;
		}

		String keys[] = null;

		keys = Configuration.instance ().getExplicitlyAllowedIps();

		// Keys can be of the forms
		// - "192.168.0.", e.g. positively matching "192.168.0.1"
		// - "192.168.0.1", matching only "192.168.0.1"
		// - "192.", matching "192.169.130.120"
		for (String current : keys) {
			if (ip.equals(current)
					|| (current.endsWith(".") && ip.startsWith(current))) {
				// System.out.println(current + " allows for ip=" + ip);
				return true;
			}
		}

		// System.out.print("Denying connection from " + ip);

		return false;
    }