Need help getting IPTV to work on own router

Hi,

Sorry for English. I’ve been trying to immerse myself more with dutch language hence why I subscribed for TV with freedom.

I am using my own router running openwrt which has the proper setup for Internet. The videos on demand from my TV receiver(amino air 7) worked fine, the live TV did not which brings me to the issues I’m facing trying to set that up.

I’ve been trying to setup so LAN 3 port on my router will connect directly or in-directly through a switch to the IPTV box. (both ways currently don’t work)

I’ve set

CPU(eth0) CPU(eth1) Lan 1 Lan 2 Lan 3 Lan 4 wan
T Off U U U U Off
Off T Off Off T Off T
Off T Off Off Off Off T

Rows being VLAN 1, 4 and 6.

If I understand correctly eth0 is a CPU connection to the LAN ports and eth1 to the physical port where I connect the internet cable.

I didn’t change my WAN and previous LAN configuration for the interfaces.
WAN interface is type PPPoE using device eth1.6.
LAN interface set as static address uses br-lan which bridges devices eth0.1 and wlan0.
I created IPTV interface as DHCP client and linked to eth1.4.
Enabled IGMP snooping for LAN and IPTV.

firewall:
LAN: accept input output and forward. no masquerading. Allow forward to WAN.
WAN: reject input and forward, accept output. allow forward from source zones IPTV and lan.
IPTV: accept all 3 and forward to destination zone wan.

I’ve enabled igmpproxy

config igmpproxy
option quickleave 1
option verbose 1

config phyint
option network IPTV
option direction upstream
list altnet 185.24.175.0/24
list altnet 185.41.48.0/24
list altnet 217.166.224.0/22
list altnet 172.16.25.0/24

config phyint
option network lan
option direction downstream
list altnet 10.10.0.0/17

I only see a small amount of data going through IPTV

IP IPTV IP > all-routers.mcast.net: igmp leave 239.255.255.250
IP 172.16.67.12 > all-systems.mcast.net: igmp query v2
IPTV IP > mdns.mcast.net: igmp v2 report mdns.mcast.net

Through different configurations, I’ve only succeeded in either getting the IPTV device to connect to Ethernet and immediately complain there’s no internet asking to retry
or stuck at setting up networking screen with the amino logo

Maybe this instruction will help with the settings: GitHub - bartschermer/Freedom-IPTV-with-OPNsense: How I configured my OPNsense firewall to enable Canal Digitaal IPTV via Freedom.nl internet (Netherlands)

It’s maybe not exactly the same hardware as you have and not the same configuration options, but maybe you can use it as a cheat-sheet.

Or somebody with the same hardware on the community can help you further. :slight_smile:

It does help a bit. I see most of the configuration is set over NAT/Firewall rules where as mine is pretty minimal :thinking:

Also InternalIPTV interface most likely means I need another interface for IPTV probably on eth0 to communicate with the lan ports. I had the impression also that I need to keep vlan ID 4 so the traffic reaches the box with tag 4 but he changes it to 40.
Adds some confusion in the matter so maybe something to closer to openwrt interface would make things clearer. Also when I try to configure eth0.4 and set it up, my devices lose internet access for some reason.
Will keep trying, hopefully I can figure out something in the meantime.

It seems your device still uses a switch, that’s fine, but it means you get indeed “cpu” ports.

I think you managed to get most of it well, but you’re missing a few bits.

First: IPTV uses VLAN4 for multicast traffic, you need igmpproxy for that as you already figured out. However you also need to route traffic over that interface and use masquerading. This is a firewall thing.
Second, VLAN6 is used for interactive features (basically over ordinary internet).

So, you want to define an interface iptv: (/etc/config/network)

config interface 'iptv'
    option proto 'dhcp'
    option device 'lan0.4'  # need to figure that one out for your router, luci will tell, probably wan.4 for you
    option vendorid 'IPTV_RG'
    option hostname '*'
    option defaultroute '0'  # don't use this for normal traffic routing
    option peerdns '0'
    option gateway '0'

This interface is the one that gets an IP address and is used for the multicast traffic.

Second you (probably) want to have an interface for the animo box: (/etc/config/network)

config interface 'stbitv'
    option proto 'static'
    option device 'br-lan.7'  # this needs to be changed to whatever is your vlan, might be eth0.T in your case
    option ipaddr '192.168.10.1'  # obviously this is just any range you like
    option netmask '255.255.255.0'
    option igmp_snooping '1'

This is the interface you’ll run dhcp for, such that the animo gets an address: (/etc/config/dhcp)

config dhcp 'stbitv'
    option interface 'stbitv'
    option start '100'
    option limit '150'
    option leasetime '12h'

Again, this is just example, you can change the limits as you want.

Now comes the glue to it all. In your /etc/config/firewall:

config zone
    option name 'stbitv'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'
    list network 'stbitv'

config zone
    option name 'iptv'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq '1'
    option mtu_fix '1'
    list network 'iptv'

config forwarding
    option src 'stbitv'
    option dest 'iptv'

config forwarding
    option src 'stbitv'
    option dest 'wan'

What happens here is that we setup iptv like “wan”, where we apply masquerading on outbound traffic. Next we allow stbitv network to forward both to “wan” and “iptv” networks (e.g. internet and TV broadcast).

The igmpproxy we connect the iptv and stbitv networks: (/etc/config/igmpproxy)

config igmpproxy
    option quickleave 1
#   option verbose [0-3](none, minimal[default], more, maximum)

config phyint
        option network iptv
        option zone iptv
        option direction upstream
        list altnet 0.0.0.0/0

config phyint
        option network stbitv
        option zone stbitv
        option direction downstream

Connect your animo to a port that has VLAN T untagged.

After all this you should see some things:

  • your iptv interface has an address (wan.4 I think in your case) that’s probably some 10.xxx
  • ip route show should show a route via 10.xxx dev wan4 proto static
  • igmpproxy running (enable if you haven’t to survive a reboot)

if not, and you rebooted the whole thing just to be sure, it is likely I missed something in the config description above :slight_smile:

Yes thank you meh.

It finally works.
First of all I updated the firmware of my openwrt. v19 → v23. Idk why but the second CPU port disappeared so I had only eth0 to work with which made it easier by a bit.

I created the interface for IPTV using wan.4.
I created another interface as you said to face the internal devices. tagged vlan 7, bridging eth0.7 and lan3. (I assume if i want a switch in between this will have to be tagged too and let switch untagged it when it reaches the STB.
One important option that affects LiveTV was the sendopts ‘121’ option for the IPTV interface.
I believe the main 2 mistakes I was making was not understanding the device itself needs to have the traffic untagged. Kept passing the data from IPTV with either tag 4 or 7. The other being missing the internal facing interface. Thinking of it like you said and setting it up like “wan” helped.

I’ve uploaded most of the configuration on github which will update again when I add a switch to the mix.
Hopefully someone finds it helpful.

Thank you very much for your help!

Dit topic is 24 uur na het laatste antwoord automatisch gesloten. Nieuwe antwoorden zijn niet meer toegestaan.