二级路由配置IPTV解决方案

单网口环境下二级路由配置IPTV

一级路由(其中port 0 为CPU,port 5 连接入户网线,port 4 连接二级路由):

config switch_vlan

option device 'switch0'

option vlan '1'

option vid '1'

option ports '0t 1 2 3 4'

config switch_vlan

option device 'switch0'

option vlan '2'

option vid '2'

......

Ubuntu 服务器上部署 shadowsocks

apt-get update

apt-get install python-gevent python-pip

pip install shadowsocks

apt-get install python-m2crypto

打开 /etc/shadowsocks.json

{

"server":"my_server_ip",

"server_port":8000,

"local_address": "127.0.0.1",

"local_port":1080,

......

OpenWrt 远程端口转发

编辑一级OpenWrt的 \etc\config\firewall,按需添加如下:

将Wan的9091端口转发到Lan中192.168.1.4的9091端口,开放公网访问192.168.1.4上架设的ransmission Web服务。

config redirect

option name '9091'

option src 'wan'

option src_dport '9091'

option proto 'tcp'

option dest_ip '192.168.1.4'

将Wan的6800端口转发到Lan中192.168.1.4的6800端口,开放公网访问192.......