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…)