This document describes how to set up IPTV on UniFi routing devices based on UniFi OS, such as the UniFi Dream Machine (UDM) or the UniFi Dream Router (UDR). These instructions have been tested with the IPTV network from KPN (ISP in the Netherlands). However, the general approach should be applicable for other ISPs as well.
For getting IPTV to work on the legacy UniFi Security Gateway, please refer to the following guide.
Fiber
|
+----------+
| FTTH NTU |
+----------+
|
VLAN4 - IPTV
VLAN6 - Internet
|
+--------+
| Router | - Ubiquiti UniFi device
+--------+
|
LAN
|
+--------+
| Switch | - Ubiquiti UniFi Switch (Optional)
+--------+
| | |
| | +-----------------------------+
| | |
| +-----------------+ |
| | |
+--------------+ +---------+ +-----+
| IPTV Decoder | | WiFi AP | | ... |
+--------------+ +---------+ +-----+
- KPN IPTV
- Netflix
Make sure you check the following prerequisites before trying the other steps:
The first step is to set up your internet connection to your ISP with the UniFi device acting as modem, instead of some intermediate device. These steps might differ per ISP, so please check the requirements for your ISP.
Below, we describe the steps for KPN. Feel free to update this document with the steps necessary for your provider.
If you are a customer of KPN, you can set up the WAN connection as follows:
internet
.internet
.To operate correctly, the IPTV decoders on the internal LAN possibly require additional DHCP options. You can add these DHCP options as follows:
Next, we will use the udm-iptv package to get IPTV working on your LAN. This package uses igmpproxy to route multicast IPTV traffic between WAN and LAN.
SSH into your machine and execute the commands below in UniFi OS (not in UbiOS).
sh -c "$(curl https://raw.githubusercontent.com/fabianishere/udm-iptv/master/install.sh -sSf)"
This script will install the udm-iptv
package onto your device.
The installation process supports various pre-defined configuration profiles for
popular IPTV providers. Below is a list of supported IPTV providers:
Provider | Country | Supported |
---|---|---|
KPN | NL | Yes |
XS4ALL | NL | Yes |
Tweak | NL | Yes |
Solcon | NL | Yes |
Telekom | DE | Manual configuration necessary |
MagentaTV | DE | Manual configuration necessary |
Swisscom | CH | Yes |
Init7 | CH | Yes |
MEO | PT | Yes |
BT | GB | Yes |
Vivo SP | BR | Yes - Tested with GPON TP-Link TX-6610 |
Vivo GVT | BR | Yes - Manual configuration necessary |
Telenor | NO | Yes |
PostTV | LU | Manual configuration necessary |
If your ISP is not supported, you may select the Custom profile, which allows you manually configure the package to your needs. We appreciate if you share the configuration so others can also benefit. See the profiles directory for examples of existing configuration profiles.
The package installs a service that is started during the boot process of your UniFi device and that will set up the applications necessary to route IPTV traffic. After installation, the service is automatically started.
If you experience any issues while setting up the service, please visit the Troubleshooting section.
Please remember to make a backup of your configuration before a firmware update. Currently, your configuration and installation might or might not persist across firmware updates depending on the type of upgrade (see #120).
You can modify the configuration of the service interactively as follows:
udm-iptv configure
See below for a reference of the available options to configure:
Option | Description |
---|---|
IPTV_WAN_INTERFACE | Interface on which IPTV traffic enters the router |
IPTV_WAN_RANGES | IP ranges from which the IPTV traffic originates (separated by spaces) |
IPTV_WAN_VLAN | ID of VLAN which carries IPTV traffic (use 0 if no VLAN is used) |
IPTV_WAN_DHCP | Boolean to indicate whether DHCP is enabled on the IPTV WAN (VLAN) interface |
IPTV_WAN_DHCP_OPTIONS | DHCP options to send when requesting an IP address |
IPTV_WAN_STATIC_IP | Static IP address to assign to the IPTV WAN (VLAN) interface (if DHCP is disabled) |
IPTV_WAN_MAC | Custom MAC address to assign to the IPTV WAN VLAN interface |
IPTV_LAN_INTERFACES | Interfaces on which IPTV should be made available |
IPTV_IGMPPROXY_DEBUG | Enable debugging for igmpproxy |
The configuration is written to /etc/udm-iptv.conf
(within UniFi OS).
Use the following command to upgrade udm-iptv
:
udm-iptv upgrade
If that command does not exist, please re-run the installation script.
To fully remove an udm-iptv
installation from your UniFi device, run the follow command:
udm-iptv uninstall
Below is a non-exhaustive list of issues that might occur while getting IPTV to run on your UniFi device, as well as troubleshooting steps. Please check these instructions before opening a discussion.
IPTV_LAN_INTERFACES
correctly to forward
to right interfaces (e.g., br4
for VLAN 4).MRT_INIT failed; Errno(92): Protocol not available
appears in
diagnostics, your kernel does not support multicast routing.If your issues persist, you may seek help on our Discussions page. Please keep GitHub Issues only for bugs or feature requests related to the project (no configuration-related issues).
When opening a discussion or reporting an issue, please share the name of your ISP as well as the diagnostics reported by our diagnostic tool:
udm-iptv diagnose
Questions, suggestions and contributions are welcome and appreciated! You can contribute in various meaningful ways:
The code is released under the GPLv2 license. See COPYING.txt.