Score:1

Routing VPN access shared folder not working, other request type (ping, http, git) working

ma flag

My Windows 10 client Routing throught vpn is working, pinging signal and other type of request (http, git, ...) also go through the VPN interface

only access windows sharing folder is not - it always go through default gateway , cause of my client's gateway is able to connect direct to the server.

If I delete the route to the default gateway, then the accessing to Shared folder is through the VPN

How can I fully route to the server without delete the default route. The shared folder server is 10.10.2.195

This is route table ( I also changed the route metric, but it is not working for access shared folder \10.10.2.195)

C:\Windows\system32>route print
===========================================================================
Interface List
 16...........................Wintun Userspace Tunnel
 12...00 0c 29 1e 70 58 ......Intel(R) 82574L Gigabit Network Connection
 10...00 ff 7d 93 6c 4d ......TAP-Windows Adapter V9
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.139.2  192.168.139.134    375
          0.0.0.0        128.0.0.0        10.71.0.9       10.71.0.10    281
        10.10.1.0    255.255.255.0        10.71.0.9       10.71.0.10    281
        10.10.2.0    255.255.255.0        10.71.0.9       10.71.0.10     27
        10.71.0.0    255.255.255.0        10.71.0.9       10.71.0.10    281
        10.71.0.8  255.255.255.252         On-link        10.71.0.10    281
       10.71.0.10  255.255.255.255         On-link        10.71.0.10    281
       10.71.0.11  255.255.255.255         On-link        10.71.0.10    281
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
        128.0.0.0        128.0.0.0        10.71.0.9       10.71.0.10    281
   171.244.61.115  255.255.255.255    192.168.139.2  192.168.139.134    281
    192.168.139.0    255.255.255.0         On-link   192.168.139.134    281
  192.168.139.134  255.255.255.255         On-link   192.168.139.134    281
  192.168.139.255  255.255.255.255         On-link   192.168.139.134    281
     218.54.150.0    255.255.255.0        10.71.0.9       10.71.0.10    281
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link        10.71.0.10    281
        224.0.0.0        240.0.0.0         On-link   192.168.139.134    281
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link        10.71.0.10    281
  255.255.255.255  255.255.255.255         On-link   192.168.139.134    281
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    331 ::1/128                  On-link
 10    281 fe80::/64                On-link
 12    281 fe80::/64                On-link
 10    281 fe80::58e:2793:89a2:3455/128
                                    On-link
 12    281 fe80::94df:f425:f6cc:f67b/128
                                    On-link
  1    331 ff00::/8                 On-link
 10    281 ff00::/8                 On-link
 12    281 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

And after delete (then it works - accessing Share folder work through the VPN)

route delete 0.0.0.0 mask 0.0.0.0

How can I fully route (accessing shared folder) to the server via VPN without delete the default route?

vidarlo avatar
ar flag
The only odd route in there is 0.0.0.0/1. Apart from that it looks entirely fine; most specific route should win, so your /24 for 10.10.2.0 should win over the generic /1 and /0's which is default routes. What VPN do you use?
MinhNV avatar
ma flag
@vidarlo vpn server is setup by my self, Yes, everything look fine, all of other request (ping, http, git,) to server is going through vpn already, only acccessing shared folder is not, I also check on other client running windows 7 or ubuntu , it works normal. this issue is only happened in windows 10 client.
vidarlo avatar
ar flag
Out of curiosity - could you test with the 0.0.0.0/1 route deleted as well?
MinhNV avatar
ma flag
if delete 0.0.0.0/1 the traffic still going through default, only delete 0.0.0.0/0,then going through vpn.
Score:0
jp flag

It sounds like you want to access a shared folder on a server over a VPN connection, but your client's default gateway is preventing the traffic from going through the VPN.

One way to route the traffic for the shared folder through the VPN would be to create a route on your client's machine specifically for the IP address of the server.

To do this, you can use the "route" command in a Command Prompt or PowerShell window. The syntax for adding a route is as follows:

route -p ADD 10.10.2.195 MASK 255.255.255.0 10.71.0.10 metric 1

This will add the route to the client's persistent routing table, so it will remain even after the machine is restarted.

vidarlo avatar
ar flag
If you read the routing tables posted you will see that they are in fact correct...
MinhNV avatar
ma flag
I tried your route command, and there is no change. I think that route is included in the table I posted already ``` 10.10.2.0 255.255.255.0 10.71.0.9 10.71.0.10 27 ```
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.