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

add option to anonymize sflowtool output for both ipv4 and ipv6. /24 … #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

loganaden
Copy link

…for ipv4 and /64 for ipv6.

…for ipv4 and /64 for ipv6

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
@sflow
Copy link
Owner

sflow commented Aug 8, 2023

While I recognize the value of this option in applications that consume sFlow, I do not think it belongs in sflowtool.

sflowtool is for demonstrating, understanding and troubleshooting sFlow. It is not intended as the first step in a full-blown application. However if anonymization is the only thing missing for what you are doing then I suggest you pipe the JSON output from "sflowtool -J" into a Python script and do the anonymization there. I hope that makes sense?

@loganaden
Copy link
Author

loganaden commented Aug 10, 2023

The proposed PR was actually borne from a request from 5x IXPs that are using sflowtool to collect, and fan out sflow, to various collectors. when we discussed the various options, the IXPs themselves gravitated towards a standards-based approach that :

  1. maintained the spirit of not distributing PII information
  2. did not require additional development resources on the IXP side (ie. community-run IXPs with no staff)
  3. an “option” to enable/disable on demand for different classes of flow collectors (ie. sflowtool -f a.b.c.d -af w.x.y.z; where the second host (w.x.y.z) sees the anonymised traffic, but the first doesn’t)

@sflow
Copy link
Owner

sflow commented Aug 16, 2023

If you don't mind I'd like to understand the full scope of this use case better. Is this an example of an IXP sending a member's sFlow feed -- for just that member's traffic -- back to them? With/without anonymization?

And what happens next? Do the recipients use it to construct some summary dashboards (e.g. using Prometheus+Grafana), or is that part unknown/private with different recipients doing different things?

@sflow
Copy link
Owner

sflow commented Sep 29, 2023

Sorry, but I still don't understand the use-case. When you forward sFlow using the -f option it forwards the original unmodified UDP datagram. The anonymization in this pull-request will only take effect in places where sflowtool is used to print the decoded protocol fields to ASCII or json. Is that actually the requirement here?

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

Successfully merging this pull request may close these issues.

None yet

2 participants