5W site logo 5W - мой домашний сайт-блог с картинками, кино и плюшками.

iptv-vlc-firewall.txt

просмотр IPTV в Linux через VLC?

Настройка IPTV в Debian 6 Squeeze (или Ubuntu).
-----------------------------------------------------------------
/etc/sysctl.conf:
Код: [Выделить]
net.ipv4.ip_forward=1
net.ipv4.conf.all.force_igmp_version=2
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.eth0.rp_filter=0
-----------------------------------------------------------------
/etc/network/interfaces:
Код: [Выделить]
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# The primary network interface - CITYCOM
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
up route add -net 224.0.0.0/4 dev eth0
up route add -net 172.16.0.0/12 gw 172.31.175.254
#up route add -net 172.31.0.0/16 gw 172.31.175.254

# The secondary network interface - LAN
auto eth1
allow-hotplug eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

# Настройка для pppoe
auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
--------------------------------------------------------------
Настройки arno-iptables-firewall.

/etc/arno-iptables-firewall/debconf.cfg:
Код: [Выделить]
#######################################################################
# Feel free to edit this file. However, be aware that debconf writes #
# to (and reads from) this file too. In case of doubt, only use #
# 'dpkg-reconfigure -plow arno-iptables-firewall' to edit this file. #
# If you really don't want to use debconf, or if you have specific #
# needs, you're likely better off using #
# /etc/arno-iptables-firewall/custom-rules. Also see README.Debian. #
#######################################################################
DC_EXT_IF="ppp0 eth0"
DC_EXT_IF_DHCP_IP=1
DC_OPEN_TCP="21 22 80 443"
DC_OPEN_UDP="5510"
DC_INT_IF="eth1"
DC_NAT=1
DC_INTERNAL_NET="192.168.1.0/24"
DC_NAT_INTERNAL_NET="192.168.1.0/24"
DC_OPEN_ICMP=1

/etc/arno-iptables-firewall/custom-rules:
Код: [Выделить]
# Put any custom (iptables) rules here down below:
##################################################
iptables -A FORWARD -p igmp -i eth0 -o eth1 -j ACCEPT
iptables -I INPUT -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -d 224.0.0.0/4 -j ACCEPT
-------------------------------------------------------------------
Настройка VLC:
- плейлист
- поток по умолчанию
- http://tv.citycomm.ru/files/iptvplayer/citycomm_utf8.m3u
-------------------------------------------------------------------
Таблица маршрутизации:
Код: [Выделить]
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
92.241.127.254 * 255.255.255.255 UH 0 0 0 ppp0
172.16.135.0 * 255.255.255.0 U 0 0 0 vmnet8
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.8.0 * 255.255.255.0 U 0 0 0 vmnet1
172.31.172.0 * 255.255.252.0 U 0 0 0 eth0
172.31.0.0 172.31.175.254 255.255.0.0 UG 0 0 0 eth0
172.16.0.0 172.31.175.254 255.240.0.0 UG 0 0 0 eth0
10.0.0.0 * 255.0.0.0 U 0 0 0 nrtap
224.0.0.0 * 240.0.0.0 U 0 0 0 eth0
default * 0.0.0.0 U 0 0 0 ppp0

Интернет и просмотр IPTV через VLC работают одновременно. VLC работает стабильно, зависаний нет.