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

feat: load host IP from proxied source IP #2566

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

mstopa-splunk
Copy link
Contributor

SC4S already supports the proxy protocol which is useful in some scenarios when using proxies or LBs: https://www.syslog-ng.com/community/b/blog/posts/finding-the-real-source-ip-using-the-proxy-protocol-with-syslog-ng

This PR implements a new overwrite. If SC4S_SOURCE_PROXYCONNECT=yes, SC4S will overwrite the HOST value with PROXIED_SRCIP.

Before the change:
host set to the LB IP
image

After:
host set to the IP of the source
image

@mstopa-splunk mstopa-splunk changed the base branch from main to develop September 26, 2024 08:47
@mstopa-splunk mstopa-splunk marked this pull request as ready for review September 26, 2024 08:47
@mstopa-splunk mstopa-splunk merged commit 538be9b into develop Sep 26, 2024
19 checks passed
@mstopa-splunk mstopa-splunk deleted the fetch_host_from_proxied_ip branch September 26, 2024 08:47
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants