windows server 2008 的路由与远程访问怎么批量添加静态路由

2014-12-12 23:55:10 +08:00
 lshero
双十二 趁着五折活动买了台西部数码的VPS
准备配置成一个远程环境用
用VPN 配置一下翻墙,windows server的远程路由与访问还算是挺好用的
但是添加静态路由貌似只能一条一条添加 请问有没有什么办法批量添加?
另外网络的跃点应该怎么填写?
908 次点击
所在节点    问与答
8 条回复
bellchu
2014-12-13 00:09:09 +08:00
什么叫批量添加和一条条添加? 你是说要做汇总么?
lshero
2014-12-13 00:20:50 +08:00
@bellchu


比如我想让 AS15169下的IP都走某一个VPN 接口一共有 250个IP段 需要我一个一个手工添加嘛?
orzfly
2014-12-13 00:28:32 +08:00
最简单并且当你走投无路的时候:你可以写个 AutoHotkey/按键精灵脚本(死)
bellchu
2014-12-13 00:31:09 +08:00
@lshero 我都是命令行route add写的 GUI真的没玩儿过, 你可以算好汇总再GUI添加也可以,不然那么多要加到手软

1.0.0.0/24
1.1.1.0/24
1.2.3.0/24
8.8.4.0/24
8.8.8.0/24
8.15.202.0/24
8.34.208.0/21
8.34.216.0/21
8.35.192.0/21
8.35.200.0/21
23.236.48.0/20
23.251.128.0/19
64.233.160.0/19
64.233.160.0/24
64.233.161.0/24
64.233.162.0/24
64.233.163.0/24
64.233.164.0/24
64.233.165.0/24
64.233.166.0/24
64.233.167.0/24
64.233.168.0/24
64.233.169.0/24
64.233.171.0/24
64.233.176.0/24
64.233.178.0/24
64.233.180.0/24
64.233.181.0/24
64.233.182.0/24
64.233.183.0/24
64.233.185.0/24
64.233.186.0/24
64.233.187.0/24
66.102.0.0/20
66.102.2.0/24
66.102.3.0/24
66.102.4.0/24
66.249.64.0/19
66.249.64.0/24
66.249.66.0/24
66.249.67.0/24
66.249.68.0/24
66.249.69.0/24
66.249.70.0/24
66.249.71.0/24
66.249.72.0/24
66.249.74.0/24
66.249.75.0/24
66.249.76.0/24
66.249.77.0/24
66.249.78.0/24
66.249.79.0/24
66.249.90.0/24
70.32.128.0/19
70.32.144.0/24
70.32.148.0/23
72.14.192.0/18
72.14.208.0/23
72.14.228.0/24
72.14.244.0/23
74.125.0.0/16
74.125.6.0/24
74.125.16.0/24
74.125.17.0/24
74.125.18.0/24
74.125.19.0/24
74.125.20.0/24
74.125.21.0/24
74.125.22.0/24
74.125.23.0/24
74.125.24.0/24
74.125.25.0/24
74.125.26.0/24
74.125.28.0/24
74.125.29.0/24
74.125.30.0/24
74.125.31.0/24
74.125.36.0/24
74.125.37.0/24
74.125.40.0/24
74.125.41.0/24
74.125.42.0/24
74.125.43.0/24
74.125.45.0/24
74.125.46.0/24
74.125.47.0/24
74.125.53.0/24
74.125.54.0/23
74.125.58.0/24
74.125.63.0/24
74.125.68.0/24
74.125.69.0/24
74.125.70.0/24
74.125.71.0/24
74.125.72.0/24
74.125.73.0/24
74.125.74.0/24
74.125.75.0/24
74.125.76.0/24
74.125.88.0/23
74.125.90.0/23
74.125.113.0/24
74.125.117.0/24
74.125.118.0/24
74.125.119.0/24
74.125.121.0/24
74.125.128.0/24
74.125.129.0/24
74.125.130.0/24
74.125.131.0/24
74.125.133.0/24
74.125.134.0/24
74.125.136.0/24
74.125.137.0/24
74.125.138.0/24
74.125.139.0/24
74.125.141.0/24
74.125.142.0/24
74.125.143.0/24
74.125.176.0/24
74.125.177.0/24
74.125.178.0/24
74.125.181.0/24
74.125.182.0/24
74.125.183.0/24
74.125.184.0/24
74.125.185.0/24
74.125.186.0/24
74.125.187.0/24
74.125.188.0/24
74.125.189.0/24
74.125.190.0/24
74.125.192.0/24
74.125.193.0/24
74.125.194.0/24
74.125.195.0/24
74.125.196.0/24
74.125.198.0/24
74.125.200.0/24
74.125.201.0/24
74.125.202.0/24
74.125.203.0/24
74.125.204.0/24
74.125.205.0/24
74.125.206.0/24
74.125.207.0/24
74.125.224.0/24
74.125.225.0/24
74.125.226.0/24
74.125.227.0/24
74.125.228.0/24
74.125.229.0/24
74.125.230.0/24
74.125.231.0/24
74.125.232.0/24
74.125.233.0/24
74.125.234.0/24
74.125.235.0/24
74.125.236.0/24
74.125.237.0/24
74.125.238.0/24
74.125.239.0/24
104.132.20.0/24
104.154.0.0/15
104.196.0.0/14
107.167.160.0/19
107.178.192.0/18
108.59.80.0/20
108.170.192.0/18
108.177.0.0/17
113.197.106.0/24
130.211.0.0/16
142.250.0.0/15
146.148.0.0/17
162.216.148.0/22
162.222.176.0/21
172.217.0.0/16
172.253.0.0/16
173.194.0.0/16
173.194.32.0/24
173.194.33.0/24
173.194.34.0/24
173.194.35.0/24
173.194.36.0/24
173.194.37.0/24
173.194.38.0/24
173.194.39.0/24
173.194.40.0/24
173.194.41.0/24
173.194.42.0/24
173.194.43.0/24
173.194.44.0/24
173.194.45.0/24
173.194.46.0/24
173.194.47.0/24
173.194.64.0/24
173.194.65.0/24
173.194.66.0/24
173.194.67.0/24
173.194.68.0/24
173.194.70.0/24
173.194.71.0/24
173.194.72.0/24
173.194.73.0/24
173.194.76.0/24
173.194.77.0/24
173.194.78.0/24
173.194.79.0/24
173.194.89.0/24
173.194.90.0/24
173.194.91.0/24
173.194.93.0/24
173.194.96.0/24
173.194.98.0/24
173.194.99.0/24
173.194.112.0/24
173.194.113.0/24
173.194.117.0/24
173.194.118.0/24
173.194.119.0/24
173.194.120.0/24
173.194.121.0/24
173.194.124.0/24
173.194.125.0/24
173.194.126.0/24
173.194.127.0/24
173.194.136.0/24
173.194.140.0/24
173.194.141.0/24
173.194.142.0/24
173.194.193.0/24
173.194.195.0/24
173.255.112.0/20
192.158.28.0/22
192.178.0.0/15
193.142.125.0/24
199.192.112.0/22
199.223.232.0/21
207.223.160.0/20
209.85.128.0/17
216.58.192.0/19
216.239.32.0/19
216.239.32.0/24
216.239.33.0/24
216.239.34.0/24
216.239.35.0/24
216.239.36.0/24
216.239.38.0/24
216.239.39.0/24
216.239.44.0/23
bellchu
2014-12-13 00:37:16 +08:00
@lshero 忘记说了,route add 最后加-p开关会把路由表写到注册表,下次开机就会自动调用路由表
lshero
2014-12-13 00:45:28 +08:00
@bellchu 我现在正在干这件事情 用notpad++ 批量替换把 /24 替换成 mask 255.255.255.0 网关名称 等会儿前面的route add 再打打换行符的主意吧
bellchu
2014-12-13 01:06:08 +08:00
@lshero 别忘了加-p开关,不然重启又要重来
lshero
2014-12-13 01:11:39 +08:00
@bellchu 好的,谢谢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/153563

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX