IPTV - blocking multicast on WIFI

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:46, 26 May 2011 (edit)
Sash (Talk | contribs)
(Block Multicast via Firewall)
← Previous diff
Revision as of 13:09, 30 June 2011 (edit) (undo)
Sash (Talk | contribs)
(Block Multicast via Firewall)
Next diff →
Line 40: Line 40:
insmod ebtable_filter insmod ebtable_filter
iptables -I FORWARD -o "interface to block" -m pkttype --pkt-type multicast -j DROP iptables -I FORWARD -o "interface to block" -m pkttype --pkt-type multicast -j DROP
 +
 +
 +i have to think about
 +ebtables -A FORWARD -o wlan0 -d Multicast -j DROP # drop multicast traffic coming from another interface to wlan0(WIFI)
 +
 +If this doesn't work as you wish, you may try also this rules:
 +
 +ebtables -A FORWARD -i eth0 -d Multicast -j DROP # drop multicast traffic coming from eth0(LAN) to any other bridged interface
 +ebtables -A INPUT -i eth0 -d Multicast -j DROP # drop multicast traffic coming from eth0(LAN) to the CPU

Revision as of 13:09, 30 June 2011

Contents


Introduction

This section explains how to use the DD-WRT GUI to configure DD-WRT supporting multicast IPTV traffic while at the same time enable some LAN ports and Wireless Clients working in parallel.

There are 2 ways to achieve this. The first is to unbridge the LAN area that shouldnt get flooded with mulicast packets. The second (and imho more elegand) way is to block mulicast traffic to the interfaces which doesnt need it.

Assumption

In the sample configuration, the TV media receiver is connected to LAN Port 4, and the router Ip is 192.168.1.1. Other configurations work accordingly.

Prerequisites

  1. Ensure that you are at least on DD-WRT 24v1 Firmware, otherwise download the most recent release.
  2. Connect the TV media receiver to Port 4. Connect other LAN connections to Ports 1,2,3

Allow for multicast traffic

  1. Disable (uncheck) "Filter Multicast" on Security-->Firewall

Disable multicast traffic to reach the Wireless adapter

  1. In Wireless-->Basic setting, set "Network Configuration" to "Unbridged", and "Multicast forwarding" to "disabled".
  2. Provide 192.168.3.1 with subnet mask 255.255.255.0 as the IP address for Wireless connections

Setup an additional VLAN

  1. In Setup-->VLANs, check the "tagged" checkboxes for Ports 1,2,3. Then, check the three accoring checkboxes in the VLAN 7 row, uncheck them in the VLAN 0 row, and finally uncheck the "tagged" checkboxes.
  2. Apply the settings and reboot the router

Disable multicast traffic to reach the LAN Ports 1,2,3

  1. In Setup-->Networking, check "Unbridged" for "Network Configuration vlan7", "Multicast forward" to "disable".
  2. Below this entry, provide IP number 192.168.2.1 with subnet mask 255.255.255.0 as the IP address

Enable DHCP for the additional local Networks and final steps

  1. In Setup-->Networking, add two DHCP Servers in the bottom area, one for vlan7, one for eth1 (keep the standard settign for the other fields)
  2. Apply all changes, and reboot the router

Block Multicast via Firewall

Fist you have to load the layer2 firewall modules. Then pp.ut in your WIFI interface into the iptables rule ande insert everything into the firewall startup

insmod ebtables
insmod ebtable_filter
iptables -I FORWARD -o "interface to block" -m pkttype --pkt-type multicast -j DROP


i have to think about ebtables -A FORWARD -o wlan0 -d Multicast -j DROP # drop multicast traffic coming from another interface to wlan0(WIFI)

If this doesn't work as you wish, you may try also this rules:

ebtables -A FORWARD -i eth0 -d Multicast -j DROP # drop multicast traffic coming from eth0(LAN) to any other bridged interface ebtables -A INPUT -i eth0 -d Multicast -j DROP # drop multicast traffic coming from eth0(LAN) to the CPU


Finally, enjoy TV, LAN, and Wireless simultaneously