Автор Тема: Проброс IPTV через NAT...  (Прочитано 4514 раз)

Оффлайн San

  • Завсегдатай
  • *
  • Сообщений: 699
Проброс IPTV через NAT...
« : 25.10.2020 09:05:34 »
Помогите решить пару вопросов. Главное правильно, а то я сам могу такой фигни нарешать...  ;-D

Имеем систему Сервер Alt-p9-server-sysv:
# head -n 2 /etc/os-release
NAME="starter kit"
VERSION="p9 (Hypericum)"
# ll /proc/1/exe
lrwxrwxrwx 1 root root 0 окт 25  2020 /proc/1/exe -> /sbin/init
# uname -a
Linux host-117 5.4.62-std-def-alt1 #1 SMP Fri Sep 4 20:15:13 UTC 2020 x86_64 GNU/Linux

Прочитано. https://forum.altlinux.org/index.php?topic=27052.msg188547#msg188547 Установил igmpproxy, настроил...

Запускаю:
# /usr/sbin/igmpproxy /etc/igmpproxy.conf -v -dТелевидение в сетке работает, но консоль остается занята процессом до Ctrl+C
# /usr/sbin/igmpproxy /etc/igmpproxy.conf -v -d
adding VIF, Ix 0 Fl 0x0 IP 0x7371a8c0 eth0, Threshold: 1, Ratelimit: 0
adding VIF, Ix 1 Fl 0x0 IP 0x6363a8c0 eth1, Threshold: 1, Ratelimit: 0
joinMcGroup: 224.0.0.2 on eth1
RECV Membership query   from 192.168.99.99   to 224.0.0.1
RECV V1 member report   from 192.168.99.99   to 224.0.0.2
The IGMP message was from myself. Ignoring.
Inserted route table entry for 239.0.47.31 on VIF #-1
Inserted route table entry for 239.0.47.32 on VIF #-1
Inserted route table entry for 239.255.255.250 on VIF #-1
RECV V2 member report   from 192.168.99.100  to 239.255.255.250
Updated route entry for 239.255.255.250 on VIF #1
Adding MFC: 192.168.113.1 -> 239.255.255.250, InpVIf: 0
joinMcGroup: 239.255.255.250 on eth0
RECV V1 member report   from 192.168.113.115 to 239.255.255.250
The IGMP message was from myself. Ignoring.
Route activation request from 192.168.113.115 for 239.255.255.250 is from myself. Ignoring.
Inserted route table entry for 239.192.152.143 on VIF #-1
RECV V1 member report   from 192.168.113.115 to 239.255.255.250
The IGMP message was from myself. Ignoring.
RECV V2 member report   from 192.168.99.100  to 239.0.47.31
Updated route entry for 239.0.47.31 on VIF #1
Adding MFC: 192.168.43.2 -> 239.0.47.31, InpVIf: 0
joinMcGroup: 239.0.47.31 on eth0
RECV V1 member report   from 192.168.113.115 to 239.0.47.31
The IGMP message was from myself. Ignoring.
Route activation request from 192.168.113.115 for 239.0.47.31 is from myself. Ignoring.
RECV V1 member report   from 192.168.113.115 to 239.0.47.31
The IGMP message was from myself. Ignoring.
RECV Leave message      from 192.168.99.100  to 224.0.0.2
RECV Leave message      from 192.168.99.100  to 224.0.0.2
The source address 192.168.99.100 for group 239.255.255.250, is not in any valid net for upstream VIF.
RECV Leave message      from 192.168.99.100  to 224.0.0.2
RECV Leave message      from 192.168.99.100  to 224.0.0.2
The source address 192.168.99.100 for group 239.255.255.250, is not in any valid net for upstream VIF.
RECV Membership query   from 192.168.99.99   to 224.0.0.1
RECV V2 member report   from 192.168.99.100  to 239.255.255.250
Updated route entry for 239.255.255.250 on VIF #1
Adding MFC: 192.168.113.1 -> 239.255.255.250, InpVIf: 0
RECV V2 member report   from 192.168.99.100  to 239.0.47.31
Updated route entry for 239.0.47.31 on VIF #1
Adding MFC: 192.168.43.2 -> 239.0.47.31, InpVIf: 0
RECV V1 member report   from 192.168.99.99   to 224.0.0.2
The IGMP message was from myself. Ignoring.
Removing MFC: 192.168.43.2 -> 239.0.47.32, InpVIf: 0
MRT_DEL_MFC; Errno(2): No such file or directory
Removing MFC: 192.168.113.113 -> 239.192.152.143, InpVIf: 0
MRT_DEL_MFC; Errno(2): No such file or directory
Inserted route table entry for 239.192.152.143 on VIF #-1
Inserted route table entry for 239.0.47.32 on VIF #-1
RECV Membership query   from 192.168.99.99   to 224.0.0.1
RECV V2 member report   from 192.168.99.100  to 239.255.255.250
Updated route entry for 239.255.255.250 on VIF #1
Adding MFC: 192.168.113.1 -> 239.255.255.250, InpVIf: 0
RECV V2 member report   from 192.168.99.100  to 239.0.47.31
Updated route entry for 239.0.47.31 on VIF #1
Adding MFC: 192.168.43.2 -> 239.0.47.31, InpVIf: 0
RECV V1 member report   from 192.168.99.99   to 224.0.0.2
The IGMP message was from myself. Ignoring.
The origin for route 239.255.255.250 changed from 192.168.113.1 to 192.168.113.113
Adding MFC: 192.168.113.113 -> 239.255.255.250, InpVIf: 0
^Cselect() failure; Errno(4): Interrupted system call
Got a interupt signal. Exiting.
Removing MFC: 192.168.43.2 -> 239.0.47.31, InpVIf: 0
leaveMcGroup: 239.0.47.31 on eth0
Removing MFC: 192.168.43.2 -> 239.0.47.32, InpVIf: 0
MRT_DEL_MFC; Errno(2): No such file or directory
Removing MFC: 192.168.113.113 -> 239.192.152.143, InpVIf: 0
MRT_DEL_MFC; Errno(2): No such file or directory
Removing MFC: 192.168.113.113 -> 239.255.255.250, InpVIf: 0
leaveMcGroup: 239.255.255.250 on eth0
All routes removed. Routing table is empty.
Shutdown complete....
#
После освобождение консоли IPTV в сети соответственно пропадает. Что я не так делаю? С командой igmpproxy /etc/igmpproxy.conf та же картина...
# igmpproxy /etc/igmpproxy.conf
^C[root@host-117 ~]#

Вопросы:

1. Как запустить igmpproxi процессом?
2. Как ПРАВИЛЬНО добавить правила в iptables и route? Есть мысль что через /etc/rc.d/rc.local на сколько это приемлемо?
#!/bin/sh
...

# Правила для igmpproxy
modprobe ipt_TTL
iptables -I INPUT -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -d 224.0.0.0/4 -j ACCEPT
route add -net 224.0.0.0/4 dev eth1

...
3. Что за строчка в логах:
MRT_DEL_MFC; Errno(2): No such file or directory
Removing MFC: 192.168.113.113 -> 239.255.255.250, InpVIf: 0
leaveMcGroup: 239.255.255.250 on eth0

Оффлайн rits

  • Завсегдатай
  • *
  • Сообщений: 1 120
  • ITS
Re: Проброс IPTV через NAT...
« Ответ #1 : 25.10.2020 18:44:24 »
пример cat /etc/rc.d/init.d/template