2.84 - Cannot route through VPN
-
- Posts: 25
- youtube meble na wymiar Warszawa
- Joined: Mon Jan 20, 2014 3:29 am
2.84 - Cannot route through VPN
I have VPN connected, with 'Route all traffice [sic] through the VPN Server' disabled.
With the transmission daemon stopped, I've updated transmission/config/settngs.json's bind-address-ipv4 to my tun255 adapter address (a random 10.0.0.0/8 address). The documentation says that transmission's traffic should then use that gateway for all traffic (except RPC). However, transmission traffic just stops altogether.
With the transmission daemon stopped, I've updated transmission/config/settngs.json's bind-address-ipv4 to my tun255 adapter address (a random 10.0.0.0/8 address). The documentation says that transmission's traffic should then use that gateway for all traffic (except RPC). However, transmission traffic just stops altogether.
- mafredri
- Posts: 371
- Joined: Sat Mar 22, 2014 8:41 am
Re: 2.84 - Cannot route through VPN
Hi, I realize this is a very old post but thought I'd chime in.
With the "route all traffic" option disabled there will be no gateway setup on the NAS for the VPN address and therefore traffic cannot be routed through it.
You can see this by loggin into the NAS and typing:
Not a fix, but just a tip.
Regards,
Mathias
With the "route all traffic" option disabled there will be no gateway setup on the NAS for the VPN address and therefore traffic cannot be routed through it.
You can see this by loggin into the NAS and typing:
Code: Select all
ip route
Regards,
Mathias
Hi, I'm new here. Looking to be active in the community and help with development .
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
-
- Posts: 25
- Joined: Mon Jan 20, 2014 3:29 am
Re: 2.84 - Cannot route through VPN
Thanks Mathais. Your tip sent me in the right direction. I now have Transmission using my VPN while all other traffic uses normal routing. This means that I can finally use DDNS, CloudConnect and some other stuff I had been aching to use without compromising anonymity while seeding.mafredri wrote:With the "route all traffic" option disabled there will be no gateway setup on the NAS for the VPN address and therefore traffic cannot be routed through it.
- mafredri
- Posts: 371
- Joined: Sat Mar 22, 2014 8:41 am
Re: 2.84 - Cannot route through VPN
Awesome, glad you managed to work it out!
Hi, I'm new here. Looking to be active in the community and help with development .
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
-
- Posts: 60
- Joined: Tue Apr 28, 2015 6:13 am
Re: 2.84 - Cannot route through VPN
canufrank wrote:Thanks Mathais. Your tip sent me in the right direction. I now have Transmission using my VPN while all other traffic uses normal routing. This means that I can finally use DDNS, CloudConnect and some other stuff I had been aching to use without compromising anonymity while seeding.mafredri wrote:With the "route all traffic" option disabled there will be no gateway setup on the NAS for the VPN address and therefore traffic cannot be routed through it.
Hi canufrank,
I'm looking to do exactly this.
I don't suppose you could post a simple guide, could you?
I'm sure many users could benefit!
Thanks!
-
- Posts: 60
- Joined: Tue Apr 28, 2015 6:13 am
Re: 2.84 - Cannot route through VPN
Guys,
Sorry to bump this, but any help will be very greatly appreciated!
Thanks!
Sorry to bump this, but any help will be very greatly appreciated!
Thanks!
Re: 2.84 - Cannot route through VPN
I too would love to know how you accomplished this as it's a must have for me. I'm about to pick up my first ever NAS in the Asustor 5104T and one of the things I'll be using is Transmission for torrent downloads. If you could share how you accomplished binding transmission to the VPN while routing all other traffic normally, that would be awesome!
Thanks
Thanks
-
- Posts: 154
- Joined: Sat Aug 02, 2014 2:02 am
Re: 2.84 - Cannot route through VPN
Interested too. Any hint?
AS-304T
If you own a series 2/3/6 Asustor it's very likely you won't get XBMC 13.x/Kodi.
But easily you'll end buying a kitchen from UK.
If you own a series 2/3/6 Asustor it's very likely you won't get XBMC 13.x/Kodi.
But easily you'll end buying a kitchen from UK.
- mafredri
- Posts: 371
- Joined: Sat Mar 22, 2014 8:41 am
Re: 2.84 - Cannot route through VPN
Could you provide more details on what you're trying to do?
If it's just getting Transmission to communicate through VPN and nothing else, then the steps are as follows (WARNING! I assume you are comfortable around the command-line as it's an absolute must):
Note: I hope you realize that the settings below cannot be directly copy pasted onto your NAS, you will need to figure out the values yourself.
When deselecting "route all traffic" for the VPN connection if means that the routes associated with it will not get set up automatically by the NAS. By default, your routing table should look something like this:
What you want is something like:
This allows the NAS to know how to communicate with the other side of the VPN.
To figure out what the routing table should look like when the VPN is active, you can temporarily enable the "route all traffic" option and reconnect the VPN. Now when you run the table should look a bit different, you can use this as a reference point for creating the new routes.
Personally I use a the ip-binary from iproute2 which is a bit more advanced than the one included on the NAS (which is busybox based).
With it I use this to set up the routes (PS. table 42 is arbitrary, it could just as well be 10, 99 or whatever):
Here's an example of the variable values:
Hopefully this can help you guys.
Cheers,
Mathias
If it's just getting Transmission to communicate through VPN and nothing else, then the steps are as follows (WARNING! I assume you are comfortable around the command-line as it's an absolute must):
- Steup VPN through Settings -> VPN. And do NOT enable "route all traffic".
- Connect VPN
- Make sure the VPN routing table is properly set up (see below)
- Stop Transmission in AppCentral (because changes to settings.json do not take affect if Transmission is running!)
- In Transmissions settings.json, set: (or whatever the IP address you get through the VPN is, you can see this by looking at tun[0-9] in ifconfig and looking at the value of "inet addr:")
Code: Select all
"bind-address-ipv4": "192.168.255.6"
- Start Transmission in AppCentral
- Profit?
Note: I hope you realize that the settings below cannot be directly copy pasted onto your NAS, you will need to figure out the values yourself.
When deselecting "route all traffic" for the VPN connection if means that the routes associated with it will not get set up automatically by the NAS. By default, your routing table should look something like this:
Code: Select all
root@Sunny:/volume1/.@root # ip route
default via 192.168.0.1 dev eth0
192.168.0.0/24 dev eth0 src 192.168.0.100
Code: Select all
root@Sunny:/volume1/.@root # ip route
default via 192.168.0.1 dev eth0
80.0.0.0/1 via 192.168.255.5 dev tun0
80.100.40.145 via 192.168.0.1 dev eth0
192.168.0.0/24 dev eth0 src 192.168.0.100
192.168.255.1 via 192.168.255.5 dev tun0
192.168.255.5 dev tun0 src 192.168.255.6
To figure out what the routing table should look like when the VPN is active, you can temporarily enable the "route all traffic" option and reconnect the VPN. Now when you run
Code: Select all
ip route
Personally I use a the ip-binary from iproute2 which is a bit more advanced than the one included on the NAS (which is busybox based).
With it I use this to set up the routes (PS. table 42 is arbitrary, it could just as well be 10, 99 or whatever):
Code: Select all
# Cleanup
$IP route flush table 42
$IP rule del from all to $ifconfig_local lookup 42
$IP rule del from $ifconfig_local lookup 42
$IP route add $trusted_ip via $route_net_gateway dev $ETH
$IP route add 80.0.0.0/1 via $ifconfig_remote dev $TUN
$IP route add 0.0.0.0/1 via $ifconfig_remote dev $TUN table 42
$IP rule add from all to $ifconfig_local lookup 42
$IP rule add from $ifconfig_local lookup 42
Code: Select all
IP=/path/to/ip
ETH=eth0
TUN=tun0
ifconfig_local=192.168.255.6
ifconfig_remote=192.168.255.5
trusted_ip=80.100.40.145
route_net_gateway=192.168.0.1
Hopefully this can help you guys.
Cheers,
Mathias
Hi, I'm new here. Looking to be active in the community and help with development .
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
- mafredri
- Posts: 371
- Joined: Sat Mar 22, 2014 8:41 am
Re: 2.84 - Cannot route through VPN
Finally, you can use a service like ipMagnet to figure out if your setup is working properly.
Hi, I'm new here. Looking to be active in the community and help with development .
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)