def is_valid_firewall_setting(f, service_exploits):
    """
    Check that a given firewall setting is valid given the list of service exploits available
    """
    if type(f) != list:
        return False
    for service in f:
        if service not in service_exploits:
            return False
    for i, x in enumerate(f):
        for j, y in enumerate(f):
            if i != j and x == y:
                return False
    return True