在论坛里搜了下,基本就是配置路由表,默认 en0 访问外网,en11 设置指定的网段访问内网。
由于我的梯子被 imgur 屏蔽了,访问 403 ,下面只好贴文字了,辛苦大家的眼睛了。
ifconfig 的信息如下:
en0: flags=8863[U] mtu 1500
options=6460
ether f8:4d:89:66:ba:a0
inet6 fe80::83b:23a4:c8cd:863e%en0 prefixlen 64 secured scopeid 0xe
inet 172.20.10.2 netmask 0xfffffff0 broadcast 172.20.10.15
inet6 2408:8409:1840:b58d:c3b:b228:a437:3699 prefixlen 64 autoconf secured
inet6 2408:8409:1840:b58d:250f:9a82:b170:5790 prefixlen 64 autoconf temporary
nd6 options=201
media: autoselect
status: active
en11: flags=8863[U] mtu 1500
options=6464
ether 00:e1:6c:68:2a:72
inet6 fe80::72:db57:6430:b797%en11 prefixlen 64 secured scopeid 0xf
inet 172.27.136.101 netmask 0xffffff00 broadcast 172.27.136.255
nd6 options=201
media: autoselect (1000baseT )
status: active
尝试过的命令:
sudo route add -net 192.168.0.0/24 -interface en11
和
sudo route add -net 192.168.0.0/24 172.27.136.1
路由表的信息如下
Internet:
Destination Gateway Flags Netif Expire
default 172.20.10.1 UGScg en0
default 172.27.136.1 UGScIg en11
127 127.0.0.1 UCS lo0
127.0.0.1 127.0.0.1 UH lo0
169.254 link#14 UCS en0 !
169.254 link#15 UCSI en11 !
172.20.10/28 link#14 UCS en0 !
172.20.10.1/32 link#14 UCS en0 !
172.20.10.1 1a:fa:b7:21:ee:64 UHLWIir en0 1019
172.20.10.2/32 link#14 UCS en0 !
172.20.10.2 f8:4d:89:66:ba:a0 UHLWI lo0
172.27.136/24 link#15 UCS en11 !
172.27.136.1/32 link#15 UCS en11 !
172.27.136.1 ec:b9:70:b3:e9:27 UHLWIir en11 1199
172.27.136.101/32 link#15 UCS en11 !
192.168.0 172.27.136.1 UGSc en11
224.0.0/4 link#14 UmCS en0 !
224.0.0/4 link#15 UmCSI en11 !
224.0.0.251 1:0:5e:0:0:fb UHmLWI en0
239.255.255.250 1:0:5e:7f:ff:fa UHmLWI en0
239.255.255.250 1:0:5e:7f:ff:fa UHmLWI en11
255.255.255.255/32 link#14 UCS en0 !
255.255.255.255/32 link#15 UCSI en11 !
en11, inet6, options, prefixlen