def is_ufshost_error(conn, cloud_type):
    """
    Returns true if ufshost setting is not resolvable externally

    :type conn: boto.connection.AWSAuthConnection
    :param conn: a connection object which we get host from

    :type cloud_type: string
    :param cloud_type: usually 'aws' or 'euca'
    """
    ufshost = conn.host if cloud_type == 'euca' else ''
    return ufshost in ['localhost', '127.0.0.1']