- 假设单独网关的 IP 为
10.20.31.1
- RouterOS 建立 Address List, 下文中
10.20.30.145
为内网客户端 IP
/ip firewall address-list
add address=10.20.30.145 list=gateway
- DNS 劫持,Address List 里的客户端解析强制使用
198.18.0.2
解析
10.20.31.1
10.20.30.145
为内网客户端 IP/ip firewall address-list
add address=10.20.30.145 list=gateway
198.18.0.2
解析
--By pufand | |
function initWIFI() | |
print("Setting up WIFI...") | |
wifi.setmode(wifi.STATION) | |
wifi.sta.config("<你无线路由器的SSID号>", "<你无线路由器的密码>") | |
wifi.sta.connect() | |
tmr.alarm(1, 1000, 1, | |
function() | |
if wifi.sta.getip()== nil then | |
print("IP unavailable, Waiting...") |