Help getting IPTV working with the Altibox ISP

Hi
I have been using the ISP provided box until now, but because of some issues with WiFi I have finally decided to get my R7800 working. I have a fiber cable connected up to a media converter that then connects to the R7800 on the WAN port. I have internet working, but I struggle with getting IPTV to work.

So far I've set vlan 102 as the internet and 101 as IPTV which is how I read only I should configure this. In addition I have installed and configured igmproxy which is necessary for IPTV, but I still can't make it work. Any advice how to proceed from here?

I found some supposedly working configuration for EdgeOS if that's of any help:

interface eth5.101 {
         alt-subnet 0.0.0.0/0
         role upstream
         threshold 1
     }
     interface switch0.4 {
         alt-subnet 0.0.0.0/0
         role downstream
         threshold 1
     }
ethernet eth5 {
         duplex auto
         mac **:**:**:**:**:**
         speed auto
         vif 100 {
             description ALTIBOX_CONFIG
             mtu 1500
         }
         vif 101 {
             address dhcp
             description TV_WAN
             dhcp-options {
                 default-route no-update
                 default-route-distance 210
                 name-server update
             }
         }
         vif 102 {
             address dhcp
             description WAN
             firewall {
                 in {
                     name WAN_IN
                 }
                 local {
                     name WAN_LOCAL
                 }
             }
         }
     }
    switch-port {
         interface eth0 {
             vlan {
                 pvid 1
             }
         }
         interface eth1 {
             vlan {
                 pvid 1
                 vid 4
                 vid 5
                 vid 10
             }
         }
         interface eth2 {
             vlan {
                 pvid 1
                 vid 4
                 vid 5
                 vid 10
             }
         }
         interface eth3 {
             vlan {
                 pvid 1
                 vid 4
                 vid 5
                 vid 10
             }
         }
         interface eth4 {
             vlan {
                 pvid 1
                 vid 4
                 vid 5
                 vid 10
             }
         }
         vlan-aware enable
     }
    route 172.21.0.0/16 {
         next-hop *.*.*.* {
         }
     }
     rule 5010 {
         description "masquerade for WAN"
         outbound-interface eth5.102
         type masquerade
     }
     rule 5011 {
         description "masquerade for TV_WAN"
         destination {
             group {
                 network-group TV_WAN
             }
         }
         log enable
         outbound-interface eth5.101
         protocol all
         type masquerade
     }
     
     
    network-group TV_WAN {
         description ""
         network 172.21.0.0/16
     }

This is apparently all that's needed to get both internet and IPTV to work. Any advice will be very much appreciated.

Is there a separate TV converter box with an Ethernet port? Usually you need only hardware switch the TV-related VLANs through from the ONT to the TV box.

The way the original setup was as installed by the ISP is a fiber cable terminated directly into the router fiber WAN port (the router has a fiber WAN port and an Ethernet WAN port) and from there I can connect any of the Ethernet ports as I please, and get either internet or IPTV.

In addition I can connect as many dumb switches after the router so I can extend the network as much as I please, the only requirement for keeping IPTV working according to the ISP is that the switches must support IGMP snooping.

What I did first was to get a media converter and move the fiber cable from the ISP router to the media converter and then use an Ethernet cable from the media converter connected to the Ethernet WAN port on the ISP box. This worked without any reconfiguration required so I knew I could use the media converter. Now I am trying to replace the ISP box and according to what I found online as long as I setup both vlan 101 with the correct MAC address, igmpproxy and static route and vlan 102 everything should be fine and working. Unfortunately this isn't working for me and I am trying to figure out why.

First, it helps if you post your OpenWrt configs.

I tried to translate your igmpproxy config into OpenWrt's Unified Command Interface (or UCI) syntax, and quickly realized I could not so do for the downstream phy port, as it doesn't seem to have an UCI/OS-like-declared "Interface placeholder" defined. There's no comparison from your example; and to be honest, the EdgeOS configs don't help much therefore.

Can you post the content of the following files. When doing so, please use the </> icon to enclose the output:

  • interface sections of /etc/config/network
  • EDIT - switch section of /etc/config/network
  • in its entirety - /etc/config/igmpproxy
  • any rules for IPTV added to /etc/config/firewall

Can you see TV when you connect STB directly to the media converter? If so you should be able to run this only with hardware VLANs. I think that IGMP support is built into most hardware switches.

1 Like

I’m missing so much info that it is impossible to get the setup working with the knowledge provided.

E.g. Is the original iptv setup routed or connected to a dedicated vlan?

As i read between the lines, it seems to be routed, in that case we need to add a second wan interface for the iptv, and we have to setup igmpproxy and know what subnet(s) to route to the iptv vlan/network.

The providers router might still dynamically assign a vlan internally to the iptv box as well (based on the mac address), so it stays guesswork.

Can you provide some more info on how the provider implemented iptv?
And does the iptv box do more than just providing tv? (E.g. applications like netflix, etc..)

Edit: nevermind. Just started reading the edgerouter config and it is clearly routed iptv.
Let me see if i can cobble something together based on the info in that config

ok....

Assuming your internet works, and we just need to tinker with IPTV, this should be a start:
(you might have most already, just compare and adjust what is needed)

FYI: I see that the edgerouter sets a route for the IPTV wan interface, but it seems the same as the dhcp range it will get (i might be wrong), so in that case that can be omitted (which i did in below config)

  1. add the IPTV WAN interface to /etc/config/network:
config interface 'IPTV_WAN'
    option proto 'dhcp'
    option ifname 'eth0.102' #so vlan 102
    option delegate '0'
    option defaultroute '0' # no default route
    option peerdns '0' #don't use any dns servers provided on this interface

and add this to the bottom of the file

config switch_vlan
        option device 'switch0' #assuming default config
        option vlan '3' #3rd vlan in the list, assuming one internal vlan and one wan vlan existing already  option ports '0t 5t' #tag the traffic on the wan port (no. 0) and eth0 op CPU (no. 5)
        option vid '102' #vlan 102,  IPTV
  1. setup igmpproxy, by adding this to /etc/config/igmpproxy
config igmpproxy
        option quickleave 1

config phyint IPTV_WAN                  
        option network IPTV_WAN
        option zone IPTV_WAN
        option direction upstream       
        list altnet 192.168.1.0/24      #this is your internal network, adjust as needed
        list altnet 0.0.0.0/0    #not that secure, rather confine this to the networks that the iptv solution uses, but this is how the edge-router is configured currently.

config phyint lan
        option network lan
        option zone lan
        option direction downstream
  1. firewall, edit /etc/config.firewall and add this section:
config zone
        option name 'IPTV_WAN'
        option input 'DROP' 
        option forward 'DROP'
        option output 'ACCEPT'
        option network 'IPTV_WAN'
        option masq '1'

config forwarding
    option dest 'IPTV_WAN'
    option src 'lan'
  1. reboot the router and hope for the best :slight_smile:

Thank you for all the replies, they are much appreciated. I'll start with the first thing I did, as asked by @mk24, connecting the STB directly to the media converter didn't work so it's definitively routed.

Also I realise I should have posted the config files I was using first, I apologise for not having done that to begin with.

I appreciate that you made some configuration files for me @johnnysl, besides switching vlan 101 and 102 I think it looks very similar, so when I get home today I will try out your configuration files with the correct mac address and vlan 101 for IPTV. I will let you know how that works out.

Yeah my bad, I switched the 2 vlans accidentally.
The specific firewall rules you have for iptv traffic shouldn’t be needed as the igmp proxy will dynamically add the right firewall rules at startup (as long as you have specified the right zones)

Does the router get a proper ip-address on the iptv interface? And what routes do you get pushed from that dhcp server?

I have now tried the configuration you gave me, @johnnysl, and I get as far as I got with my configuration, I get the test channel on IPTV, but none of the actual channels. So I feel like I am pretty close if the test/info channel works. just need to figure out what's missing for the others to work. I saw that this was a common problem among people with my ISP, but the configuration I shared has worked for many other users so I was hoping I had just missed something.

The router gets a private IP address (10.x.x.x/23) on the IPTV interface once the correct MAC address is entered in the configuration while the WAN interface gets a public IP. As for the routes I don't see any routes except the private IP address subnet being pushed.

I am also unsure if a static route to 172.21.0.0/16 needs to be setup on the IPTV interface.

At least t good you get the DHCP adres on the IPTV vlan.
Can you give me the output of “route”?
let’s see what was picked up from the dhcp server.
Can you also see what gateway the iptv interface uses? Most likely that is where we need to route the 172.xx network too, if it doesn’t exist in your routing table yet

Yes, I feel like I am really close, must just be something I am missing, either some firewall rule or something, since the DHCP gives out an IP address and the test channel works. As for what you requested, I will remove part of the IPs out of privacy concern, but here is the output of route -n:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.C.D.0        0.0.0.0         255.255.254.0   U     0      0        0 eth0.101

Also I can't find any gateway used for the IPTV interface so maybe that is part of the problem?

Did you star out the next hop here?
We need to route above 172.21.0.0/16 network to that next hop address.

For that we add this to /etc/config/network

config route
option interface 'IPTV_WAN'                                                       
option target '172.21.0.0/16'                                   
option gateway '10.C.D.*' 

Where the gateway address is likely either ending in .1 or .254, but it should match that next-hop address.

Sorry for my late reply.

Did you star out the next hop here?
We need to route above 172.21.0.0/16 network to that next hop address.

I did not star it out, I didn't even realise it was starred out so I went searching and it seems that people in different part of the country has different IP addresses there where the stars are, but always in the 10...* range.

For that we add this to /etc/config/network
Where the gateway address is likely either ending in .1 or .254, but it should match that next-hop address.

The good news is that this was the missing part. I looked at the IP address that was being delivered on the IPTV interface and just changed the last part to a .1 for the gateway. After that the IPTV started working. I have tested it and all the interactive functions seems to be working too. The only thing I have noticed is that I might get some chopping on the IPTV signal at times which I suspect might be with the igmp snooping.

I also read about a suspicion that the routers provided by the ISP aren't customer specific so I decided to try it out and just try a random MAC address in the MAC address range and the IPTV interface got a different IP address, but still worked exactly as it did with the MAC address of the router provided by the ISP. So seems like the routers provided by the ISP can be exchanged without any different in service, might be since the ISP is using P2P fiber instead of GPON so the limits are set at the ISP.

This made me think that I should be able to generalize the configuration for OpenWRT? The router provided by the ISP is somehow getting the gateway on the IPTV interface and the target route, can I somehow make the OpenWRT router also get this information automatically? That way if the ISP should make changes a reboot would be all that's needed.

Another thing is that right now in the igmpproxy I have configured altnet 0.0.0.0/0 but I don't know if there are any risks associated with running it like this, would there be any advantage to finding the correct IP range and would it be possible to automate it somehow so OpenWRT finds it by itself and updates it in case of changes?

Speaking of risks any special recommendation for what I should do to secure my OpenWRT? I am not sure how I feel about the ISP having access to just send whatever on the different VLANs, or maybe I am being overly cautious?

In the end, I am very appreciative of having found a solution that seems to work and I thank you for all the work getting me to this point, when I have some time I might just make a small guide for others that might be looking into this.

You can replace 0.0.0.0 with the 10.x.x.x/yy, 172.x.x.x/yy and your internal network range.
That should do it. Just add additional lines as I did in the example I made for you.

Did anyone mention udpoxy? I used it 6 years ago with IPTV and even over WiFi...
Today I would rather put a managed switch with igmp functions in front of the router and forget it altogether - they are cheap these days...

Neither is needed these days with igmpproxy support.

1 Like

I never understood how this worked...if my device is expecting UDP packets...why would it magically start accepting TCP packets?

Thank you, all the needed was the 172.x.x.x/yy rage in my igmpproxy config file and everything still works fine.

Any other recommendations for configuration changes I should do to secure my router?

It did require the playlist tune-up from

udp://@239.195.0.73:1234

to

http://192.168.1.1:7780/udp/239.195.0.73:1234

on every channel entry, but unloaded the network from being flooded by the multicast.

Again, I am personally a fan of port (or dedicated SSID)+vlan solution.

1 Like