IGMP Multicast через NAT
Настраиваем Q.TV (ТЕЛЕQ Эфирный) для работы за NAT’ом. Нижеприведенные конфиги годятся для QWERTY.
Скачиваем: http://qwertylife.ru/programms/unix/igmpproxy-src-0.1-beta2.tar.gz
Настраиваем:
Содержимое /etc/igmpproxy.conf
######################################################## # # Example configuration file for the IgmpProxy # -------------------------------------------- # # The configuration file must define one upstream # interface, and one or more downstream interfaces. # # If multicast traffic originates outside the # upstream subnet, the "altnet" option can be # used in order to define legal multicast sources.# (Se example...) # # The "quickleave" should be used to avoid saturation # of the upstream link. The option should only # be used if it's absolutely nessecary to # accurately imitate just one Client. # ######################################################## ##------------------------------------------------------ ## Enable Quickleave mode (Sends Leave instantly) ##------------------------------------------------------ quickleave ##------------------------------------------------------ ## Configuration for eth0 (Upstream Interface) ##------------------------------------------------------ phyint eth0 upstream ratelimit 0 threshold 1 altnet 213.85.187.36 ##------------------------------------------------------ ## Configuration for eth1 (Downstream Interface) ##------------------------------------------------------ phyint eth1 downstream ratelimit 0 threshold 1 ##------------------------------------------------------ ## Configuration for eth2 (Disabled Interface) ##------------------------------------------------------ phyint eth2 disabled
на этом примере: eth0 – центеловский интерфейс, eth1 – интерфейс внутренней сети
/etc/init.d/igmpproxy для Debian GNU/Linux
#!/bin/sh
# /etc/init.d/igmpproxy
#
# Written by Alexandr Ivanov <alexandr.ivanov@gmail.com>.
# Exit if igmpproxy.conf doesn't exist
test -f /etc/igmpproxy.conf || exit 0
NAME=igmpproxy
DAEMON=/usr/local/bin/$NAME
test -x $DAEMON || exit 0
start()
{
echo -n "Starting IGMP PROXY server: $NAME"
start-stop-daemon --start --background --exec $DAEMON
}
stop()
{
echo -n "Stopping IGMP PROXY server: $NAME"
start-stop-daemon --stop --name $NAME --oknodo
}
case "$1" in
start)
start
echo "."
;;
stop)
stop
echo "."
;;
restart)
stop
start
echo "."
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
exit 1
;;
esac
exit 0
В фаерволе соответсвенно разрешаем форвардинг (на примере iptables):
iptables -A FORWARD -d 239.255.2.0/255.255.255.240 -p udp -m udp --dport 1234 -j ACCEPT
Запускаем, /etc/init.d/igmpproxy start
Ура, наслаждаемся работой.
Ответилось