Git Product home page Git Product logo

Comments (19)

VeniceNerd avatar VeniceNerd commented on June 11, 2024 1

Ah coming back to this, I just realised that having a "0.0.0.0/0" line is probably just bad, because when python reads the JSON into a dictionary, the ordering is not going to necessarily be preserved, and because we do first-match wins, if the first entry happens to be 0.0.0.0/0 then it'll sit there and relay precisely nothing.

I'd recommend a more granular approach of specifying more precisely what you don't want to have relayed, rather than 0.0.0.0/0 as a catch-all.

Hi @alsmith I'm still wondering if you happen to know how to implement a more granular approach of specifying more precisely what I don't wan't to be relayed.

Right now I only know how to tell a network to relay to a set of VLANS. I wonder if there is also a way to specific which networks are NOT supposed to forward anywhere. Are the additional parameters or commands one can use within the ifFilter.json?

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

Merged PR#35.

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

Perfect!

But ifFilter.json can be just one IP, without mask or i need to use /32?

I try to relay just 10.125.130.5/32 for eth1.10 and 10.125.1.20/32 for eth1.5

Others can relayed? Filter just allow the .json?
I can see networks are not at filter relayed.
Jun-14 17:03:09 multicast-relay.py INFO: [mDNS] Relayed 68 bytes from 100.127.127.127:5353 on local [ttl 1] to 224.0.0.251:5353 via eth1.10/10.125.1.1
Jun-14 17:03:09 multicast-relay.py INFO: [mDNS] Relayed 68 bytes from 10.1.1.1:5353 on local [ttl 1] to 224.0.0.251:5353 via eth1.5/10.125.128.1

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

Default is relay everything that is not in the ifFilter.json.

You can specify an IP address only now; if there is no / in the entry then /32 is assumed. Commit 503fc49.

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

Can be relay anything unless its on ifFilter.json ?
That way can reduce the multicast doing just for what its necessary

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

By default, if the src IP# can't be found in the filter then it gets relayed to all interfaces. If it is found then it will only be relayed to the interface(s) specified in the json.

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

"By default, if the src IP# can't be found in the filter then it gets relayed to all interfaces"
Its possible to not relay by default? Just what is in the file?

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

There is an example in the repo: https://github.com/alsmith/multicast-relay/blob/master/ifFilter.json

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

You could probably convince it to do no-relay by default by adding a "0.0.0.0/0": [] line as the last line as that catches everything.

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

Ohh ok! So i can use "0.0.0.0/0": [] at last line and this will block every other range or IP that its not before that line!
This should works!

Example:
"10.0.0.0/20": ["br0", "br3"],
"192.168.0.0/24": ["br2", "br3"],
"192.168.1.1/32": ["br2"],
"172.20.144.0/20": ["br0"]
"0.0.0.0/0": []

Thanks!

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

I try using this line but doesn't works.

{
"10.125.128.0/17": ["eth1.10"],
"10.125.1.0/24": ["eth1.5"],
"0.0.0.0/0": []
}

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

Sorry, my bad!
I want to relay just 2 networks 10.125.128.0/17 and 10.125.1.0/24 for example.

10.125.128.0/17 relay to eth1.10
10.125.1.0/24 relay to eth1.5

All others networks and dev must be ignore.

Which is the best configuration for ifilter to do it?

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

Empty log, nothing relayed.

{
"10.125.128.0/17": ["eth1.10"],
"10.125.1.0/24": ["eth1.5"],
"0.0.0.0/0": []
}

multicast-relay.py --interfaces eth1.5 eth1.10 --ifFilte fFilter.json --verbose --logfile /var/log/muticast.log
Jul-11 12:21:04 multicast-relay.py INFO: Adding multicast relay for 239.255.255.250:1900 (SSDP)
Jul-11 12:21:04 multicast-relay.py INFO: Adding multicast relay for 224.0.0.251:5353 (mDNS)
Jul-11 12:21:04 multicast-relay.py INFO: Adding broadcast relay for 255.255.255.255:6969 (Sonos Discovery)

from multicast-relay.

juliodiz avatar juliodiz commented on June 11, 2024

The filter must allowed just 10.125.128.0/17 and 10.125.1.0/24, not ignore (denied)
All other networks not in 10.125.128.0/17 10.125.1.0/24 must be ignore. I believe the filter do the opposite.

from multicast-relay.

VeniceNerd avatar VeniceNerd commented on June 11, 2024

Hey guys,

has this ever been resolved? I'm trying to do exactly the same but not sure if a solution has ever been found?

from multicast-relay.

alsmith avatar alsmith commented on June 11, 2024

Ah coming back to this, I just realised that having a "0.0.0.0/0" line is probably just bad, because when python reads the JSON into a dictionary, the ordering is not going to necessarily be preserved, and because we do first-match wins, if the first entry happens to be 0.0.0.0/0 then it'll sit there and relay precisely nothing.

I'd recommend a more granular approach of specifying more precisely what you don't want to have relayed, rather than 0.0.0.0/0 as a catch-all.

from multicast-relay.

VeniceNerd avatar VeniceNerd commented on June 11, 2024

Ah coming back to this, I just realised that having a "0.0.0.0/0" line is probably just bad, because when python reads the JSON into a dictionary, the ordering is not going to necessarily be preserved, and because we do first-match wins, if the first entry happens to be 0.0.0.0/0 then it'll sit there and relay precisely nothing.

I'd recommend a more granular approach of specifying more precisely what you don't want to have relayed, rather than 0.0.0.0/0 as a catch-all.

So what would be the suggested way to include a network into ifFilter.json and basically tell it to not send any of it's traffic anywhere else? Because I we don't include the network in the ifFilter.json at all it will basically transmit to all other networks by default, right?

from multicast-relay.

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.