GithubHelp home page GithubHelp logo

Comments (4)

csstaub avatar csstaub commented on May 13, 2024

Ghostunnel is a just transport layer proxy, it is agnostic about the protocol running on top. Any mechanism for preserving information about originators of requests would have to be application-specific (such as a X-Forwarded-IP header in an HTTP request). I'm not very familiar with Redis replication but I believe there is no mechanism for that at the moment.

from ghostunnel.

mbyczkowski avatar mbyczkowski commented on May 13, 2024

Hey @satheeshaGowda, I'm not sure if that solves your problem, but Redis has some options where you can specify what IP/PORT is being announced by sentinel (in sentinel.conf):

# sentinel announce-ip <ip>
# sentinel announce-port <port>

or the node itself (in redis.conf):

# slave-announce-ip <ip>
# slave-announce-port <port>

from ghostunnel.

mcpherrinm avatar mcpherrinm commented on May 13, 2024

I'm not sure there's a straightforward solution to this problem. When a connection comes in, it'll be TCP & TLS terminated, and then the server will see a localhost src IP.

To support having the "real" client IP as the source, you'd have to have something rewrite the source IP to be the real one, and ensure traffic sent back is routed appropriately to localhost.

I think either you'd need to do something in the OS network stack (ie, have ghostunnel install a NAT rule per incoming IP), and probably use network namespaces to isolate that.... Seems really messy.

Either that or some other mechanism to convince the service it's talking to the real client IP... I have no idea how to do this successfully in Linux.

It's certainly possible (Amazon's NLBs when TLS terminating do this, just announced). But doing it when you don't control the whole network stack; that seems trickier.

I don't think any of the existing ghostunnel contributers have the time to design and implement this, though if there's a reasonable design proposed, we may be able to accept an implementation.

from ghostunnel.

csstaub avatar csstaub commented on May 13, 2024

Update: Just merged support for the PROXY protocol (see #207), which could help with this if Redis also adopts support for the PROXY protocol.

from ghostunnel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.