Does anyone know how we can bypass VPN from rclone mount command or preferably all rclone commands to google drive so that I can access my cloud drive at full speeds? Is it even possible on windows? Maybe it can done using openvpn?
Manipulate the host routing tables. Openvpn can do this or you can do it yourself with a bat script. This isn't really a rclone question though.
hi,
i am a windows user and use vpn every day.
what kind of vpn are you trying to bypass?
some vpn force all traffic thru the vpn.
some vpn are split, some traffic over vpn some traffic over local network.
if you have an vpn that forces all traffic thru vpn,
then you can do a route delete
so when connected to your vpn, to determine the default route, do a
tracert 8.8.8.8
if you are forced thru the vpn,
do a route print
to understand.
then for example,
route delete 0.0.0.0 192.168.113.1
then all traffic will go thru local lan not vpn
if openvpn, sometimes you can add this to .ovpn
pull-filter ignore redirect-gateway
or
route-nopull
I have nord vpn which forces all traffic through the vpn.
do not know about nordvpn, as i run my own vpn servers.
but the song remains the same
this should be the way to go.
https://rclone.org/docs/#bind-string
if you want a universal solution, then on your windows computer do
-
tracert 8.8.8.8
and -
route print
and post the output.
you want me to run these commands with the vpn turned on ?
do tracert 8.8.8.8
without the vpn and with the vpn
C:\Users\koolkunz>tracert 8.8.8.8
Tracing route to dns.google [8.8.8.8]
over a maximum of 30 hops:
1 1 ms <1 ms <1 ms 192.168.0.1
2 1 ms 1 ms 1 ms redacted
3 * * * Request timed out.
4 3 ms 3 ms 2 ms as15169.del.extreme-ix.net [45.120.248.10]
5 4 ms 3 ms 3 ms 108.170.251.97
6 5 ms 4 ms 4 ms 209.85.252.65
7 3 ms 3 ms 3 ms dns.google [8.8.8.8]
Trace complete.
C:\Users\koolkunz>tracert 8.8.8.8
Tracing route to dns.google [8.8.8.8]
over a maximum of 30 hops:
1 27 ms 28 ms 28 ms 10.8.1.1
2 34 ms 31 ms 31 ms 165.231.253.193
3 31 ms 28 ms 30 ms 43.241.71.65
4 30 ms 33 ms 31 ms 125.19.50.17
5 33 ms 34 ms 34 ms 182.79.239.147
6 30 ms 31 ms 30 ms 72.14.213.254
7 30 ms 30 ms 32 ms 74.125.37.81
8 30 ms 30 ms 30 ms 209.85.252.51
9 30 ms 32 ms 30 ms dns.google [8.8.8.8]
Trace complete.
C:\Users\koolkunz>route print
===========================================================================
Interface List
11...........................NordLynx Tunnel
6...00 ff 27 22 00 de ......TAP-NordVPN Windows Adapter V9
3...20 47 47 77 61 b3 ......Realtek PCIe GBE Family Controller
13...00 ff 70 a4 0b 1b ......TAP-Windows Adapter V9
15...08 d4 0c cc 7c f3 ......Microsoft Wi-Fi Direct Virtual Adapter #4
10...0a d4 0c cc 7c f2 ......Microsoft Wi-Fi Direct Virtual Adapter #5
21...08 d4 0c cc 7c f2 ......Intel(R) Dual Band Wireless-AC 3165
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.0.1 192.168.0.104 40
0.0.0.0 128.0.0.0 10.8.1.1 10.8.1.23 3
10.8.1.0 255.255.255.0 On-link 10.8.1.23 259
10.8.1.23 255.255.255.255 On-link 10.8.1.23 259
10.8.1.255 255.255.255.255 On-link 10.8.1.23 259
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.8.1.1 10.8.1.23 3
165.231.253.195 255.255.255.255 192.168.0.1 192.168.0.104 40
169.254.0.0 255.255.0.0 On-link 169.254.57.70 256
169.254.57.70 255.255.255.255 On-link 169.254.57.70 256
169.254.255.255 255.255.255.255 On-link 169.254.57.70 256
192.168.0.0 255.255.255.0 On-link 192.168.0.104 296
192.168.0.104 255.255.255.255 On-link 192.168.0.104 296
192.168.0.255 255.255.255.255 On-link 192.168.0.104 296
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.8.1.23 259
224.0.0.0 240.0.0.0 On-link 192.168.0.104 296
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.8.1.23 259
255.255.255.255 255.255.255.255 On-link 192.168.0.104 296
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 331 ::1/128 On-link
1 331 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
Here the first tracert is without vpn then the 2nd tracert is with vpn
good,
now do ipconfig
without the vpn
C:\Users\koolkunz>ipconfig
Windows IP Configuration
Unknown adapter NordLynx:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::8df6:2969:45f4:3946%11
Autoconfiguration IPv4 Address. . : 169.254.57.70
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : domain.name
Ethernet adapter Ethernet 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Unknown adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 12:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 14:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e860:bc6a:a23c:216a%21
IPv4 Address. . . . . . . . . . . : 192.168.0.104
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
i would add this to your rclone command, connect to your vpn and test.
--bind=192.168.0.104
Ok let me try this bind parameter
It did not work. Keep getting this error with vpn on:
2020/05/09 05:14:23 ERROR : Encrypted drive 'gcrypt:': Statfs failed: failed to get Drive storageQuota: Get https://www.googleapis.com/drive/v3/about?alt=json&fields=storageQuota&prettyPrint=false: dial tcp 192.168.0.104:0->216.58.203.42:443: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.
The service rclone has been started.
2020/05/09 05:14:26 ERROR : /: Dir.Stat error: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%29%2CnextPageToken%2CincompleteSearch&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%27xxxxxxxxxxxxxxxA%27+in+parents%29+and+%28name%3D%27Plex%27%29+and+mimeType%3D%27application%2Fvnd.google-apps.folder%27&supportsAllDrives=true: dial tcp 192.168.0.104:0->216.58.203.42:443: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.
Note: If vpn is off then the bind command works without any issue
then what @calisro wrote above, you need to tweak the routing table, not really a rclone question.
but there would a route of 0.0.0.0
that should be deleted or change its metric priority.
0.0.0.0 0.0.0.0 192.168.255.5 192.168.255.6 1024
you can contact nordvpn tech support and they can help you with the details.
ok I will try asking nord tech support
let us know what nordvpn has to say...
Sure I think they will tell me to do it using openvpn.
then for sure,
you can connect to their openvpn and then tweak the routing table after you are connected.
that always works...
- Run cmd.exe: Windows XP - Start -> Run -> type 'command' ...
- Find out your gateway IP address (this is usually the IP address of your router). ...
- Find out the IP address of the website you want to bypass . ...
- At the command prompt type 'route add [website IP] [gateway IP]'
your suggestion might work for one website, but most large websites have many ip addresses and load balance them. so the ipaddress could and would change all the time.
to force rclone traffic to use the local network, --bind
would get that done
if the goal is to prevent all traffic from being forced
over the slow vpn connection.
then a route delete
is needed
for example,
before i connect to the vpn
tracert 8.8.8.8
1 1 ms <1 ms 1 ms pfsense01.localdomain [192.168.62.1]
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.62.1 192.168.62.234 25
after connected to vpn.
all traffic is forced
thru vpn by default route.
tracert 8.8.8.8
1 117 ms 86 ms 86 ms 192.168.255.1
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.62.1 192.168.62.234 25
0.0.0.0 0.0.0.0 192.168.255.5 192.168.255.6 1024
now a route delete
of the route added by vpn
route delete 0.0.0.0 192.168.255.5
OK!
when tracert is run, once again, traffic, by default, goes over the local network, not the vpn.
tracert 8.8.8.8
1 <1 ms <1 ms <1 ms pfsense01.localdomain [192.168.62.1]