1
23.7 Legacy Series / Re: IPTV in a bridge is not working
« on: September 19, 2023, 12:15:28 pm »
I did some research and figured out that VLAN 20 in my case is used for STB registration and sending IGMP queries. The actual multicast traffic itself is coming through another VLAN 9.
I faced lots of issues with igmp-proxy setup and want to share the knowledge to whom it may concern. This setup is relevant for ISPs MTS and MGTS in Moscow region with "anyservice" service turned off via tech support. It means that multicast traffic is delivered as tagged.
1. Create VLAN interfaces. Interfaces - Other Types - VLAN. I have interfaces vlan0.20 with tag 20 and priority 0 and vlan0.9 with tag 9 and priority 4. Both of them have parent WAN interface;
2. Assign VLAN interfaces. Interfaces - Assignments. Here I have IPTV_VLAN_9 and IPTV_VLAN_20 interfaces;
3. Assign an interface for STB. In my case I have a dedicated port on OPNsense box (igc1), called IPTV_PORT;
4. Enable all created interfaces. Interfaces - IPTV_PORT, IPTV_VLAN_9, IPTV_VLAN_20 - Enable interface, Promiscuous mode ON. IP configuration - none;
5. Create a bridge. Interface - other types - bridge. Members - IPTV_PORT, IPTV_VLAN_20;
6. Assign bridge interface. Interfaces - Assignments. I called it IPTV_BRIDGE;
7. Enable bridge interface. Interfaces - IPTV_BRIDGE, IPv4 configuration type - DHCP, promiscuous mode ON;
8. Enable filtering on the bridge interface: https://docs.opnsense.org/manual/how-tos/lan_bridge.html#step-six
9. Create firewall rules on the bridge interface. Firewall - Rules - IPTV bridge. Since it's just a bridge between dedicated STB port and STB subnet, I added two "allow any-any" rules for in and out direction, and enabled "allow options" checkbox in advanced features section.
At this moment you should have assigned IP addresses with DHCP for your STB and IPTV_BRIDGE interface from the same subnet. In my case it is 10.35.112.0/20. STB now should have access to on-demand services such as movies and TV shows.
Now we need to setup igmp-proxy service between IPTV_VLAN_9 and IPTV_BRIDGE. Here is where a major drawback of igmpproxy package comes into place. It requires IP addresses for both upstream and downstream interfaces to be present. That's why we enabled DHCP client on IPTV_BRIDGE interface. And we need to have a dummy IP address on IPTV_VLAN_9 interface in order to get things working.
10. Assign a static dummy IP address for IPTV_VLAN_9 interface. Interfaces - IPTV_VLAN_9, IPv4 Configuration Type - Static IPv4, IPv4 address - 254.254.254.254/32.
11. Create firewall rules for IPTV_VLAN_9 interface. Firewall - Rules - IPTV_VLAN_9. Again I just added two allow-any-any rules as for step 8.
12. Create upstream and downstream interfaces. Upstream interface IPTV_VLAN_9, networks 224.0.0.0/4 and 172.16.255.0/24, downstream interface is IPTV_BRIDGE, no need to describe specific network here.
After that I got it working. Hope it would help someone.
I faced lots of issues with igmp-proxy setup and want to share the knowledge to whom it may concern. This setup is relevant for ISPs MTS and MGTS in Moscow region with "anyservice" service turned off via tech support. It means that multicast traffic is delivered as tagged.
1. Create VLAN interfaces. Interfaces - Other Types - VLAN. I have interfaces vlan0.20 with tag 20 and priority 0 and vlan0.9 with tag 9 and priority 4. Both of them have parent WAN interface;
2. Assign VLAN interfaces. Interfaces - Assignments. Here I have IPTV_VLAN_9 and IPTV_VLAN_20 interfaces;
3. Assign an interface for STB. In my case I have a dedicated port on OPNsense box (igc1), called IPTV_PORT;
4. Enable all created interfaces. Interfaces - IPTV_PORT, IPTV_VLAN_9, IPTV_VLAN_20 - Enable interface, Promiscuous mode ON. IP configuration - none;
5. Create a bridge. Interface - other types - bridge. Members - IPTV_PORT, IPTV_VLAN_20;
6. Assign bridge interface. Interfaces - Assignments. I called it IPTV_BRIDGE;
7. Enable bridge interface. Interfaces - IPTV_BRIDGE, IPv4 configuration type - DHCP, promiscuous mode ON;
8. Enable filtering on the bridge interface: https://docs.opnsense.org/manual/how-tos/lan_bridge.html#step-six
9. Create firewall rules on the bridge interface. Firewall - Rules - IPTV bridge. Since it's just a bridge between dedicated STB port and STB subnet, I added two "allow any-any" rules for in and out direction, and enabled "allow options" checkbox in advanced features section.
At this moment you should have assigned IP addresses with DHCP for your STB and IPTV_BRIDGE interface from the same subnet. In my case it is 10.35.112.0/20. STB now should have access to on-demand services such as movies and TV shows.
Now we need to setup igmp-proxy service between IPTV_VLAN_9 and IPTV_BRIDGE. Here is where a major drawback of igmpproxy package comes into place. It requires IP addresses for both upstream and downstream interfaces to be present. That's why we enabled DHCP client on IPTV_BRIDGE interface. And we need to have a dummy IP address on IPTV_VLAN_9 interface in order to get things working.
10. Assign a static dummy IP address for IPTV_VLAN_9 interface. Interfaces - IPTV_VLAN_9, IPv4 Configuration Type - Static IPv4, IPv4 address - 254.254.254.254/32.
11. Create firewall rules for IPTV_VLAN_9 interface. Firewall - Rules - IPTV_VLAN_9. Again I just added two allow-any-any rules as for step 8.
12. Create upstream and downstream interfaces. Upstream interface IPTV_VLAN_9, networks 224.0.0.0/4 and 172.16.255.0/24, downstream interface is IPTV_BRIDGE, no need to describe specific network here.
After that I got it working. Hope it would help someone.