Multicast UDP traffic from WAN to LAN isn't blocked?

hello,
I'm using a NAS connected on WAN side to stream Videos to the LAN side of my router via multicast.
I was going nuts because I couldn't get Multicast UDP traffic through the WAN. So I tried it with firewall settings, static routes, opening ports etc. Nothing worked out.
After weeks I just bridged the WAN and LAN interfaces in the OpenWRT settings and finally the UDP traffic is working perfectly. Also activated IGMP snooping and everything works how it should. My question is: Is it normal that it really works this simple ? Just bridging the Interfaces without any additional settings ? I'm asking because lots of peaople I talked to about this, said that a router has to block UDP and that allowing multicast from WAN to LAN is hell of mess to get it to work.
I'm confused. Could some please explain ?

Evidently you don't really have a router. If the network on both sides is not numbered the same, a bridge wouldn't work.

I don't understand. I have a cheap travel router with openwrt installed. the WAN is assigned to 10.0.0.80 and the LAN is 192.168.1.20.
I bridged WAN and LAN and it works.

Suppose some device say 10.0.0.20 wants to send a packet to 192.168.1.15 how does it happen?

When you make a bridge there is now only one device br-foo that contains two ports... You can't have ips on each iface separately when they are in the bridge

Computer 1(simulating the NAS ) has IP 10.0.0.20 connected to WAN
Computer 2 has given IP 192.168.1.15 connected to LAN
And it works. Thats why I'm confused. How to set this up correctly without a bridge ?

I just tested it again. Wireshark says the Source is 10.0.0.50 and the MulticastGroup is 239.1.1.1 and I can watch the stream from 192.168.1.133.

Yes but can you do anything else, the 192.xxx device has no connection to the internet right?

no its all locally. I don't need an internet connection beacause its a project for my study. I'm just simulating a WAN. But it works, I have 2 different networks connected.

No, you have one layer 2 network with hosts on it using two different numbering systems

hm ok. so could you please tell me how to configure openwrt properly because i tried a lot of things that dind't work out as mentioned above. What does this mean I have only one layer 2 network ? You mean ARP ?

When you bridge two or more interfaces you are basically creating a switch. They both operate in the same broadcast domain.

If you really want to simulate the milticast udp through the wan, this is not the way to achieve it.
In case you want to do it properly tell us what do you want to achive and post the configuration files that you have changed in order to achieve this.

thank you for helping out so far.
the final setup should be as follows: Computer 1 (10.0.0.50) runs an UDP multicast stream 239.1.1.1 and is connected to a switch. Computer 2 and 3 are seperatly connected to the switch with routers over the WAN port which also have 10.0.0 adresses so they are connected to the same subnet. On these routers there are multiple users connected on the LAN side with 192.168.1.x addresses.
I just tried it and everyone on those LAN sides can view the stream on their routers. Also IGMP works so no flooding occurs. Wireshark also says that the stream comes from 10.0.0.50 and the multicast address is 239.1.1.1.
Its exactly what I wanted to achieve, but I'm confused because it seems that this is wrong according to the comments here.

post here the contents of /etc/config/network and /etc/config/firewall for a start.

I freshly installed openwrt on a cheap travel router. no changes made besides bridging the interfaces. everything is set to default.

Still, there is this mess with the bridge of LAN and WAN.
Also post the output of ifconfig

sorry this question is stupid. i only used the gui of openwrt. whats the command for the informations you need in putty ?

You mention it's a router and a router is a device which connects to two or more broadcast domains and passes packets between them because devices use the router as a gateway.

If you are trying to simulate this, then you are fine to use an out-of-the-box OpenWrt router, just put a static 10.0.0.20 or whatever address on the WAN side.

Now, you will find out that multicast packets received on WAN are not sent to LAN. this is by design. If you bridge instead of route, then you will have 192.168.x.x devices on one side of the bridge, and they will be unable to reach anything because they will have no gateway. So bridging is not a solution unless you want the LAN side machines to be connected to the WAN using the same network settings as the other machines on WAN, in which case you do just want a switch.

So, which is it, do you want a separate routed network on 192.168.x.x which is fully functional and uses your OpenWrt as a gateway to get access to 10.x.x.x side resources, but also passes certain multicast packets from WAN to LAN?

If that's what you want you need a multicast router which requires multicast routing software. This can be either static multicast routing (always forwarding packets destined for some specific multicast addresses that don't change) or dynamic multicast routing (where requests come in on LAN side from clients and the multicast router adds new routes so that packets from WAN destined for the multicast addresses that were requested on LAN are forwarded from WAN to LAN.

let us know what you are really looking for, but I suspect it's this last thing.

if you want a multicast router, you could probably look at https://openwrt.org/packages/table/start?dataflt[Description_wiki*~]=multicast and see various packages that work with multicast.

1 Like

the first thing is exactly what i did. I assigned a 10.0.0 address to the wan ports of both routers. It's for multicast demonstration purpose. And it works as it should I think. The problem in second example is that I can't ping from WAN to LAN,but the stream can still be viewed. Is this what youre reffering to ?

What do you want to accomplish? are you simulating something specific?

what situation do you need to study? When you bridge the two networks it's like connecting them with a wire. You've discovered that if you have a wire between two computers then multicast packets sent from one computer arrive at the other regardless of what IP addresses are used on the two computers. This is not surprising.

If you just want one computer to send multicast packets to other computers, you can put them all on 192.168.1.0/24 and connect them all to a switch. You seem to know this... Somehow you want to study some different situation, but it seems like you don't understand what that situation is?

If the situation you want is

Network A numbered 10.0.0.0/24 ------ Router ------- Network B numbered 192.168.1.0/24

and you want all devices to function fully correctly, then you need a router in the middle. You've discovered that if you replace "router" with "Switch" that the multicast packets get from A to B... but that's all Network B can do because any packet sent from network B that isn't destined to 192.168.1.0/24 must be sent to a gateway, and there is no gateway

ahhh ok.
so I have a 10.0.0 address connecting to 192.168..., but there not viewed as seperate networks ? I think thats the problem i don't understand. I want to simulate 2 networks. I thought I achieved that already. So how would I do that ? I don't have special multicast routers. I thought openwrt would do the trick. I also thought the gateway would be the switch in between routers and sender. SO its not possible with openwrt ?