标题:
WireGuard例外的路由的设置方法
[打印本页]
作者:
linda
时间:
2022-10-25 09:48
标题:
WireGuard例外的路由的设置方法
WireGuard配置文件中没有例外路由设置,只能通过列出全部必须的路由(AllowedIPs)的方式间接实现,可以使用“WIREGUARD ALLOWEDIPS CALCULATOR”网页工具实现这一目的,网址是:
https://www.procustodibus.com/blog/2021/03/wireguard-allowedips-calculator/
例如:
Allowed IPs = 0.0.0.0/0
Disallowed IPs = 114.114.114.114,202.103.24.68
生成结果:
AllowedIPs = 0.0.0.0/2, 64.0.0.0/3, 96.0.0.0/4, 112.0.0.0/7, 114.0.0.0/10, 114.64.0.0/11, 114.96.0.0/12, 114.112.0.0/15, 114.114.0.0/18, 114.114.64.0/19, 114.114.96.0/20, 114.114.112.0/23, 114.114.114.0/26, 114.114.114.64/27, 114.114.114.96/28, 114.114.114.112/31, 114.114.114.115/32, 114.114.114.116/30, 114.114.114.120/29, 114.114.114.128/25, 114.114.115.0/24, 114.114.116.0/22, 114.114.120.0/21, 114.114.128.0/17, 114.115.0.0/16, 114.116.0.0/14, 114.120.0.0/13, 114.128.0.0/9, 115.0.0.0/8, 116.0.0.0/6, 120.0.0.0/5, 128.0.0.0/2, 192.0.0.0/5, 200.0.0.0/7, 202.0.0.0/10, 202.64.0.0/11, 202.96.0.0/14, 202.100.0.0/15, 202.102.0.0/16, 202.103.0.0/20, 202.103.16.0/21, 202.103.24.0/26, 202.103.24.64/30, 202.103.24.69/32, 202.103.24.70/31, 202.103.24.72/29, 202.103.24.80/28, 202.103.24.96/27, 202.103.24.128/25, 202.103.25.0/24, 202.103.26.0/23, 202.103.28.0/22, 202.103.32.0/19, 202.103.64.0/18, 202.103.128.0/17, 202.104.0.0/13, 202.112.0.0/12, 202.128.0.0/9, 203.0.0.0/8, 204.0.0.0/6, 208.0.0.0/4, 224.0.0.0/3
[
本帖最后由 linda 于 2022-10-25 10:38 编辑
]
欢迎光临 中神通公司技术论坛 (http://trustcomputing.com.cn/bbs/)
Powered by Discuz! 6.0.0