为什么在Alpine Linux中无法连接TvHeadend IGMP连接?

时间:2018-10-13 15:44:15

标签: alpine igmp

我想了解TvHeadend的高山linux和IGMP配置,尤其是当我使用多个nic时。

我有4个NIC

  • 1G + 1G = bond0:用于外部服务和互联网连接
  • 1G = enp1s0:用于TvHeadend IGMP流
  • 10G = enp4s0:用于局域网

我的问题是

  • 当我将bond0用作默认GW时,enp1s0无法收听IGMP流。
  • 当我将enp1s0用于默认GW时,bond0无法从外部内部进行侦听。 (外向正常)。

我不知道我的问题。当我使用unRAID服务器时,它很好用,只有路由选项,但是Alpine Linux不起作用。 我认为Alpine Linux对多个网卡有特殊规定,但是我找不到任何配置。

但是当我使用AJAX进行检查时,就可以连接到rtp协议。

我尝试过

  • 设置路由表:不起作用

iftop -i enp1s0

  • 设置iptables:不起作用

ip route add 224.0.0.0/4 dev enp1s0

  • 设置TvHeadend Mux接口配置:不起作用

这是我的网卡配置界面

iptables -I FORWARD -s [multicast] -d 224.0.0.0/4 -j ACCEPT
iptables -I INPUT -d 224.0.0.0/4 -j ACCEPT

这是我的路由表(未设置多播配置)

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
    bond-slaves enp2s0f0 enp2s0f1
    bond-mode 802.3ad
    bond-miimon 100
    bond-downdelay 200
    bond-updelay 200
    bond-lacp-rate 1
    bond-xmit-hash-policy layer2+3
    address 192.168.1.21
    netmask 255.255.255.0
    gateway 192.168.1.1
    post-up ip link set dev bond0 mtu 9000
    metric 10

auto enp1s0
iface enp1s0 inet static
    address 192.168.219.21
    netmask 255.255.255.0
    gateway 192.168.219.1
    metric 20

auto enp4s0
iface enp4s0 inet static
    address 192.168.2.21
    netmask 255.255.255.0
    post-up ip link set dev enp4s0 mtu 9000

这是我的iptables规则(这是alpine linux的默认值)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    10     0        0 bond0
default         192.168.219.1   0.0.0.0         UG    20     0        0 enp1s0
172.17.0.0      *               255.255.0.0     U     0      0        0 docker0
192.168.1.0     *               255.255.255.0   U     0      0        0 bond0
192.168.2.0     *               255.255.255.0   U     0      0        0 enp4s0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
192.168.219.0   *               255.255.255.0   U     0      0        0 enp1s0

这是我在nat中的iptables规则(这是高山linux的默认值)

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps

Chain FORWARD (policy DROP)
target     prot opt source               destination
DOCKER-USER  all  --  anywhere             anywhere
DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             192.168.122.0/24     ctstate RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc

Chain DOCKER (1 references)
target     prot opt source               destination

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere
RETURN     all  --  anywhere             anywhere

Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere
RETURN     all  --  anywhere             anywhere

Chain DOCKER-USER (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

这是我在mangle中的iptables规则(这是alpine linux的默认值)

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  anywhere            !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  172.17.0.0/16        anywhere
RETURN     all  --  192.168.122.0/24     base-address.mcast.net/24
RETURN     all  --  192.168.122.0/24     255.255.255.255
MASQUERADE  tcp  --  192.168.122.0/24    !192.168.122.0/24     masq ports: 1024-65535
MASQUERADE  udp  --  192.168.122.0/24    !192.168.122.0/24     masq ports: 1024-65535
MASQUERADE  all  --  192.168.122.0/24    !192.168.122.0/24

Chain DOCKER (2 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

0 个答案:

没有答案