Ok I’ve got a working config now, I will post my results tomorrow!
It was a long road, but I finally have IPTV working!
Few things to clean up, might need some help with that
I currently have a fulling working config in /etc/config/igmpproxy
when I start it using: igmpproxy /etc/config/igmpproxy there is no issue at all
When I start igmpproxy using /etc/init.d/igmpproxy start
that is where it doesn’t work, because it uses the config at /var/etc/igmpproxy.conf
This file is empty and I would like to either replace it with the working conig, or just always start with the working config.
Now I have tried replacing the CONFIGFILE=/var/etc/igmpproxy.conf in the init.d/igmpproxy script, but it doesnt work for some reason.
Does anyone know how I can just use my working config?
Maybe i can assist you. Could you provide me the contents of the following files:
/etc/config/igmpproxy
/etc/config/network
/etc/init.d/igmpproxy
/var/etc/igmpproxy.conf
Maybe one of these files contains a clue as to what is happening with the config and why it doesn’t work.
/etc/config/igmpproxy:
quickleave
phyint eth1.4 upstream ratelimit 0 threshold 1
altnet 192.168.1.0/24
altnet 10.14.2.0/24
phyint br-lan downstream ratelimit 0 threshold 1
/etc/config/network
config interface ‘loopback’
option ifname ‘lo’
option proto ‘static’
option ipaddr ‘127.0.0.1’
option netmask ‘255.0.0.0’
config globals ‘globals’
option ula_prefix ‘fde1:d8c0:e39f::/48’
config interface ‘lan’
option type ‘bridge’
option proto ‘static’
option ifname ‘eth0 eth2’
option ipaddr ‘192.168.1.1’
option netmask ‘255.255.255.0’
option igmp_snooping ‘1’
option defaultroute ‘0’
option peerdns ‘0’
option stp ‘1’
option delegate ‘0’
config interface ‘wan’
option ifname ‘eth1.34’
option proto ‘dhcp’
option defaultroute ‘1’
option peerdns ‘1’
config interface ‘iptv’
option proto ‘dhcp’
option ifname ‘eth1.4’
option defaultroute ‘0’
option peerdns ‘0’
option delegate ‘0’
config route
option interface ‘iptv’
option target ‘185.6.48.0’
option netmask ‘255.255.255.192’
option gateway ‘10.10.56.1’
config switch
option name ‘switch0’
option reset ‘1’
option enable_vlan ‘1’
config switch_vlan
option device ‘switch0’
option vlan ‘1’
option ports ‘0 1 2 3 5’
config switch_vlan
option device ‘switch0’
option vlan ‘2’
option ports ‘4 6’
/etc/init.d/igmpproxy
#!/bin/sh /etc/rc.common
Copyright (C) 2010-2014 OpenWrt.org
START=99
USE_PROCD=1
PROG=/usr/sbin/igmpproxy
CONFIGFILE=/var/etc/igmpproxy.conf
igmpproxy supports both a debug mode and verbosity, which are very useful
when something isn’t working.
Debug mode will print everything to stdout instead of syslog. Generally
verbosity should NOT be set as it will quickly fill your syslog.
Put any debug or verbosity options into IGMP_OPTS
Examples:
OPTIONS=“-d -v -v” - debug mode and very verbose, this will land in
stdout and not in syslog
OPTIONS=“-v” - be verbose, this will write aditional information to syslog
OPTIONS=“”
igmp_header() {
local quickleave
config_get_bool quickleave “$1” quickleave 0mkdir -p /var/etc rm -f /var/etc/igmpproxy.conf [ $quickleave -gt 0 ] && echo "quickleave" >> /var/etc/igmpproxy.conf [ -L /etc/igmpproxy.conf ] || ln -nsf /var/etc/igmpproxy.conf /etc/igmpproxy.conf
}
igmp_add_phyint() {
local network direction altnets device up
config_get network $1 network
config_get direction $1 direction
config_get altnets $1 altnet
local status="$(ubus -S call "network.interface.$network" status)" [ -n "$status" ] || return
json_load "$status" json_get_var device l3_device json_get_var up up
[ -n "$device" -a "$up" = "1" ] || { procd_append_param error "$network is not up" return; }
append netdevs "$device"
[[ "$direction" = "upstream" ]] && has_upstream=1
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
if [ -n "$altnets" ]; then local altnet for altnet in $altnets; do echo -e "\taltnet $altnet" >> /var/etc/igmpproxy.conf done fi
}
igmp_add_network() {
local network
config_get network $1 network procd_add_interface_trigger "interface.*" $network /etc/init.d/igmpproxy reload
}
igmp_add_firewall_routing() {
config_get network $1 network
config_get direction $1 direction
[[ "$direction" = "downstream" ]] || return 0
json_add_object "" json_add_string type rule json_add_string src "$upstream" json_add_string dest "$network" json_add_string family ipv4 json_add_string proto udp json_add_string dest_ip "224.0.0.0/4" json_add_string target ACCEPT json_close_object
}
igmp_add_firewall_network() {
config_get network $1 network
config_get direction $1 direction
json_add_object "" json_add_string type rule json_add_string src "$network" json_add_string proto igmp json_add_string target ACCEPT json_close_object
[[ "$direction" = "upstream" ]] && { upstream="$network" config_foreach igmp_add_firewall_routing phyint }
}
service_triggers() {
procd_add_reload_trigger “igmpproxy”
}
start_service() {
has_upstream=
netdevs=
config_load igmpproxy
config_foreach igmp_header igmpproxy config_foreach igmp_add_phyint phyint [ -n "$has_upstream" ] || return
procd_open_instance procd_set_param command $PROG [ -n "$OPTIONS" ] && procd_append_param $OPTIONS procd_append_param command $CONFIGFILE procd_set_param file $CONFIGFILE procd_set_param netdev $netdevs procd_set_param respawn procd_open_trigger config_foreach igmp_add_network phyint procd_close_trigger
procd_open_data
json_add_array firewall config_foreach igmp_add_firewall_network phyint json_close_array
procd_close_data
procd_close_instance
}
service_started() {
procd_set_config_changed firewall
}
/var/etc/igmpproxy.conf
Is empty!
That file is not in proper UCI format. And that is the likely reason that /var/etc/igmpproxy.conf is empty because startup script doesn’t understand what you have written.
Here is a example what it should look:
https://dev.openwrt.org/browser/packages/net/igmpproxy/files/igmpproxy.config?rev=31333
And remyvv has some examples earlier in this thread.
What @white says is correct. Could you try the following:
/etc/config/igmpproxy:
config igmpproxy
option quickleave 1
config phyint wan
option network iptv
option direction upstream
list altnet 192.168.1.0/24
list altnet 10.14.2.0/24
config phyint lan
option network lan
option direction downstream
This should generate the same /var/etc/igmpproxy.conf file, and should have the same result.
Yeap this works now! great!
Thank you all so much for helping!
So now to try and help others by posting my config/steps
The first thing I did was get the basic config right.
This means settings up the VLAN’s on the interfaces.
For me internet is provided over vlan34 by my ISP.
IPTV is provided over vlan4 by my ISP.
The full configs are to be found in the imgurl album at the bottom of this post
So next for me was the default route.
My ISP said I had to setup a defaultroute to 185.6.48.0/26 over the gateway IP I received from vlan4.
I checked this using my notebook, directly on the ISP ethernet cable.
I set my adapter to vlan4 and waited to get an DHCP lease, which gave me a gateway.
Then I set my Firewall zone settings according to the following:
Then the “last” thing to do was the IGMPProxy/IGMPSnooping
To do this I first needed to make two firewall rules
The first rule is the Allow-IGMP rule:
The next rule is the Allow-IGMP-Proxy rule:
So now we are prepared for the IGMPProxy I installed the igmpproxy package, I used the webinterface but you can also use opkg.
It will automatically create the file /etc/config/igmpproxy
Now let’s first edit the lan network to enable igmpsnooping.
use the command:
vi /etc/config/network
and look for the config interface ‘lan’, it should look like this:
config interface 'lan' option type 'bridge' option proto 'static' option ifname 'eth0 eth2' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option igmp_snooping '1' option defaultroute '0' option peerdns '0' option stp '1' option delegate '0'
Where 192.168.1.1 is replaced by your router lan IP.
And ofcours the ifname has all interfaces you want in your lan, for me it’s eth0 and eth2, but you can also add your radio’s.
While you’re in this file also check the config interface ‘iptv’ and make sure option defaultroute is set to ‘0’
Ok so now that the network and firewall are set, let’s get the igmpproxy working.
use the command:
vi /etc/config/igmpproxy
and populate the file with the following information:
config igmpproxy
option quickleave 1
config phyint wan
option network iptv
option direction upstream
list altnet 192.168.1.0/24
config phyint lan
option network lan
option direction downstream
Now in here make sure to change 192.168.1.0/24 for your lan subnet/ip
After saving this you should test it using the following command:
igmpproxy -vdd /etc/config/igmpproxy
This shjould give you a lot of output, which is fine.
Make sure to test your iptv at this moment.
If it doesn’t work thats not a problem!
When you have tried your IPTV and it hasn;t worked, check the output from the above command
For me it showed a lot of rules with
“The source address x.x.x.x for group y.y.y.y, is not in any valid net for upstream VIF”
Where x.x.x.x is an ipadress and y.y.y.y is a netmask
What I did to get my igmpproxy working is to add the whole subnet of the x.x.x.x ip to my igmpproxy altnets.
For instance, for me the whole output was:
“The source address 10.10.54.34 for group 239.255.255.250, is not in any valid net for upstream VIF”
So I went back into /etc/config/igmpproxy and I added the subnet as an altnet:
config igmpproxy
option quickleave 1
config phyint wan
option network iptv
option direction upstream
list altnet 192.168.1.0/24
list altnet 10.14.2.0/24
config phyint lan
option network lan
option direction downstream
After this I stopped the igmpproxy and started it again using the same command: igmpproxy /etc/config/igmpproxy
The above fixed the problem for me
Now, if you want to be sure igmpproxy works, use the command: ps | grep igmp
If it shows an output along thje lines of:
3100 root 736 S /usr/sbin/igmpproxy /var/etc/igmpproxy.conf
or
3100 root 736 S /usr/sbin/igmpproxy /etc/config/igmpproxy.conf
It is running
The config files I used can be found here:
/etc/config/firewall
/etc/config/igmpproxy
/etc/config/igmpproxy
Now I made a whole album of images in imgur of the whole thing.
So you can help yourself over here:
the problem of igmpproxy starting too soon on boot is still persisting.
Is there some1 who can help me … it won’t work
Anyone i’m sick of it
Interesting.
Can you post versions of:
- Turris OS
- OpenWRT
- igmpproxy
Cause I was trying to setup IPTV multicasting with TurrisOS 6.0.4 (openwrt 21.02) with igmpproxy version 0.3 and for a unknown reason it wasn’t getting any stream. Even on a different router with openwrt 22.03.2 and igmpproxy 0.4 it wasn’t working.
Just with the same different router and oWRT 21.02.5 and igmpproxy 0.2.1 I got it to work.