Prevent client from using internet via my RRAS VPN

时间:2017-04-24 17:20:43

标签: azure networking virtual-machine vpn rras

I have a windows server 2016 running in Azure with RRAS VPN + NAT. I use this RRAS VPN to be able to RDP to my other VM's in the virtual network. However, when I connect my client (windows 10) computer to the RRAS VPN, my internet will stop working on the client (because internet access is blocked on the RRAS VM).

How can I prevent the client from trying to use the internet that my RRAS VPN VM provides? I tried disabling the use-default-gateway checkbox, but then I can no longer connect to my other VM's in the virtual network.

Thanks!

1 个答案:

答案 0 :(得分:-1)

根据this link,当您禁用“use-default-gateway”复选框时,默认路由不会添加到您的计算机中。具体来说:

  

如果“远程网络上的用户默认网关”已打开,则VPN隧道连接成功的VPN客户端会在VPN接口上添加具有最高优先级的默认路由。这样,所有IP数据包(发往本地子网的数据包除外)都会转到VPN服务器。如果关闭此参数,则不会在VPN隧道上添加默认路由。此方案将要求用户在VPN接口上添加特定的网络特定路由 - 以便到达企业网资源

因此,您需要手动编辑路线以确保它们正常工作。通过使用路由表,您可以在Windows中轻松完成此操作。 following article提供了如何设置此内容的基础知识。

基本上你会想要运行这样的东西:

route ADD <azure network> MASK <azure mask> <azure gw ip>

完成此操作后,您应该能够使用互联网(通过本地配置)并访问Azure服务器(通过您在上面创建的路线)。