Здравствуйте, гость ( Вход | Регистрация )

beirel-telecom
> Iptv И Linux
 
KAA
сообщение 28.12.2008, 12:52
Сообщение #1



Иконка группы

Группа: Admin
Сообщений: 2434
Регистрация: 8.10.2005
Из: Пушкино

Пол:
Сегмент: 7



В ситуации, когда доступ в сеть идет через linux-сервер, на котором делается nat для пользователей за ним и есть необходимость давать этим пользователям IPTV, которое работает при подключении напрямую, может помочь программа igmpproxy
ее необходимо скачать, собрать и запустить, при этом подготовив конфиг
CODE
########################################################
#
# 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 77.246.100.0/24
# altnet 77.246.98.0/24
# altnet 77.246.96.0/24
# altnet 10.0.0.0/8
# altnet 192.168.0.0/24


##------------------------------------------------------
## Configuration for eth1 (Downstream Interface)
##------------------------------------------------------
phyint eth1 downstream ratelimit 0 threshold 1


##------------------------------------------------------
## Configuration for eth2 (Disabled Interface)
##------------------------------------------------------
#phyint eth1 disabled

eth0 - интерфейс, который смотрит в нашу сеть(WAN)
eth1 - интерфейс, который смотрит во внутреннюю сеть(LAN)

в iptables должен быть разрешен igmp, а в sysctl rp_filter=0
net.ipv4.conf.eth0.rp_filter=0
net.ipv4.conf.eth1.rp_filter=0

также, в зависимости от настроек firewall, может понадобится разрешить трафик C 77.246.100.0/24 НА адреса 224.0.0.0/24 и 224.0.42.0/24, это пока единственные сети, которые используются для вещания IPTV.

это все, что касается iptv
Go to the top of the page
 
+Quote Post
 
 
Start new topic
> Ответов
Алексей (AlekShe...
сообщение 17.11.2012, 19:39
Сообщение #2


Рядовой
Иконка группы

Группа: Пользователи
Сообщений: 33
Регистрация: 16.9.2009

Пол:
Сегмент: 166



конфиг igmpproxy
Код
########################################################
#
#   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


phyint eth1 upstream ratelimit 0 threshold 1 #это просто копипастить. интерфейс для провайдела.
altnet 239.255.255.250/32
altnet 77.246.100.0/24
altnet 89.222.166.0/24
#altnet 192.168.11.0/24

phyint br0 downstream ratelimit 0 threshold 1 #это интерфейс смотрящий в домашнюю сеть.
altnet 192.168.11.0/24 #диапазон домашней сети.

##------------------------------------------------------
## Configuration for eth2 (Disabled Interface)
##------------------------------------------------------
#phyint eth1 disabled
#phyint tap0 disabled
#phyint tap1 disabled
#phyint tap2 disabled
phyint tap3 disabled
phyint lo disabled

sysctl.conf
Код
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0
net.ipv4.conf.eth1.rp_filter = 0
net.ipv4.conf.br0.rp_filter = 0

#net.ipv4.conf.eth0.force_igmp_version=2
#net.ipv4.conf.br0.force_igmp_version=2
#net.ipv4.conf.eth1.force_igmp_version=2

Запускаю
Код
root@schsrv:/etc# igmpproxy -d -v /etc/igmpproxy.conf
adding VIF, Ix 0 Fl 0x0 IP 0x04a6de59 eth1, Threshold: 1, Ratelimit: 0
adding VIF, Ix 1 Fl 0x0 IP 0x010ba8c0 br0, Threshold: 1, Ratelimit: 0
adding VIF, Ix 2 Fl 0x0 IP 0x0600a8c0 tap3, Threshold: 1, Ratelimit: 0
joinMcGroup: 224.0.0.2 on br0
RECV Membership query   from 192.168.11.1    to 224.0.0.1
RECV V2 member report   from 192.168.11.1    to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 192.168.11.88   to 239.255.255.250
Inserted route table entry for 239.255.255.250 on VIF #1
joinMcGroup: 239.255.255.250 on eth1
RECV V2 member report   from 89.222.166.4    to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 89.222.166.4 for 239.255.255.250 is from myself. Ignoring.
The source address 192.168.11.88 for group 239.255.255.250, is not in any valid net for upstream VIF.
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Inserted route table entry for 224.0.42.1 on VIF #1
joinMcGroup: 224.0.42.1 on eth1
RECV V2 member report   from 89.222.166.4    to 224.0.42.1
The IGMP message was from myself. Ignoring.
Route activation request from 89.222.166.4 for 224.0.42.1 is from myself. Ignoring.
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Updated route entry for 224.0.42.1 on VIF #1
RECV V2 member report   from 89.222.166.4    to 239.255.255.250
The IGMP message was from myself. Ignoring.
RECV Leave message      from 192.168.11.88   to 224.0.0.2
leaveMcGroup: 224.0.42.1 on eth1
RECV Membership query   from 192.168.11.1    to 224.0.42.1
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Updated route entry for 224.0.42.1 on VIF #1
joinMcGroup: 224.0.42.1 on eth1
RECV V2 member report   from 89.222.166.4    to 224.0.42.1
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Updated route entry for 224.0.42.1 on VIF #1
The source address 192.168.11.88 for group 239.255.255.250, is not in any valid net for upstream VIF.
RECV Leave message      from 192.168.11.88   to 224.0.0.2
leaveMcGroup: 224.0.42.1 on eth1
RECV Membership query   from 192.168.11.1    to 224.0.42.1
RECV V2 member report   from 89.222.166.4    to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 89.222.166.4 for 239.255.255.250 is from myself. Ignoring.
RECV Membership query   from 192.168.11.1    to 224.0.42.1
RECV Membership query   from 192.168.11.1    to 224.0.42.1
Route is not active. No kernel updates done.
RECV Membership query   from 192.168.11.1    to 224.0.0.1
RECV V2 member report   from 192.168.11.88   to 239.255.255.250
Updated route entry for 239.255.255.250 on VIF #1
RECV V2 member report   from 192.168.11.1    to 224.0.0.2
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Inserted route table entry for 224.0.42.1 on VIF #1
joinMcGroup: 224.0.42.1 on eth1
RECV V2 member report   from 89.222.166.4    to 224.0.42.1
The IGMP message was from myself. Ignoring.
Route activation request from 89.222.166.4 for 224.0.42.1 is from myself. Ignoring.
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Updated route entry for 224.0.42.1 on VIF #1
RECV Leave message      from 192.168.11.88   to 224.0.0.2
leaveMcGroup: 224.0.42.1 on eth1
RECV Membership query   from 192.168.11.1    to 224.0.42.1
RECV Membership query   from 192.168.11.1    to 224.0.42.1
The source address 192.168.11.88 for group 239.255.255.250, is not in any valid net for upstream VIF.
Route is not active. No kernel updates done.
RECV Membership query   from 192.168.11.1    to 224.0.0.1
RECV V2 member report   from 192.168.11.88   to 239.255.255.250
Updated route entry for 239.255.255.250 on VIF #1
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Inserted route table entry for 224.0.42.1 on VIF #1
joinMcGroup: 224.0.42.1 on eth1
RECV V2 member report   from 89.222.166.4    to 224.0.42.1
The IGMP message was from myself. Ignoring.
Route activation request from 89.222.166.4 for 224.0.42.1 is from myself. Ignoring.
RECV V2 member report   from 192.168.11.88   to 224.0.42.1
Updated route entry for 224.0.42.1 on VIF #1
RECV Leave message      from 192.168.11.88   to 224.0.0.2
leaveMcGroup: 224.0.42.1 on eth1
RECV Membership query   from 192.168.11.1    to 224.0.42.1
RECV V2 member report   from 192.168.11.1    to 224.0.0.2
The IGMP message was from myself. Ignoring.
The source address 192.168.11.88 for group 239.255.255.250, is not in any valid net for upstream VIF.
RECV Membership query   from 192.168.11.1    to 224.0.42.1
^Cselect() failure; Errno(4): Interrupted system call
Got a interupt signal. Exiting.
Route is not active. No kernel updates done.
leaveMcGroup: 224.0.42.1 on eth1
MRT_DROP_MEMBERSHIP failed; Errno(99): Cannot assign requested address
Route is not active. No kernel updates done.
leaveMcGroup: 239.255.255.250 on eth1
All routes removed. Routing table is empty.
Shutdown complete....


Кина не показывает.
Go to the top of the page
 
+Quote Post
 

> Сообщений в этой теме


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0


 

RSS Текстовая версия Сейчас: 28.4.2024, 10:01