天津联通家庭宽带,光猫配置如下:
协议 | 模式 | 光猫接口 | 路由器接口 |
---|---|---|---|
INTERNET | 桥接 WAN | eth1 | eth1 |
IPTV | 路由 WAN | eth4 | eth2 |
路由器配置:
bridge
设置为eth3, eth4, eth5
,去掉了eth1, eth2
eth1
设置 PPPoE ,此时路由器下接设备可以访问互联网eth2
上添加 1 个 Client 。此时 IP/Addresses 出现一个动态地址interface
0 U ;;; iptv_upstream
interface=ether2 threshold=1 alternative-subnets=0.0.0.0/0 upstream=yes
1 ;;; iptv_downstream
interface=bridge threshold=1 alternative-subnets="" upstream=no
此时路由器下接设备可以收看组播 IPTV 。但是约 4 分钟后中断,切换频道后正常,4 分钟后再中断。
在 IP/Firewall 观察到这一项拦截了很多流量。禁用这一项之后,观看 4 分钟不再中断。
5 ;;; defconf: drop all not coming from LAN
chain=input action=drop in-interface-list=!LAN log=no log-prefix=""
在这项上面添加一条规则如下,观看 IPTV 不再中断。drop all not coming from LAN 一项也不再出现大流量。流量都出现在了 accept IPTV 。
4 ;;; accept IPTV
chain=input action=accept dst-address=224.0.0.0/4 log=no log-prefix=""
全部防火墙规则如下:
Flags: X - disabled, I - invalid; D - dynamic
0 D ;;; special dummy rule to show fasttrack counters
chain=forward action=passthrough
1 ;;; defconf: accept established,related,untracked
chain=input action=accept connection-state=established,related,untracked
2 ;;; defconf: drop invalid
chain=input action=drop connection-state=invalid
3 ;;; defconf: accept ICMP
chain=input action=accept protocol=icmp
4 ;;; accept IPTV
chain=input action=accept dst-address=224.0.0.0/4 log=no log-prefix=""
5 ;;; defconf: drop all not coming from LAN
chain=input action=drop in-interface-list=!LAN log=no log-prefix=""
6 ;;; defconf: accept in ipsec policy
chain=forward action=accept ipsec-policy=in,ipsec
7 ;;; defconf: accept out ipsec policy
chain=forward action=accept ipsec-policy=out,ipsec
8 ;;; defconf: fasttrack
chain=forward action=fasttrack-connection hw-offload=yes connection-state=established,related
9 ;;; defconf: accept established,related, untracked
chain=forward action=accept connection-state=established,related,untracked
10 ;;; defconf: drop invalid
chain=forward action=drop connection-state=invalid
11 ;;; defconf: drop all from WAN not DSTNATed
chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface-list=WAN
请教几个问题:
upstream
要设置alternative-subnets=0.0.0.0/0
?没有这个属性可以吗?drop all not coming from LAN
规则拦截了大量数据,但是 IPTV 仍能正常播放?这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.