Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: iptables rules setup to intercept ingress traffic do not intercept all traffic #166

Open
kiranmeduri opened this issue Feb 5, 2020 · 0 comments
Assignees
Labels
Bug Something isn't working ECS Amazon Elastic Container Service EKS Amazon Elastic Container Service for Kubernetes

Comments

@kiranmeduri
Copy link

Summary
What are you observing that doesn't seem right?
iptables rules on the ingress do not intercept all traffic. Currently they only intercept traffic destined to app-port and forward that traffic to Envoy. This has the following side-effects

  1. Traffic internal to the application e.g. sidecar statsd, x-ray, that need to be only accessible on localhost are accessible from outside, even when there is no corresponding listener is configured. Though this enables some use-cases around multiple listeners (currently not supported by App Mesh, Feature Request: Add support for multiple listeners on Virtual Node and Virtual Router #120 ), it deviates from the expectation that only opt-in (explicit) listeners are accessible from outside.
  2. Makes it harder to debug if traffic to app-port is actually flowing through Envoy when the configuration on application does not match virtual-node listener. Users may think the traffic is being intercepted by Envoy but actually it is side-stepped.

It is recommended practice to bind all the non-Envoy ports to localhost (127.0.0.1) to avoid inadvertent access, but many applications on-boarding onto service mesh do not make that change.

Steps to Reproduce
Create an ECS task or Kubernetes pod with two containers that listen on different ports (or same container listening on different ports). Mark one port as app-port. Now try to access the application on another port and you should see that it works. Expectation is to get 404.

Are you currently working around this issue?
How are you currently solving this problem?

Additional context
Anything else we should know?

CNI: https://github.com/aws/amazon-vpc-cni-plugins/blob/master/plugins/aws-appmesh/plugin/commands.go#L143

Attachments
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

@kiranmeduri kiranmeduri added the Bug Something isn't working label Feb 5, 2020
@jamsajones jamsajones added ECS Amazon Elastic Container Service EKS Amazon Elastic Container Service for Kubernetes Phase: Researching Roadmap: Accepted We are planning on doing this work. labels Feb 26, 2020
@kiranmeduri kiranmeduri changed the title Bug: Netfilter rules setup to intercept ingress traffic does not intercept all traffic Bug: Netfilter rules setup to intercept ingress traffic do not intercept all traffic Mar 11, 2020
@kiranmeduri kiranmeduri changed the title Bug: Netfilter rules setup to intercept ingress traffic do not intercept all traffic Bug: iptables rules setup to intercept ingress traffic do not intercept all traffic Mar 11, 2020
@shsahu shsahu removed Priority: Medium Roadmap: Accepted We are planning on doing this work. labels Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ECS Amazon Elastic Container Service EKS Amazon Elastic Container Service for Kubernetes
Projects
None yet
Development

No branches or pull requests

7 participants