def getGatewayIntf(ch):
    """
        Looks at the key:networkInterfaces for the chute and determines what the gateway should be
        including the IP address and the internal interface name.

        Returns:
            A tuple (gatewayIP, gatewayInterface)
            None if networkInterfaces doesn't exist or there is an error
    """
    intfs = ch.getCache('networkInterfaces')
    if(not intfs):
        return (None, None)
    
    l = []
    for i in intfs:
        if(i['netType'] == 'wan'):
            return (i['externalIpaddr'], i['internalIntf'])

    return (None, None)