0

I'm trying to deploy an SMTP service into Kubernetes (EKS), and I'm having trouble with ingress. I'd like not to have to deploy SMTP, but I don't have that option at the moment. Our Kubernetes cluster is using ingress nginx controller, and the docs point to a way to expose TCP connection. I have TCP exposed on the controller via a configmap like this:

apiVersion: v1
kind: ConfigMap
metadata:
  name: ingress-nginx-tcp
  namespace: ingress-nginx
data:
  '25': some-namespace/smtp:25

The receiving service is listening on port 25. I can verify that the k8s part is working. I've used port forwarding to forward it locally and verified with telnet that it's working. I can also access the SMTP service with telnet from a host in the VPC. I just can not access it from the NLB. I've tried 2 different setups:

  1. the ingress-nginx controller nlb.
  2. provisioning a separate nlb that points to the endpoint IP of the service. The TGs are healthy, and I can access the service from a host in the same vpc, that's not in the cluster.

I've verified a least a few dozen times that the security groups are open to all traffic on port 25.

Does anyone have any insights on how to access to expose the service through the NLB?

zquintana
  • 371
  • 2
  • 5
  • 13
  • Check if this helps you. https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/ – Azize Feb 11 '23 at 01:02
  • can you share the service and nginx port config ? with this configmap it would be hard to answer or guess also even – Harsh Manvar Feb 11 '23 at 16:03
  • @Azize that was the key. Thank you much. I didn't realize AWS blocks those ports by default. – zquintana Feb 25 '23 at 02:57

1 Answers1

0

AWS applies throttle into port 25 (SMTP) by default on each account. It is an old unprotected service that can be abused.

It is recommended to use STARTTLS or SMTPS instead.

If you can't change away from port 25, you need to request AWS to remove the throttling on your AWS account.

Use the link below to learn more.

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/

Azize
  • 4,006
  • 2
  • 22
  • 38