Issues with IP Whitelisting Middleware in Traefik Behind AWS NLB for Kafka Brokers in EKS

I'm deploying Traefik inside an AWS EKS cluster to expose Kafka brokers through an AWS Network Load Balancer (NLB). I'm also using the ipAllowList (IP Whitelist) middleware in Traefik v3.3.6 to allow traffic only from specific IPs. However, the IP whitelisting doesn't appear to be working as expected — all traffic seems allowed regardless of the IP address.

Environment Details:

  • Traefik:
    • Version: v3.3.6
    • Running inside the EKS cluster
    • Configured with IngressRouteTCP and MiddlewareTCP for IP whitelisting
  • AWS Load Balancer:
    • Type: Network Load Balancer (NLB)

Kafka:

  • Brokers running inside EKS
  • Traefik exposes Kafka via TCP

This is probably dependent on the full configuration, which you didn't share.