Allow multicast and IGMP with UFW for IPTV to work

If you have access to multicast television in your network (such as UNINETT’s IPTV offer), and you’re running Ubuntu’s «Uncomplicated Firewall» aka. ufw, you’ll find that you’re unable to actually watch any of the channels. Here’s how you can adjust your firewall to receive the UDP multicast traffic:

sudo ufw allow in proto udp to
sudo ufw allow in proto udp from

This will take care of the coming and going UDP packets, but you also need to allow IGMP packets through. I haven’t found any command to make this change, so instead, you need to open up the file
and add the following lines somewhere before the COMMIT line:

# allow IGMP
-A ufw-before-input -p igmp -d -j ACCEPT
-A ufw-before-output -p igmp -d -j ACCEPT

Now you can reload the firewall and you should be able to watch that glorious multicast IPTV.

3 kommentarer til «Allow multicast and IGMP with UFW for IPTV to work»

  1. Actually you don’t need to allow igmp because that is only needed on OUTPUT, not INPUT and with ufw OUTPUT default policy is ACCEPT.
    This also means you don’t have to add:
    sudo ufw allow in proto udp to
    also, I’d think you must have meant:
    sudo ufw allow out proto udp to
    (though it isn’t needed)

Legg igjen en kommentar

Din e-postadresse vil ikke bli publisert. Obligatoriske felt er merket med *

Dette nettstedet bruker Akismet for å redusere spam. Lær om hvordan dine kommentar-data prosesseres.