Unblock Netease Cloud Music on RouterOS
2021-11-08 23:04:42
This post is also available in English and alternative languages.
- 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”.
- Assign static DNS record.
1
| ip/dns/static/add name=music.163.com address=59.111.160.195 disabled=no
|
- 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
| ip/firewall/address-list/ add address=42.186.0.0/16 disabled=no list=netease # same as above
|
- 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=""
|