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

Investigate multi site support #36

Open
glaslos opened this issue Nov 21, 2016 · 3 comments
Open

Investigate multi site support #36

glaslos opened this issue Nov 21, 2016 · 3 comments

Comments

@glaslos
Copy link
Member

glaslos commented Nov 21, 2016

Does it make sense to support multiple domains or should we recommend nginx + multiple SNARE instance?

@Gerard42
Copy link

I tried to use an Apache + SNARE set-up for this, but this results as the Apache proxy IP as originating IP for the attacks.

If SNARE itself does not support multiple domains, it might be a good idea to support the X-Forwarded-For header field? See https://stackoverflow.com/questions/760283/apache-proxypass-how-to-preserve-original-ip-address

Glad to hear it if there is a solution to preserve the original IP that is currently working.

@glaslos
Copy link
Member Author

glaslos commented Feb 19, 2019

No, you are right, x-forwarded-for is the way to go

@Gerard42
Copy link

Gerard42 commented Jun 5, 2019

I made an ugly quick-fix that works for me. Maybe it is of use for others until this is implemented in Snare in a more clean way than this :-)

TannerHandler() in tanner_handler.py:

            # TEMP FIX FOR FORWARDING
            header = {key: value for (key, value) in request.headers.items()}
            if 'X-Forwarded-For' in header:
                peer = dict(
                    ip=header['X-Forwarded-For'],
                    port=request.transport.get_extra_info('peername')[1]
                )
            ## END OF TEMP FIX

            data['peer'] = peer

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

2 participants