2

My ISP provides IPTV feature, stream example: udp://@239.255.2.97:5500. I'd like to watch IPTV on macOS, so I used VLC.

Initially, IPTV didn't work at all. At first I thought that it's locked to ISP's mediabox somehow. Then I tested on various devices, it works everywhere: same Mac running Windows, Apple TV, Redmi phone and various iOS devices. After some googling I found solution: executing sudo sysctl net.inet.igmp.sendra=0 in terminal makes VLC play streams. (forcing default version to 2 isn't needed)

But then I noticed that streams stop exactly after 04:20 ±1s, only restarting stream makes it play again. This doesn't happen on any of the other devices / platforms mentioned above. I have 2 Macs - mbp running Mojave (SIP off) and mini running Catalina (SIP on) - happens on both, wired/wireless connection makes no difference, as well as software used (tried VLC and Kodi).

I have absolutely no idea how to fix this and couldn't find anything related on the internet, would really appreciate your help.

I'll give any info you need, preferably please post the necessary command to obtain the required info.

Default IGMP settings are the same on both Macs:

❯ sysctl net.inet.igmp
net.inet.igmp.recvifkludge: 1
net.inet.igmp.sendra: 1
net.inet.igmp.sendlocal: 1
net.inet.igmp.v1enable: 1
net.inet.igmp.v2enable: 1
net.inet.igmp.legacysupp: 0
net.inet.igmp.default_version: 3
net.inet.igmp.gsrdelay: 10
net.inet.igmp.debug: 0

Here's ifconfig -a of my Macs if it helps:

MBP on wireless:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
EHC250: flags=0<> mtu 0
EHC253: flags=0<> mtu 0
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>
    ether 58:b0:35:f4:e6:de 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (none)
    status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 58:b0:35:7a:2f:13 
    inet6 fe80::108d:a3b7:c229:4e24%en1 prefixlen 64 secured scopeid 0x7 
    inet 192.168.1.69 netmask 0xffffff00 broadcast 192.168.1.255
    inet6 2a00:1370:8131:b399:803:904:7e51:a50b prefixlen 64 autoconf secured 
    inet6 2a00:1370:8131:b399:7944:3d6c:3303:58b prefixlen 64 autoconf temporary 
    inet6 2a00:1370:8131:b399:f628:52b3:28ae:8d54 prefixlen 64 dynamic 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
    lladdr d8:30:62:ff:fe:f0:e9:aa 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect <full-duplex>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 0a:b0:35:7a:2f:13 
    media: autoselect
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
    inet6 fe80::83e0:2ce2:8c0d:e1a7%utun0 prefixlen 64 scopeid 0xa 
    nd6 options=201<PERFORMNUD,DAD>
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=3<RXCSUM,TXCSUM>
    ether 5a:b0:35:4f:b0:64 
    inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
    inet6 fe80::58b0:35ff:fe4f:b064%bridge100 prefixlen 64 scopeid 0xb 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en0 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive

Mini on wired:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=50b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV,CHANNEL_IO>
    ether 14:9d:99:7c:63:cc 
    inet6 fe80::ee:83f2:5357:c607%en0 prefixlen 64 secured scopeid 0x4 
    inet6 2a00:1370:8131:b399:4b6:9a5b:7712:e480 prefixlen 64 autoconf secured 
    inet6 2a00:1370:8131:b399:b837:ed92:a5dc:5859 prefixlen 64 autoconf temporary 
    inet6 2a00:1370:8131:b399:2846:2489:ad80:fc9b prefixlen 64 dynamic 
    inet 192.168.1.65 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (1000baseT <full-duplex,flow-control>)
    status: active
en6: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:de:48:00:11:22 
    inet6 fe80::aede:48ff:fe00:1122%en6 prefixlen 64 scopeid 0x5 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (100baseTX <full-duplex>)
    status: active
ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    options=400<CHANNEL_IO>
    ether 3e:22:fb:a8:1b:69 
    media: autoselect
    status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=400<CHANNEL_IO>
    ether 3c:22:fb:a8:1b:69 
    inet6 fe80::805:ed7:b180:94c0%en1 prefixlen 64 secured scopeid 0x7 
    inet 169.254.31.79 netmask 0xffff0000 broadcast 169.254.255.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (<unknown type>)
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    options=400<CHANNEL_IO>
    ether 0e:22:fb:a8:1b:69 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    options=400<CHANNEL_IO>
    ether a6:cb:ac:da:de:6b 
    inet6 fe80::a4cb:acff:feda:de6b%awdl0 prefixlen 64 scopeid 0x9 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=400<CHANNEL_IO>
    ether a6:cb:ac:da:de:6b 
    inet6 fe80::a4cb:acff:feda:de6b%llw0 prefixlen 64 scopeid 0xa 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=460<TSO4,TSO6,CHANNEL_IO>
    ether 82:fa:d0:e2:c0:01 
    media: autoselect <full-duplex>
    status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=460<TSO4,TSO6,CHANNEL_IO>
    ether 82:fa:d0:e2:c0:00 
    media: autoselect <full-duplex>
    status: inactive
en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=460<TSO4,TSO6,CHANNEL_IO>
    ether 82:fa:d0:e2:c0:05 
    media: autoselect <full-duplex>
    status: inactive
en5: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=460<TSO4,TSO6,CHANNEL_IO>
    ether 82:fa:d0:e2:c0:04 
    media: autoselect <full-duplex>
    status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 82:fa:d0:e2:c0:01 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 11 priority 0 path cost 0
    member: en3 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 12 priority 0 path cost 0
    member: en4 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 13 priority 0 path cost 0
    member: en5 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 14 priority 0 path cost 0
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
    inet6 fe80::93a6:b158:9d1a:86ee%utun0 prefixlen 64 scopeid 0x10 
    nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
    inet6 fe80::fef3:61fc:6994:82c4%utun1 prefixlen 64 scopeid 0x11 
    nd6 options=201<PERFORMNUD,DAD>
en8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=400<CHANNEL_IO>
    ether da:1c:79:6f:03:9d 
    inet6 fe80::18db:f66f:c81d:54d0%en8 prefixlen 64 secured scopeid 0x14 
    inet 169.254.172.225 netmask 0xffff0000 broadcast 169.254.255.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (100baseTX <full-duplex>)
    status: active

1 Answer 1

1

Solution. Add the following rules to /etc/pf.conf:

anchor "multicast" {
  pass proto igmp allow-opts
  pass quick from any to { 224.0.0.0/4 ff00::/8 } allow-opts
}

(also possible to put rules in a separate file and attach them to anchor, see PF manual)

sudo sysctl net.inet.igmp.sendra=0 hack is no longer needed.

Source of the issue. Private Internet Access app enables PF firewall and loads its own rules which apparently disable IGMP / multicast. This happens even when the PIA app isn't running. I've contacted PIA support hoping they'd fix it.

Investigation details.

  • tcpdump revealed that Macs don't respond to IGMP requests from the router.
  • the magic 04:20 time is 125 * 2 + 10, where 125 is query interval and 10 is query response timeout set in IGMP proxy on my router.
  • I discovered that macOS has PF firewall which is disabled by default, but it was enabled on both machines. Disabling it via sudo pfctl -d fixed IPTV and IGMP responses.
  • disabling rules found in /etc/pf.conf (Apple default ones) didn't have any effect, then I discovered PIA's rules via sudo pfctl -sr: anchor "com.privateinternetaccess.vpn/*" all.
  • grabbed IGMP + multicast rules (listed in the solution) from Murus (UI for PF) and voilà!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .