Setup Routing Settings for Multiple VPNs Connection


If the line that can access the server is limited, VPN is often used to clear it, even in simple way, VPN is used to access the company server during telework, and it connects to the VPN server on the Internet to fix the connection source IP. By the way, if you use a lot of VPN connections , then the routing will be messed up, and you may not be able to access the target server even though you are connected to the VPN.

Example case

Case explanation

  • Communication to the Internet does not go via VPN connection.
  • Communication to the FILE SERVER goes via VPN1 connection.
  • Communication to the WEB SERVER is via VPN2 connection.

Setup that will allow us to achieve this

Remove the default gateway setting of VPN.

  1. Press the Windows key + R key to start Run.
  2. Type control ncpa.cpl to open the network connection in Control Panel.
  3. Choose network adapter for VPN connection and select Properties from the right-click menu.
  4. Select Internet Protocol Version 4
  5. Click the Properties
  6. Click the Advanced
  7. Clear checkbox Use default gateway on remote network
  • Communication to the FILE SERVER goes via VPN1 connection.

Set the communication to a specific server to go via VPN.

  • Press the start button and enter cmd
  • Right click on command prompt
  • Select Run as administrator
  • Add route route add

DevOps Consultant. I’m strongly focused on automation, security, and reliability.