def get_client_ip(request):
    """Retrieve the real IP address of the client."""
    if 'HTTP_X_REAL_IP' in request.META:
        return request.META.get('HTTP_X_REAL_IP')
    elif 'REMOTE_ADDR' in request.META:
        return request.META.get('REMOTE_ADDR')
    else:
        return '0.0.0.0'
