Unblock Netease Cloud Music on RouterOS

  • Firmware: RouterOS 7.1 RC 4
  • LAN: 192.168.88.0/24
  • Premise: Already established VPN tunnel to mainland China and created a route table for it named “to-vpn”.
  1. Assign static DNS record.
1
ip/dns/static/add name=music.163.com address=59.111.160.195 disabled=no
  1. Create address list based on AS45062 IPv4 Prefixes and AS137263 IPv4 Prefixes.

Useful RegEx patterns:

  • Match the CIDR segments from the selection of web page: .*[^\d](\d+\.\d+\.\d+\.\d+/\d+).*
  • Replace with RouterOS command: add address=$1 disabled=no list=netease
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
ip/firewall/address-list/
add address=42.186.0.0/16 disabled=no list=netease
add address=42.186.0.0/17 disabled=no list=netease
add address=42.186.128.0/17 disabled=no list=netease
add address=45.127.128.0/22 disabled=no list=netease
add address=45.253.96.0/20 disabled=no list=netease
add address=45.253.96.0/21 disabled=no list=netease
add address=45.253.104.0/21 disabled=no list=netease
add address=45.253.112.0/21 disabled=no list=netease
add address=45.253.112.0/22 disabled=no list=netease
add address=45.253.116.0/22 disabled=no list=netease
add address=45.253.132.0/22 disabled=no list=netease
add address=45.253.132.0/23 disabled=no list=netease
add address=45.253.134.0/23 disabled=no list=netease
add address=45.253.136.0/21 disabled=no list=netease
add address=45.253.136.0/22 disabled=no list=netease
add address=45.253.140.0/22 disabled=no list=netease
add address=45.253.144.0/20 disabled=no list=netease
add address=45.253.144.0/21 disabled=no list=netease
add address=45.253.152.0/21 disabled=no list=netease
add address=45.253.160.0/19 disabled=no list=netease
add address=45.253.160.0/20 disabled=no list=netease
add address=45.253.176.0/20 disabled=no list=netease
add address=45.253.192.0/19 disabled=no list=netease
add address=45.253.192.0/20 disabled=no list=netease
add address=45.253.208.0/20 disabled=no list=netease
add address=45.253.224.0/20 disabled=no list=netease
add address=45.253.224.0/21 disabled=no list=netease
add address=45.253.232.0/21 disabled=no list=netease
add address=45.253.240.0/22 disabled=no list=netease
add address=45.253.240.0/23 disabled=no list=netease
add address=45.253.242.0/23 disabled=no list=netease
add address=59.111.0.0/17 disabled=no list=netease
add address=59.111.0.0/20 disabled=no list=netease
add address=59.111.128.0/17 disabled=no list=netease
add address=59.111.128.0/20 disabled=no list=netease
add address=103.71.120.0/21 disabled=no list=netease
add address=103.71.120.0/22 disabled=no list=netease
add address=103.71.124.0/22 disabled=no list=netease
add address=103.71.128.0/22 disabled=no list=netease
add address=103.71.128.0/23 disabled=no list=netease
add address=103.71.130.0/23 disabled=no list=netease
add address=103.71.196.0/22 disabled=no list=netease
add address=103.71.196.0/23 disabled=no list=netease
add address=103.71.198.0/23 disabled=no list=netease
add address=103.71.200.0/24 disabled=no list=netease
add address=103.71.201.0/24 disabled=no list=netease
add address=103.71.202.0/24 disabled=no list=netease
add address=103.71.203.0/24 disabled=no list=netease
add address=103.72.12.0/22 disabled=no list=netease
add address=103.72.12.0/23 disabled=no list=netease
add address=103.72.14.0/23 disabled=no list=netease
add address=103.72.16.0/22 disabled=no list=netease
add address=103.72.16.0/23 disabled=no list=netease
add address=103.72.18.0/23 disabled=no list=netease
add address=103.72.20.0/22 disabled=no list=netease
add address=103.72.20.0/23 disabled=no list=netease
add address=103.72.22.0/23 disabled=no list=netease
add address=103.72.24.0/22 disabled=no list=netease
add address=103.72.24.0/23 disabled=no list=netease
add address=103.72.26.0/23 disabled=no list=netease
add address=103.72.28.0/22 disabled=no list=netease
add address=103.72.28.0/23 disabled=no list=netease
add address=103.72.30.0/23 disabled=no list=netease
add address=103.72.32.0/22 disabled=no list=netease
add address=103.72.32.0/23 disabled=no list=netease
add address=103.72.34.0/23 disabled=no list=netease
add address=103.72.36.0/22 disabled=no list=netease
add address=103.72.36.0/23 disabled=no list=netease
add address=103.72.38.0/23 disabled=no list=netease
add address=103.72.40.0/22 disabled=no list=netease
add address=103.72.40.0/23 disabled=no list=netease
add address=103.72.42.0/23 disabled=no list=netease
add address=103.72.44.0/22 disabled=no list=netease
add address=103.72.44.0/23 disabled=no list=netease
add address=103.72.46.0/23 disabled=no list=netease
add address=103.72.48.0/21 disabled=no list=netease
add address=103.72.48.0/22 disabled=no list=netease
add address=103.72.52.0/22 disabled=no list=netease
add address=103.72.54.0/24 disabled=no list=netease
add address=103.72.128.0/21 disabled=no list=netease
add address=103.72.128.0/22 disabled=no list=netease
add address=103.72.132.0/22 disabled=no list=netease
add address=103.74.32.0/20 disabled=no list=netease
add address=103.74.32.0/21 disabled=no list=netease
add address=103.74.40.0/21 disabled=no list=netease
add address=103.196.64.0/22 disabled=no list=netease
add address=106.2.32.0/19 disabled=no list=netease
add address=106.2.37.0/24 disabled=no list=netease
add address=106.2.38.0/23 disabled=no list=netease
add address=106.2.40.0/23 disabled=no list=netease
add address=106.2.42.0/24 disabled=no list=netease
add address=106.2.46.0/23 disabled=no list=netease
add address=106.2.48.0/23 disabled=no list=netease
add address=106.2.51.0/24 disabled=no list=netease
add address=106.2.52.0/22 disabled=no list=netease
add address=106.2.56.0/22 disabled=no list=netease
add address=106.2.62.0/23 disabled=no list=netease
add address=106.2.64.0/19 disabled=no list=netease
add address=106.2.64.0/21 disabled=no list=netease
add address=106.2.92.0/22 disabled=no list=netease
add address=106.2.96.0/19 disabled=no list=netease
add address=114.113.196.0/22 disabled=no list=netease
add address=114.113.197.0/24 disabled=no list=netease
add address=114.113.200.0/22 disabled=no list=netease
add address=114.113.200.0/24 disabled=no list=netease
add address=114.113.203.0/24 disabled=no list=netease
add address=123.58.160.0/19 disabled=no list=netease
add address=123.58.161.0/24 disabled=no list=netease
add address=123.58.162.0/23 disabled=no list=netease
add address=123.58.164.0/22 disabled=no list=netease
add address=123.58.168.0/21 disabled=no list=netease
add address=123.58.183.0/24 disabled=no list=netease
add address=123.58.184.0/24 disabled=no list=netease
add address=123.58.186.0/23 disabled=no list=netease
add address=123.58.188.0/24 disabled=no list=netease
add address=123.58.190.0/24 disabled=no list=netease
add address=223.252.192.0/19 disabled=no list=netease
add address=223.252.194.0/24 disabled=no list=netease
add address=223.252.200.0/23 disabled=no list=netease
add address=223.252.205.0/24 disabled=no list=netease
add address=223.252.209.0/24 disabled=no list=netease
add address=223.252.210.0/23 disabled=no list=netease
add address=223.252.212.0/24 disabled=no list=netease
add address=223.252.221.0/24 disabled=no list=netease
add address=223.252.222.0/24 disabled=no list=netease
  1. Create firewall mangle policy to mark traffic.
1
ip/firewall/mangle/add chain=prerouting action=mark-routing new-routing-mark=to-vpn passthrough=yes dst-address=!192.168.88.0/24 dst-address-type=!local dst-address-list=netease in-interface=bridge log=no log-prefix=""