How to stop multicast packets flooding the wireless interface in dd-wrt

For some reasons, they don’t provide a simple GUI switch for this and their wiki page doesn’t have the correct commands.

Anyway, the way to do it is this:

Check what is your wifi interface. Go to status/Wireless and check the Interface field below (you need to connect at least one client). In the following example, we assume it’s eth1.

Go to Administration/Commands

Type the following (assuming your LAN is on the 192.168.1.x range):

insmod ebtables
insmod ebtable_filter
insmod ebt_pkttype
insmod ebt_ip
ebtables -A FORWARD -o eth1 -p ipv4 --pkttype-type multicast --ip-source ! 192.168.1.0/255.255.255.0 -j DROP

Press Save Firewall and reboot.

VoilĂ ! No more multicast flooding of the wireless interface! This is handy if you’re using IPTV. As a bonus, normal multicasting on your LAN will still work (Samba, Homegroups, etc…)

Author: David Gerber

CEO of Zapek Software Engineering

8 thoughts on “How to stop multicast packets flooding the wireless interface in dd-wrt

  1. If i run this on DD-WRT v24-sp2 (Std) i get: The kernel doesn’t support the ebtables ‘filter’ table.

    Any suggestions? I have TP-LINK WR841N.

  2. Hi !,

    I have a Linksys WRT54GL with a dd-wrt firmware. On the port 4 i connected an iPTV. In Security tab i enable “filter multicast”. How to allow ONLY on the port 4 the multicast?

    (PS: I tried to separate the lan and wan but it seem work a week and then the wireless freeze)

    It is right (the IPTV is on 192.168.1.136)? :
    insmod ebtables
    insmod ebtable_filter
    insmod ebt_pkttype
    insmod ebt_ip
    ebtables -A FORWARD -o eth1 -p ipv4 –pkttype-type multicast –ip-source ! 192.168.1.136 -j DROP

    “”Sorry for all errors. English isn’t my mother tongue. :).

  3. Hi, worked like a charm. After working on this for weeks, playing around with all sorts of dd-wrt startup commands, changing channels, rewiring this and that, trying to work out all sorts of “kernel doesn’t support ebtables xxxx” error messages, your suggestion was what finally fixed it! I have IPTV coming into the basement, and one of the modem’s LAN ports runs upstairs to an 8-port unmanaged switch. I have various game consoles connected to the switch, as well as a Linksys WRT54GS with dd-wrt configured as an Access Point, and the IPTV PVR. Every time I turned on the PVR, I would lose wifi from the Access Point. Your solution fixed the problem. Thanks!

  4. Working fine to separate IPTV from WiFi! (D-Link DIR-615, DD-WRT v24-sp2 (11/21/10) std) Thanks a lot!

  5. will this also work to disable multicast on the lan ports? which commands do have to type to make this work?

Comments are closed.