After logging into VPN, set the routing table and access the intranet and internet at the same time

After Windows connects to VPN, all data will be forwarded by VPN gateway by default, so it is impossible to use the external network.

resolvent

1、 Cancel default gateway

  1. Find the VPN connection in the Network and Security Center, right click Properties, and click the Network tab in the pop-up Properties panel.

 Vpn setting 1

  1. Select IPv4 Or IPv6 as appropriate, click the attribute button, and click Advanced in the pop-up tab.

 Vpn setting 1

  1. Uncheck "Use default gateway on remote network" in the IP settings tab.

 Vpn setting 1

Your data will not be sent through the VPN gateway.

2、 Add static routing table

Adding a routing table can make some IP segments go to the intranet.

  1. Connect to VPN to obtain the intranet IP assigned by VPN.
     Vpn setting 1
  2. Execute the following command
 #192.168.1.0 is the IP segment you want to access, the mask subnet mask, and the IP assigned to VPN in 10.2.0.2 route add 192.168.1.0 mask 255.255.255.0 10.2.0.2

At this point, you can access the intranet while accessing the internet. The assigned IP address will change after each VPN connection, so it is not necessary to use the route persistence parameter.

Zimiao haunting blog (azimiao. com) All rights reserved. Please note the link when reprinting: https://www.azimiao.com/4665.html
Welcome to the Zimiao haunting blog exchange group: three hundred and thirteen million seven hundred and thirty-two thousand

Comment

*

*