配置vpn,特定ip使用vpn,其余ip正常访问

来源:互联网 发布:服务器数据库查询地址 编辑:程序博客网 时间:2024/05/06 00:27

配置vpn,特定ip使用vpn,其余ip正常访问

把代码粘贴到文本里,改后缀为。bat后,按步骤配置完vpn后双击。bat文件

代码里有详细的注释

@echo off


rasdial VPN连接 vpn  2014.nb
#first set vpn connect named VPN链接  id: vpn  passwd: 2014.nb 
#then set vpn-->tcp/ipv4-->attribute-->highLevel-->unButton use default remote gateway


#route add 222.100.98.237 mask 255.255.255.0 %ip%
# first 222.100.92.237 is the definition address, and so the mask is, the second 222.100.98.237 is vpn ip address.
route add -p 222.100.98.237 mask 255.255.255.255 222.100.98.237 metric 2
pause

0 0
原创粉丝点击