- 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.
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
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.
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=""