Skip to content

Instantly share code, notes, and snippets.

@danielb7390
Last active October 14, 2025 06:42
Show Gist options
  • Select an option

  • Save danielb7390/3311fd5c5fc1fc53c79dabdfc4eb70c9 to your computer and use it in GitHub Desktop.

Select an option

Save danielb7390/3311fd5c5fc1fc53c79dabdfc4eb70c9 to your computer and use it in GitHub Desktop.
Mikrotik Vodafone IPTV Configuration
# Configuration for Vodafone Portugal IPTV service.
# Tested with VBOX Pro 4k.
# Also tested with a older Cisco Mediaroom, needs some more stuff, check the end of the file.
# Feel free to leave comments with suggestions and/or improvements!
# Credit to the original users that provided the pfsense config found at https://forum.zwame.pt/threads/iptv-net-vodafone-com-pfsense.1049250
# 2023-08-01 20:57:50 by RouterOS 7.10.1
# model = RB5009UPr+S+
# example interfaces using a sfp module
/interface vlan
add interface=sfp-sfpplus1 name=sfp-iptv vlan-id=105
add interface=sfp-sfpplus1 name=sfp-wan vlan-id=100
# make sure to set igmp-snooping=yes in the main lan bridge interface
# Add iptv to the WAN list
/interface list member add interface=sfp-iptv list=WAN
# Add dhcp client to iptv interface
/ip dhcp-client add add-default-route=special-classless default-route-distance=210 interface=sfp-iptv use-peer-dns=no use-peer-ntp=no
# Add firewall rules to accept the IPTV traffic
/ip firewall filter
add action=accept chain=input comment="iptv: Accept IGMP" connection-state="" \
dst-address=224.0.0.0/4 dst-address-list="" in-interface=sfp-iptv protocol=igmp
add action=accept chain=forward comment="iptv: Accept and forward udp multicast iptv traffic" \
connection-state=established,related,new,untracked dst-address=\
224.0.0.0/4 in-interface=sfp-iptv protocol=udp
# activate and configure igmp-proxy
/routing igmp-proxy set query-interval=30s quick-leave=yes
/routing igmp-proxy interface
add interface=bridge
add alternative-subnets=10.2.0.0/18,224.0.0.0/4,10.56.192.0/19 interface=sfp-iptv upstream=yes
#
# Extra stuff for the old Cisco MediaRoom STBs
#
# Create a DHCP option with the IPTV DNS servers
/ip dhcp-server option add code=6 name=iptv_dns value="'87.103.119.196''213.30.36.212'"
# Connect the STB to the network, go to IP => DHCP Server => Leases, find it there double click it and "Make Static".
# Double click it again, and change the "DHCP Options" dropdown to the option created before "iptv_dns"
# The rule "iptv: Accept and forward udp multicast iptv traffic" can't be that specific, had to remove the dst-address part
# Not sure what are the security implications of doing this tho, if anyone has some information to share feel free
/ip firewall filter add action=accept chain=forward comment="iptv: Accept and forward udp iptv traffic" \
connection-state=established,related,new,untracked in-interface=sfp-iptv protocol=udp
@danielb7390
Copy link
Author

fs.com GPON-ONU-34-20BI

@lopesdasilva
Copy link

@danielb7390 tens um filtro para o CATV (RF) com este sfp ?

@danielb7390
Copy link
Author

Sim, comprei um passivo no aliexpress. Procura por "WDM SC/APC" o que comprei é o mais barato, uma caixa branca sem fonte de alimentação.

@sleepgoing
Copy link

Olá, eu tenho um RB760iGS ligado ao router da vdf que é um HG8247X6-8N e tb tenho um switch ligado ao RB que é o CRS326-24G-2S+RM. Este setup que partilhaste aqui também funciona com este equipamento?

@danielb7390
Copy link
Author

Não. Para fazeres este setup precisas de um ONT em separado.

@sleepgoing
Copy link

Ok, Obrigado.

@orfeous1
Copy link

orfeous1 commented Mar 4, 2024

I configured my router as this and couldnt get ip-tv to work.
I modified interface from sfpplus1 to ether2 since my tvbox are connected to that.

I do not have Vodaphone and that might be the cause that it doesnt work.
VLAN IDs maybe doesnt match the ones that my ISP provider or IPTV provider uses.

My goal is to get rid of the switch that i was provided with IPTV a CTS-HES-3106SFP-PLUS-DR

I have the exact same router as you RB5009 with PoE out on all ports

I dont understand whats wrong

@danielb7390
Copy link
Author

danielb7390 commented Mar 4, 2024

I configured my router as this and couldnt get ip-tv to work. I modified interface from sfpplus1 to ether2 since my tvbox are connected to that.

The sfpplus1 interface is the fiber/ont/wan interface not the tvbox. The tvbox can be connected in any of the LAN ports.
But since this is the configuration for vodafone PT, i'm not sure that will work with your ISP... you are on your own on that

@orfeous1
Copy link

orfeous1 commented Mar 9, 2024

I configured my router as this and couldnt get ip-tv to work. I modified interface from sfpplus1 to ether2 since my tvbox are connected to that.

The sfpplus1 interface is the fiber/ont/wan interface not the tvbox. The tvbox can be connected in any of the LAN ports. But since this is the configuration for vodafone PT, i'm not sure that will work with your ISP... you are on your own on that

Ok, in my case WAN is ether1 and tv-box is ether2
When connected to a provided switch IP-TV box gets and ip of 10.x.x.x the same happens if i connect a PC to the IP-TV ports.

So i dont know if IP-TV box needs a VLAN ID or just be defined a ip-subnet or how it works.
This switch that was provided cant be configured, its locked.

One improvement though that i made is that i can watch VOD content but not live streams.
So i think im on the way at least. Just need to figure out how to get it to the 10.x.x.x

@danielb7390
Copy link
Author

Not sure what you mean by ISP provided switch, but if you have a separate ONT before said switch you could try to setup a wireshark capture in the middle of that to try to figure out the vlans...

@Luis-Sarabando
Copy link

Boas @danielb7390 pelo o que percebi, com as configuraçoes que tens mais um SFP GPON-ONU-34-20BI consigo ligar a fibra directamente ao SFP e ao mikrotik ? Não precisas de configurar o Ploam ou SLID ?

@danielb7390
Copy link
Author

Boas, precisas na mesma, para meter no SFP.

@deluxor
Copy link

deluxor commented Aug 26, 2024

@Luis-Sarabando se precisares de ajuda, manda-me msg no Matrix, https://matrix.to/#/@tripw1re:matrix.org
Abraço.

@dimsua
Copy link

dimsua commented Sep 3, 2024

@danielb7390 on vodafone portugal how i could obtain info about Ploam, SLID etc ? i could obtain ont-password from ont auth, but where/how i could take rest info?

@danielb7390
Copy link
Author

Those are all names for the exact same thing. It's a HEX string of 10 characters.
Old ONT there is root login password around the internet, so you can login and get it there.
For the All-In-One router+ont, there's no way. You need to ask the installer at install time.

@deluxor
Copy link

deluxor commented Sep 4, 2024

Those are all names for the exact same thing. It's a HEX string of 10 characters. Old ONT there is root login password around the internet, so you can login and get it there. For the All-In-One router+ont, there's no way. You need to ask the installer at install time.

Actually there is a way.

@danielb7390
Copy link
Author

danielb7390 commented Sep 4, 2024

I bet there is.. i just don't know about it tho 😅

@deluxor
Copy link

deluxor commented Sep 4, 2024

I bet there is.. i just don't know about it tho 😅

If I got some spare time, I might write an app to extract it.

@deluxor
Copy link

deluxor commented Sep 6, 2024

Download
Ok there you go guys, this is only compatible with the most recent FAST5671 model, at least for now. I've just compiled for MacOS Arm64 and Linux x64. If you don't feel comfortable running it, spin up a VM without internet, or remove the fiber cable from the router.

Download the attached "image" by right click and "Save as..." and rename it from .png to .zip then extract it, or simply extract it directly.
Cheers.

@dimsua
Copy link

dimsua commented Sep 12, 2024

unfortunately at home installed smartrouter 2.0 HS8247W :(

@dimsua
Copy link

dimsua commented Sep 24, 2024

finally migrated

for future this is data what i set:
flash set GPON_SN: s/n router HWTC... (could get on stick)
flash set PON_VENDOR_ID HWTC
flash set ELAN_MAC_ADDR MACADDR router (could get on stick)
flash set GPON_PLOAM_PASSWD GPON_PASSWORD

RTK.0> gpon get onu-state
ONU state: Operation State(O5)

@CulturalFan1985
Copy link

Anyone using OpenWrt?

@luismalves
Copy link

@dimsua could you provide more detail on where you set that data? Was it on the SFP?

@deluxor, will reach out on Matrix but in the meanwhile, the program you create appears to not work anymore :)

@ticklemynausea
Copy link

@deluxor your "image" seems to have been removed unfortunately.

I am very interested in replacing the FAST5671 Vodafone is forcing me to use with something I actually own. Vodafone gives me actually no options and I am stuck with no options : (

@ticklemynausea
Copy link

@deluxor I probably messed up copying the URL earlier, I got it now. Thanks

@BrixSat
Copy link

BrixSat commented Mar 28, 2025

Essa password do PLOAM é algo que me interessa saber em como obter. @deluxor consegues dar umas dicas?

@wisedrgus
Copy link

@ticklemynausea did you manage to reach @deluxor? I also sent him an invite on Matrix.

Just wondering if you guys found a way to get the FAST 5671 data without the hassle of begging Vodafone for it... :/

@salvatox
Copy link

Vou tentar, porque já tentei várias configurações e ainda não consegui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment