【RouterOS】—— 与乐视盒子结合
[i=s] 本帖最後由 角色 於 2015-1-3 00:34 編輯 [/i]因为香港也有不少的members有购入乐视盒子,但是在乐视盒子里有部分的电影需要在大陆地区才能观看,为了在香港可以看到那些电影,那么我们只能借助VPN技术来完成。
所以特意开一幅帖子来集中讨论。
============= 试验后的总结 ==================
好想验证IP会变,现在把最新都update上来。
乐视盒子:
2014-11-18 UnblockedIP=117.121.58.245
乐视网站:
2014-11-18 UnblockedIP=220.181.153.0/24
经过下面的式样,发现在UnBlockList里加入220.181.153.0/24后,就可以看到被blocked的信息。因为在验证的时候,RouterOS会把traffic directed to China VPN Server。
原来乐视盒子和乐视网都是用同一样的IP Address来验证大陆地区。
========== updated list at 2015-Jan-03 ====================
0 ;;; Internal-Nets
Internal-Nets 10.0.81.0/24
1 UnBlockIPList 192.168.6.201
2 UnBlockIPList 61.244.110.39
3 UnBlockIPList 115.182.63.251
4 ;;; LeTV
UnBlockIPList 117.121.58.245
5 UnBlockIPList 123.182.33.235
6 UnBlockIPList 123.126.33.23
7 UnBlockIPList 220.181.153.0/24
8 ;;;
UnBlockIPList 115.182.83.251
9 UnBlockIPList 103.7.7.211
10 UnBlockIPList 65.255.32.124
11 ;;;
UnBlockIPList 220.181.117.246
12 UnBlockIPList 218.213.235.236
13 UnBlockIPList 115.182.93.220
14 ;;; 01:13
UnBlockIPList 222.161.226.5
15 UnBlockIPList 220.181.1.244
16 UnBlockIPList 220.181.117.234
17 UnBlockIPList 123.125.89.242
18 ;;; 2014-DEC-28 18:25
UnBlockIPList 117.121.58.229
19 UnBlockIPList 115.182.94.188
20 ;;; 2014-DEC-28 18:39
UnBlockIPList 115.182.6.251
21 UnBlockIPList 123.126.33.235
22 UnBlockIPList 220.181.153.149
23 ;;; 2015-JAN-02 23:18
UnBlockIPList 103.7.6.83
24 UnBlockIPList 117.121.58.243 [i=s] 本帖最後由 角色 於 2014-9-21 14:09 編輯 [/i]
乐视盒子怎样接。
[attach]3349[/attach] [i=s] 本帖最後由 角色 於 2014-9-21 15:41 編輯 [/i]
怎样开始,我们先看看下面的帖子:
[url]http://www.telecom-cafe.com/forum/viewthread.php?tid=6371&extra=page%3D1[/url]
为了简单化,我把它们进行修改。
1. profile=profile-cn (而不用default)[code]
/ppp profile>
add name=profile-cn use-encryption=yes change-tcp-mss=yes
[/code]2. The main code[code]
:local username "vpn-name"
:local password "vpn-passowrd"
:local hostname "vpn-server-host-name"
:local internal "192.168.88.0/24"
/interface pptp-client
add add-default-route=no allow=chap,mschap1,mschap2 connect-to=$hostname \
dial-on-demand=no disabled=no keepalive-timeout=60 max-mru=1400 max-mtu=\
1400 mrru=disabled name=vpn_cn password=$password profile=\
profile-cn user=$username
# default ports 80, 443 and 8080
/ip firewall mangle
add action=mark-routing chain=prerouting dst-address-list=UnBlockIPList \
port=80,443,8080 new-routing-mark=through_vpn_cn passthrough=no \
protocol=tcp src-address-list=Internal-Nets disabled=no
/ip firewall nat
add action=masquerade chain=srcnat out-interface=vpn_cn disabled=no
/ip route
add distance=1 gateway=vpn_cn routing-mark=through_vpn_cn disabled=no \
scope=255
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,114.114.114.114
/ip firewall address-list
add list=Internal-Nets address=$internal comment="Internal-Nets"
# The following will be removed
add list=UnBlockIPList address=103.7.28.0/24
[/code]3. 把上面的文件,save LeTV.rsc,然后把LeTV.rsc drag入Winbox的File里
4. 还Terminal,然后输入[code]
/import file-name=LeTV.rsc
[/code]如果注入成功,画面出现[code]
Script file loaded and executed successfully
[/code] [i=s] 本帖最後由 角色 於 2014-9-21 17:17 編輯 [/i]
把乐视盒子的LAN port插入Routerboard的LAN port,然后乐视盒子上电。用下面指令查看给乐视盒子的IP Address[code]
/ip dhcp-server lease print
[/code]在我的例子里,我的乐视盒子的IP Address为:192.168.88.254
[attach]3350[/attach]
然后在UnBlockList里前面加一个感叹号!,就是不在UnBlockList里,意思所有0.0.0.0/0一样的,因为在UnBlockList基本上没有什么IP address是Unblock的。
[attach]3351[/attach]
在Action,把所有信息改为送到log里,
[attach]3352[/attach]
在log里,找出所有的IP addresses,如下:
220.181.153.223:80
220.181.153.149:80
220.181.153.37:80
218.213.235.236:80
基本上是两大组,
1)220.181.153.0/24
2) 218.213.235.0/24
然后放入
[attach]3353[/attach]
Disabled 218.213.235.0/24都可以工作,而disable220.181.153.0/24就不行。
那么要让香港的乐视盒子看到在大陆地区能看到的电影,那么UnBlockList里面要有220.181.153.0/24。
那么把之前的做过checking的动作还原,那么你就可以让乐视盒子看看到被blocked的电影了。 备用帖子。 备用帖子 备用帖子 备用帖子 原来之前的IP Address,昨天还可以用,但是隔了一天就不能用了。那么再次用之前的方法去找出新的IP。 我发现的Hostname最初有 NEWC1S326b变了Android。。。。。,然后再从新启动后又再好了。 ;P
這樣便可, 不需指定PORT
add action=mark-routing chain=prerouting dst-address-list=UnBlockIPList \
new-routing-mark=through_vpn_cn passthrough=no \
protocol=tcp src-address-list=Internal-Nets disabled=no 谢谢CHing,其实我都是按照你在友台刊登的script作出修改而成。 any cn vpn speed is good? [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=39681&ptid=6393]13#[/url] [i]hklkf[/i] [/b]
大陆的VPN Server主要是用于认证,主要traffic不走VPN。 Mark!
What about the setup of the opposite routerboard(@Mainland)? Just using an ordinary VPN server, you are able to route your authentication information to the mainland China server via remote gateway of the connected VPN server. 上面说过的settings有时可以,但是有时又不可以,好想他会根据时间来改变。 Tks 角色, 要留名學習 [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=40002&ptid=6393]18#[/url] [i]wai146[/i] [/b]
你也有RB? [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=40005&ptid=6393]19#[/url] [i]角色[/i] [/b]
有隻450G 返緊來. 下次返上去办公室便帶返香港慢慢試set. RB是一个好的东西,可以让你学会很多东西。 [quote]回復 hklkf
大陆的VPN Server主要是用于认证,主要traffic不走VPN。
[size=2][color=#999999]角色 發表於 2014-11-4 00:24[/color] [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=39683&ptid=6393][img]http://www.telecom-cafe.com/forum/images/common/back.gif[/img][/url][/size][/quote]
请教: 如何建立分别 a)用于认证, b) 不走 VPN traffic 的设定?
我在香港用pptp翻墙返大陆时,一般全都走VPN的traffic吗(如果没有特别的设定)? 我怎样控制数据分别 走 认证 和 traffic 呢? 这个是policy based routing(PBR)一种。你用PPTP是一般是VPN,所有traffic都会往remote gateway。 [i=s] 本帖最後由 gfx86674 於 2018-2-23 01:17 編輯 [/i]
[quote]这个是policy based routing(PBR)一种。你用PPTP是一般是VPN,所有traffic都会往remote gateway。 ...
[size=2][color=#999999]角色 發表於 2018-2-23 00:52[/color] [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=44445&ptid=6393][img]http://www.telecom-cafe.com/forum/images/common/back.gif[/img][/url][/size][/quote]
這要看pptp是使用在那個硬件上 ,改路由表就辦得到.
手機可以改但需root ; 路由器或電腦就比較容易修改,但幾百幾千的路由要手動新增也讓人崩潰就是. [i=s] 本帖最後由 角色 於 2018-2-23 01:54 編輯 [/i]
[b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=44448&ptid=6393]24#[/url] [i]gfx86674[/i] [/b]
同意CHing的说法。
原来有机构买所有国家的IP段都,然后import到Routerboard的list,我们通过PBR,把packets属于这里list里就route去VPN gateway(interface)里。
另外一种就是把所有的traffic都是route去vpn gateway,那么连那个list都不用!!!(就是用一个port接乐视) 有没有教程? [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=44475&ptid=6393]26#[/url] [i]vpn-learner[/i] [/b]
暂时还没有教学,有空再做。因为之前做过一次,但还是由于系统有变动,改变了这个方式。就是把某个RB的port变成大陆port,那么问题就简单很多。就想下面的帖子所描述的一样:
[url]http://www.telecom-cafe.com/forum/viewthread.php?tid=7084&extra=page%3D1[/url]
这个你需要大陆有VPN,然后把香港的traffic推到大陆的gateway。
頁:
[1]