必须在 UniFi OS 而非 UbiOS 中执行安装脚本;固件升级后配置和安装可能不保留,升级前需备份;多台 IPTV 解码器时需关闭 quickleave,否则一台切换频道会中断其他解码器的流。
udm-iptv
fabianishereGPL-2.0长期未更新在 UniFi Dream Machine(Pro)上配置路由式 IPTV 的辅助脚本,解决运营商组播电视无法直接接入 UniFi 网络的问题。
Helper tool for configuring routed IPTV on the UniFi Dream Machine (Pro)
sh -c "$(curl https://raw.githubusercontent.com/fabianishere/udm-iptv/master/install.sh -sSf)"运行 UniFi OS 的 Ubiquiti 路由设备(如 UDM、UDR),内核需支持组播路由;README 未提及显存或 CPU 运行要求。
在 UniFi Dream Machine 等 UniFi OS 路由设备上配置 IPTV 组播路由的辅助工具
在 UniFi Dream Machine(Pro)上配置路由式 IPTV 的辅助脚本,解决运营商组播电视无法直接接入 UniFi 网络的问题。
核心能力
- 用 igmpproxy 在 WAN 与 LAN 之间转发组播 IPTV 流量
- 内置 KPN、XS4ALL、Swisscom、MEO 等多家运营商配置模板
- 安装后注册开机自启服务,自动完成 IPTV 路由配置
- 提供 udm-iptv configure 交互式修改 WAN/LAN/VLAN 等参数
- 附带 diagnose 诊断命令,便于排查组播路由问题
容易踩的坑
- v3.0.6udm-iptv v3.0.6最新正式版2025-04-21 · 2025-04-21 21:29 UTC
Source: udm-iptv Version: 3.0.6 Distribution: stable Urgency: medium Maintainer: Fabian Mastenbroek [email protected] Timestamp: 1745272800 Date: Mon, 21 Apr 2025 22:00:00 +0000 Changes: udm-iptv (3.0.6) stable; urgency=medium .
- Support for UniFi Dream Router 7 (UDR7)
- Support for UniFi Cloud Gateway Fiber
- Support for UniFi Gateway Max
- Support for UniFi Cloud Gateway Max
- Support for UDM Pro Max
- Freedom Internet (NL) IPTV profile
- Update supported WAN ranges for KPN and Init7
- Support quickleave with improxy
- v3.0.5udm-iptv v3.0.52024-05-01 · 2024-05-01 23:00 UTC
查看更新说明
Source: udm-iptv Version: 3.0.5 Distribution: stable Urgency: medium Maintainer: Erik Post [email protected] Timestamp: 1714305600 Date: Sun, 28 Apr 2024 12:00:00 +0000 Changes: udm-iptv (3.0.5) stable; urgency=medium .
- Support for UCG Ultra in configuration
- v3.0.4udm-iptv v3.0.42023-12-09 · 2023-12-09 12:43 UTC
查看更新说明
Source: udm-iptv Version: 3.0.4 Distribution: stable Urgency: medium Maintainer: Fabian Mastenbroek [email protected] Timestamp: 1702126800 Date: Sat, 09 Dec 2023 13:00:00 +0000 Changes: udm-iptv (3.0.4) stable; urgency=medium .
- Support UXG Lite in configuration
- v3.0.3udm-iptv v3.0.32023-10-21 · 2023-10-21 14:52 UTC
查看更新说明
Source: udm-iptv Version: 3.0.3 Distribution: stable Urgency: medium Maintainer: Fabian Mastenbroek [email protected] Timestamp: 1687896000 Date: Tue, 27 Jun 2023 20:00:00 +0000 Changes: udm-iptv (3.0.3) stable; urgency=medium .
- Change default from igmpproxy to impproxy
- v3.0.2udm-iptv v3.0.22023-07-02 · 2023-07-02 11:52 UTC
查看更新说明
Source: udm-iptv Version: 3.0.2 Distribution: stable Urgency: medium Maintainer: Fabian Mastenbroek [email protected] Timestamp: 1687896000 Date: Tue, 27 Jun 2023 20:00:00 +0000 Changes: udm-iptv (3.0.2) stable; urgency=medium .
- Add support for UGX Pro (firmware 3.0.x)
- Delete the downloaded Debian packages after installation
- Fix typo in changelog and control files
- Add debconf i18n support
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
IPTV on UniFi OS
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.
Contents
- Global Design
- Prerequisites
- Setting up Internet Connection
- Configuring Internal LAN
- Configuring Helper Tool
- Troubleshooting and Known Issues
Global Design
Fiber
|
+----------+
| FTTH NTU |
+----------+
|
VLAN4 - IPTV
VLAN6 - Internet
|
+--------+
| Router | - Ubiquiti UniFi device
+--------+
|
LAN
|
+--------+
| Switch | - Ubiquiti UniFi Switch (Optional)
+--------+
| | |
| | +-----------------------------+
| | |
| +-----------------+ |
| | |
+--------------+ +---------+ +-----+
| IPTV Decoder | | WiFi AP | | ... |
+--------------+ +---------+ +-----+
- KPN IPTV
- Netflix
Prerequisites
Make sure you check the following prerequisites before trying the other steps:
- The kernel on your UniFi device must support multicast routing in order to support IPTV. Please upgrade to the latest firmware.
- The switches in-between the IPTV decoder and the UniFi device should have IGMP snooping enabled. They do not need to be from Ubiquiti necessarily.
- The FTTP NTU (or any other type of modem) of your ISP must be connected to one of the WAN ports of your UniFi device.
Setting up Internet Connection
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.
KPN
If you are a customer of KPN, you can set up the WAN connection as follows:
- In your UniFi Dashboard, go to Settings > Internet.
- Select the WAN port that is connected to the FTTP NTU.
- Enable VLAN ID and set it to 6 for KPN.
- Set IPv4 Connection to PPPoE.
- For KPN, Username should be set to
internet. - For KPN, Password should be set to
internet.
Configuring Internal LAN
To operate correctly, the IPTV decoders on the internal LAN possibly require additional DHCP options. You can add these DHCP options as follows:
- In your UniFi Dashboard, go to Settings > Networks.
- Select the LAN network on which IPTV will be used. We recommend creating a separate LAN network for IPTV traffic if possible in order to reduce interference of other devices on the network.
- Enable Advanced Configuration > IGMP Snooping, so IPTV traffic is only sent to devices that should receive it.
Configuring Helper Tool
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.
Installation
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.
Installation across Firmware Updates
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).
Configuration
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 |
| IPTV_IGMPPROXY_DISABLE_QUICKLEAVE | Boolean to disables the quickleave feature for the IGMP Proxy. Set this to true if you have more than one IPTV decoder. Supported by both improxy and igmpproxy. |
The configuration is written to /etc/udm-iptv.conf (within UniFi OS).
Upgrading
Use the following command to upgrade udm-iptv:
udm-iptv upgrade
If that command does not exist, please re-run the installation script.
Removal
To fully remove an udm-iptv installation from your UniFi device, run the follow command:
udm-iptv uninstall
Troubleshooting
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.
- Check if your IPTV receiver is on the right VLAN
Your IPTV receiver might not be VLAN to which the IPTV traffic is forwarded. - Check if IPTV traffic is forwarded to the right VLAN
Make sure that you have configuredIPTV_LAN_INTERFACEScorrectly to forward to right interfaces (e.g.,br4for VLAN 4). - If you have more than one IPTV decoder, disable the quickleave feature Quickleave is enabled in the default configuration for improxy (the default IGMP proxy) and igmpproxy. If you have multiple IPTV decoders, quickleave will stop a stream for all decoders when just one decoder changes to a different stream.
- Check if your kernel supports multicast routing
IfMRT_INIT failed; Errno(92): Protocol not availableappears in diagnostics, your kernel does not support multicast routing. - Check if your issue has been reported already
Use the GitHub search functionality to check if your issue has already been reported before.
Getting Help or Reporting an Issue
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
Contributing
Questions, suggestions and contributions are welcome and appreciated! You can contribute in various meaningful ways:
- Report a bug through GitHub issues.
- Contribute improvements to the documentation (e.g., configuration for other ISPs).
- Help answer questions on our Discussions page.
License
The code is released under the GPLv2 license. See COPYING.txt.