Jump to content
Not connected, Your IP: 18.219.231.197
Sign in to follow this  
Negiiiii

Last step w/ splitting my Internet (torrents w/ VPN)

Recommended Posts

Hi, 

 

So I just got into AirVPN & into splitting my internet : I want my torrents to deal with the VPN data and I want everything but torrents to deal with my "real" internet. So I followed the tutorial from A to Z but the last step got me in trouble...

 

I'm kinda not good when it comes to computer things and I just can't get the "Routing Table Changes to Restore Native Gateway" part... I created the bat + VPN folders and put my 2 bat files in but... What should I do with those 2 bat files and their short cuts ? Do I have to open them every time VPN's up ? VPN's down... ? Or do I have to let them in the folders and that's it... ? If someone could just explain that part the easiest way haha... It would be really nice! Cuz I don't know what I should do with these 2 bat files... haha!

 

Thanks for your help!

Share this post


Link to post

Hi,

 

So I just got into AirVPN & into splitting my internet : I want my torrents to deal with the VPN data and I want everything but torrents to deal with my "real" internet. So I followed the tutorial from A to Z but the last step got me in trouble...

 

I'm kinda not good when it comes to computer things and I just can't get the "Routing Table Changes to Restore Native Gateway" part... I created the bat + VPN folders and put my 2 bat files in but... What should I do with those 2 bat files and their short cuts ? Do I have to open them every time VPN's up ? VPN's down... ? Or do I have to let them in the folders and that's it... ? If someone could just explain that part the easiest way haha... It would be really nice! Cuz I don't know what I should do with these 2 bat files... haha!

 

Thanks for your help!

I will assume you have used the same names as in the guide.

 

After you start the VPN, you must run the one called "VPN_gateway_suspend.bat" after you start the VPN, in order to get back to using the "real" interface for everything besides torrents.

 

If at some point you want to use the VPN for browsing for a while, then run "VPN_gateway_restore.bat". When you want to go back to using the real interface again run "VPN_gateway_suspend.bat".

 

After you stop the VPN , you can run "VPN_gateway_restore.bat" to remove the double definition of the real gateway from the routing table, to get back to how things were before you started. You could also run "VPN_gateway_restore.bat" just before you stop the VPN instead. Or in fact you could just leave the double definition of the real gateway in the routing table. It should do no harm.

 

Update:

 

If you do not want to have to run the "VPN_gateway_restore.bat" script by hand after you start the VPN, then assuming that the script is in "C:\bat\VPN\VPN_gateway_restore.bat" (as in the guide) then you could add some lines to your OpenVPN config files by ticking "Advanced Mode" and entering the lines under "Custom directives:" on the AirVPN "Configuration Generator" page. The lines to enter are:

script-security 2
up 'C:\\bat\\VPN\\VPN_gateway_suspend.bat'
This will just leave the double definition of the gateway in place when you stop the VPN, which as I said above should do no harm. If you want the double definition removed then the lines you add should be:
script-security 2
up 'C:\\bat\\VPN\\VPN_gateway_suspend.bat'
down 'C:\\bat\\VPN\\VPN_gateway_restore.bat'
Update 2:

 

It turns out that the AirVPN Configuration Generator does not handle "/" characters correctly when they are used in "Custom directives:".

 

So instead you will have to add these lines instead:

script-security 2
up 'VPN_gateway_suspend.bat'
down 'VPN_gateway_restore.bat'
And then copy the scripts you created in with the "*.ovpn" files.

 

I had not realized this because I have my own methods for customizing configuration files.

 

I have cross posted this to the thread for discussing my guide:

https://airvpn.org/topic/9491-guide-to-setting-up-vpn-just-for-torrenting-on-windows/

Share this post


Link to post

Wow, you're amazing... Thank you very much for that answer... And while we're here, maybe I can add something to that "Custom directives:" so that the two other .bat files go ON/OFF when they should ? I'm talking about these two .BAT files : 

 

route delete 0.0.0.0 192.168.1.254

route add 0.0.0.0 mask 0.0.0.0 192.168.1.254

 
If so, can you please make a quote of what I should copy and paste in that "Custom directives:" ? I'm not lazy, just scared to do something wrong to be honest! I won't forget to change the IP adress with the VPN server one tho, don't worry!
 
Once again, thanks very much for your help!!

Share this post


Link to post

EDIT : Okay so I've just tried to do what you told me which is copying 

 

script-security 2
up 'C:\bat\VPN\VPN_gateway_suspend.bat'
down 'C:\bat\VPN\VPN_gateway_restore.bat'

 

into "Custom directives:" but then, after generating + erasing the "old" config folder by the new one, I can't connect to one server... I mean, if I try to connect to a server, the window stays white (with no text showing) before saying "failed". 

 

And I guess it's because of that script because I re-generated another folder w/o the script and everything worked again...

 

Thanks for your help!

Share this post


Link to post

EDIT : Okay so I've just tried to do what you told me which is copying 

 

script-security 2

up 'C:\bat\VPN\VPN_gateway_suspend.bat'

down 'C:\bat\VPN\VPN_gateway_restore.bat'

 

into "Custom directives:" but then, after generating + erasing the "old" config folder by the new one, I can't connect to one server... I mean, if I try to connect to a server, the window stays white (with no text showing) before saying "failed". 

 

And I guess it's because of that script because I re-generated another folder w/o the script and everything worked again...

 

Thanks for your help!

It turns out that the AirVPN Configuration Generator does not handle "\" characters correctly when they are used in "Custom directives:".

 

So instead you will have to add these lines instead:

script-security 2
up 'VPN_gateway_suspend.bat'
down 'VPN_gateway_restore.bat'
And then copy the scripts you created in with the "*.ovpn" files.

 

I had not realized this because I have my own methods for customizing configuration files.

Share this post


Link to post

Okay so I've just tried what you told me to do, another solution, another problem haha.

 

So I did re-generated the ZIP file, copied/pasted all of the ovpn files into the config folder + copied/pasted the 2 bat files and their shortcurts in that same folder (I did not copy the bat/VPN folders where the two bat files were tho!) and now, when I want to connect to one server, the window opens and the last line loaded is : 

 

"Sun Nov 02 18:05:17 2014 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)"

 

Nothing happens since then... No "failed" message, no "successed"... The window is here with all the text and I'm waiting... haha

 

Sun Nov 02 18:05:12 2014 OpenVPN 2.3.5 x86_64-w64-mingw32 [sSL (OpenSSL)] [LZO] [PKCS11] [iPv6] built on Oct 28 2014
Sun Nov 02 18:05:12 2014 library versions: OpenSSL 1.0.1j 15 Oct 2014, LZO 2.05
Sun Nov 02 18:05:12 2014 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25344
Sun Nov 02 18:05:12 2014 Need hold release from management interface, waiting...
Sun Nov 02 18:05:12 2014 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25344
Sun Nov 02 18:05:12 2014 MANAGEMENT: CMD 'state on'
Sun Nov 02 18:05:12 2014 MANAGEMENT: CMD 'log all on'
Sun Nov 02 18:05:12 2014 MANAGEMENT: CMD 'hold off'
Sun Nov 02 18:05:12 2014 MANAGEMENT: CMD 'hold release'
Sun Nov 02 18:05:12 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sun Nov 02 18:05:13 2014 Control Channel Authentication: tls-auth using INLINE static key file
Sun Nov 02 18:05:13 2014 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Nov 02 18:05:13 2014 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Nov 02 18:05:13 2014 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Nov 02 18:05:13 2014 UDPv4 link local: [undef]
Sun Nov 02 18:05:13 2014 UDPv4 link remote: [AF_INET]199.21.149.44:443
Sun Nov 02 18:05:13 2014 MANAGEMENT: >STATE:1414947913,WAIT,,,
Sun Nov 02 18:05:13 2014 MANAGEMENT: >STATE:1414947913,AUTH,,,
Sun Nov 02 18:05:13 2014 TLS: Initial packet from [AF_INET]199.21.149.44:443, sid=74c02cf2 8eb6f5d9
Sun Nov 02 18:05:13 2014 VERIFY OK: depth=1, C=IT, ST=IT, L=Perugia, O=airvpn.org, CN=airvpn.org CA, emailAddress=info@airvpn.org
Sun Nov 02 18:05:13 2014 Validating certificate key usage
Sun Nov 02 18:05:13 2014 ++ Certificate has key usage  00a0, expects 00a0
Sun Nov 02 18:05:13 2014 VERIFY KU OK
Sun Nov 02 18:05:13 2014 Validating certificate extended key usage
Sun Nov 02 18:05:13 2014 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sun Nov 02 18:05:13 2014 VERIFY EKU OK
Sun Nov 02 18:05:13 2014 VERIFY OK: depth=0, C=IT, ST=IT, L=Perugia, O=airvpn.org, CN=server, emailAddress=info@airvpn.org
Sun Nov 02 18:05:15 2014 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Sun Nov 02 18:05:15 2014 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Nov 02 18:05:15 2014 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Sun Nov 02 18:05:15 2014 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Nov 02 18:05:15 2014 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 4096 bit RSA
Sun Nov 02 18:05:15 2014 [server] Peer Connection Initiated with [AF_INET]199.21.149.44:443
Sun Nov 02 18:05:16 2014 MANAGEMENT: >STATE:1414947916,GET_CONFIG,,,
Sun Nov 02 18:05:17 2014 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)"
 
I guess I shall stick with opening my files by myself... I'm just saying all of this because I may not be one having those problem now or in the future! 
 
Thanks for taking your time with me... I really appreciate that!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...