Openwrt 允许多播流量

Ste*_*utz 5 linux multicast multicastsocket

我在设备上运行 openwrt,并有一个 python 脚本,用于侦听和打印以屏幕 239.2.1.1 上的多播流量。

但是,屏幕上没有打印任何内容,我相信这是防火墙问题。如何确保运行 openwrt 的 LAN 接口允许多播流量?

raj*_*shk 6

我知道有点晚了,但我想这会对仍在寻找答案的人有所帮助。

安装 IGMPProxy

install igmpproxy
make menuconfig
 -> Network                                                                                                                                                            
  -> Routing and Redirection
Run Code Online (Sandbox Code Playgroud)

在 bin 文件夹中查找该包 AR9331 hardware:- bin/ar71xx/packages/base/igmpproxy_0.1-9_ar71xx.ipk

copy the ipk to openwrt router.
opkg install igmpproxy
/etc/init.d/igmpproxy start
Run Code Online (Sandbox Code Playgroud)

确保您已在/etc/config/firewall

config rule
        option name             Allow-IGMP
        option src              wan
        option proto            igmp
        option family           ipv4
        option target           ACCEPT
Run Code Online (Sandbox Code Playgroud)

确保您在 /etc/config/igmpproxy 中获取了此部分

config igmpproxy
        option quickleave 1

config phyint
        option network wan
        option direction upstream
        list altnet 0.0.0.0/0

config phyint
        option network lan
        option direction downstream
Run Code Online (Sandbox Code Playgroud)

确保网络配置中的以下内容

In /etc/config/igmpproxy
config interface lan
        option igmp_snooping 1
Run Code Online (Sandbox Code Playgroud)

也在 br-lan 中启用

echo "0" > /sys/devices/virtual/net/br-lan/bridge/multicast_snooping
Run Code Online (Sandbox Code Playgroud)