PIA BIND Interface on QVPN Reconnect

Joe

Nowy użytkownik
Noobie
14 Maj 2019
8
2
3
44
10021
QNAP
TS-x70 Pro
Ethernet
1 GbE
The local network changes on every PIA reconnect via QVPN. Once the VPN reconnects which can happen a couple times per day the new local network/IP is different. This requires a restart on the rtorrent app which will re-populate the dropdown box in settings. Which as far as i can tell will rebind to the default adapter. Until this change is made once again.

I would like to know if there is anything currently built-in to help with this behavior or if this behavior can be changed? Furthermore if not can you please give me a brief description of the order of events and what script changes the gateway and where the watchdog script is located. I would like to see if i can modify.

I will do the work myself but I am not 100% sure of where to look. As of now I see that in the startup sh script it pulls the interfaces and writes to a test file. I am not sure but I believe the text file is used to populate the dropdown in settings. When the settings are saved I believe it relaunches the daemon with the correct gateway.

What I propose to do is within the watchdog, determine and save local public IP and current private IP on the tunnel along with the adapter. While checking the service, determine if the local tun ip has changed. If so correct the IP file, and also restart daemon with new private IP of new tunnel. Also i would like to make it so the daemon has a blacklist which will never allow binding to certain ips/adapters.

Firmware version: 4.3.6 Build 20190923
Model name: QNAP TS-1677X
 
i must say the program is awesome just has a few small issues once you work them out itll be by far the best program out there
by interface name you mean tun2002 or more?
 
so just to confirm if i set the config the way you said even when my vpn disconnects and assigns a new ip address and reconnects aslong as its still called tun2002 rtorrent will continue to use it? lets just say the vpn disconnects for 10min for example for the 10minutes its disconnected rtorrent wont download and then when it reconnects it will resume downloading from the vpn?