OpenVPN + OpenWrt 的内网穿透方案

二、Home Client 安装

路由器 IP 地址配置

1
2
3
4
5
6
7
uci set network.lan.proto='static'
uci set network.lan.ipaddr='192.168.73.3'
uci set network.lan.netmask='255.255.255.0'
uci set network.lan.gateway='192.168.73.1'
uci set network.lan.dns='192.168.73.1'
uci commit network
service network restart

路由器 Firewall 放通

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list device 'tun0'

config forwarding
option src 'lan'
option dest 'wan'

config forwarding
option src 'wan'
option dest 'lan'

MacOS 清理 DNS 缓存的命令

1
sudo killall -HUP mDNSResponder

如何在OpenWrt上配置运行OpenVPN服务器
OpenWrt:关于 OpenVPN 扩展的说明
Mac OS路由设置常用命令
抓包工具tcpdump用法说明