2009-04-22

IPTV through udpxy (no igmproxy)

Some ISPs provide IPTV services. So does MegaNet (by Dokeda, UAB) that I am currently subscribed to. There are 14 TV stations listed on official website. You can access channels via IGMP addresses (e.g. 239.255.1.1:5000, 239.255.1.2:5000, 239.255.1.3:5000 ... 239.255.1.14:5000) if you have single computer connected to the Internet. Opening IP port 5000 for UDP traffic on your firewall is enough most of the time. But what to do if you have simple LAN dwelling at your place? I'll try to explain how to run IPTV on several home computers at a same time smoothly.
Ancient PC running Ubuntu 8.04.2 (a.k.a Hardy) is a gateway (192.168.1.4) connected to ISP line through ethernet-to-optical adapter and does a great job NATing internet connection to other devices. Shorewall firewall is always up and running.
1) SSH to your router.
2) Open file /etc/shorewall/rules with nano text editor and root privileges
3) append these lines
ACCEPT all fw:224.0.0.0/4
ACCEPT all net:224.0.0.0/4
ACCEPT all loc:224.0.0.0/4
4) Save file and close editor.
5) Restart shorewall firewall by issuing command sudo /etc/init.d/shorewall restart
6) Navigate to Udpxy at SourceForge and download latest package.
7) Extract, .\configure, make and make install it.
8) start udpxy daemon with udpxy -a eth1 -p 4022 -m eth0 (where eth0 is outer adapter)
9) all work on gateway is done, return to a computer you want IPTV to be watched on
10) create new *.pls file. Enter lines
#EXTM3U
#EXTINF:0,Channel01
http://192.168.1.4:4022/udp/239.255.1.1:5000
#EXTINF:0,Channel02
http://192.168.1.4:4022/udp/239.255.1.2:5000
#EXTINF:0,Channel03
http://192.168.1.4:4022/udp/239.255.1.3:5000
...
#EXTINF:0,Channel14
http://192.168.1.4:4022/udp/239.255.1.14:5000
11) Save file and close file.
12) Open playlist with VLC media player and enjoy brainwashing!
13) Repeat above steps 9-12 on every other PC hooked to your LAN.
14) Ask me if something goes wrong. (-:
Final thoughts: I chose udpxy way cause using igmproxy hogs wi-fi traffic.