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

Source IP only contains ISP address & ephemeral address #775

Closed
leefernandes opened this issue Jun 15, 2019 · 1 comment
Closed

Source IP only contains ISP address & ephemeral address #775

leefernandes opened this issue Jun 15, 2019 · 1 comment

Comments

@leefernandes
Copy link

leefernandes commented Jun 15, 2019

I'm hoping to at least ascertain whether a service exposed via an ephemeral address, GLB using HTTP Protocol, created from the Ingress manifest is capable of including a user's originating source/client IP in the X-Forwarded-For header when accessed directly by the ephemeral address. Any direction, or suggestions are appreciated.

I have a go service that uses the client/source IP address of my user, which works when hosted outside of GKE. When deployed on GKE cluster 1.13.6-gke.6 with an Ingress the X-Forwarded-For header only contains an IP address for the Internet Service Provider (ATT, Spectrum, etc), followed by the GCP ephemeral ip address, lacking the originating client IP.

I'm struggling to find similar issues experienced by others, or info that might help me understand why the header doesn't also include the client IP.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ip-ingress
  labels:
    app: ip-ingress
  annotations:
    cloud.google.com/app-protocols: '{"ip":"HTTP"}'
spec:
  backend:
    serviceName: ip
    servicePort: 80
apiVersion: v1
kind: Service
metadata:
  name: ip
  annotations:
    service.beta.kubernetes.io/external-traffic: OnlyLocal
spec:
  type: NodePort
  externalTrafficPolicy: Local
  sessionAffinity: ClientIP
  ports:
  - name: http
    targetPort: 80
    port: 80
@leefernandes leefernandes changed the title Basic Ingress Source IP only contains ISP address & GCP ephemeral address Ingress Source IP only contains ISP address & ephemeral address Jun 15, 2019
@leefernandes leefernandes changed the title Ingress Source IP only contains ISP address & ephemeral address Source IP only contains ISP address & ephemeral address Jun 15, 2019
@leefernandes
Copy link
Author

nvm, user err

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant