本来想直接用起来OpenWRT的,折腾了一下还是放弃了,技术不行还是有难度。

刷了个 PandoraBox 老固件,听说新版本名字已经改了。刷这个固件是因为它的IPv6默认支持得比较好。


IPv6 配置

让子网得到IPv6地址地址

IPv6-LAN

添加IPv6的数据包转发

ip6tables -t nat -A POSTROUTING -o eth0.2 -j MASQUERADE

IPTV 配置

opkg update
opkg install mcproxy
opkg install udpxy

配置 mcproxy

######################################
##-- mcproxy configuration script --##
######################################

# Erase or comment out the following line when configured
# disable;

# Protocol: IGMPv1|IGMPv2|IGMPv3 (IPv4) - MLDv1|MLDv2 (IPv6)
protocol IGMPv3;

# Proxy Instance: upstream ==> downstream
pinstance proxy1: "eth0.2" ==> "br-lan";
# pinstance proxy2: "eth0.2" ==> "br-lan";
# pinstance proxy3: eth0 ==> eth1 eth2;
# 

配置 udpxy

IPv6-LAN

config udpxy
        option verbose '0'
        option status '1'
        option bind '192.168.10.1'
        option port '8012'
        option source 'eth0.2'
        option max_clients '3'
        option log_file '/var/log/udpxy'
        option buffer_size '1048576'
        option buffer_messages '3'
        # option buffer_time '-1'
        # option nice_increment '0'
        # option mcsub_renew '0'

重启udpxy /etc/init.d/udpxy restart

查看 udpxy 状态

udpxy-status

配置防火墙

/etc/config/firewall

config rule                             
        option name 'Allow-IGMP'                        
        option src 'wan'                                   
        option proto 'igmp'        
        option family 'ipv4'                             
        option target 'ACCEPT'         

config rule                                     
        option name 'Allow-UDP-mcproxy' 
        option src 'wan'                  
        option proto 'udp'           
        option dest 'lan'                   
        option dest_ip '224.0.0.0/4'                     
        option target 'ACCEPT'                           
                                   
config rule                                     
        option name 'Allow-UDP-udpxy' 
        option src 'wan'               
        option proto 'udp'            
        option dest_ip '224.0.0.0/4'                       
        option target 'ACCEPT'                             
                               
config forwarding                    
        option src 'wan'                
        option dest 'lan'               

VLC 播放测试:

可以通过VLC(Linux) / PotPlayer(Windows) 打开类似如下地址播放 http://192.168.10.1:8012/udp/239.2.1.129:8000/

IPv6-LAN


Transparent over the wall

未完待续


支付宝打赏 微信打赏

您的打赏是对我最大的鼓励!

linzhanyu


Linux, VIM, OpenGL, OpenCL.

Python, C++, C#, ML.

相看莫相笑,同是竹林人。