Jump to content
Not connected, Your IP: 3.227.233.6

Recommended Posts

I'd like to be able to use my VPN only for torrenting - leaving browsing unaffected.

 

The best I found so far is inserting these lines in the openvpn config file:

 

route-nopull
route 0.0.0.0 0.0.0.0
route-metric 999

 

Then binding utorrent to the TAP interface IP (10.4.x.x) changing these advanced settings:

 

net.bind.ip
net.outgoing.ip

 

This works, however, the IP of the TAP being dynamic, every time the IP changes, this change needs to be reflected in utorrent's settings - huge PITA. :-)

 

I followed the instruction in this post, to try and setup a static IP, but it just does not seem to work for me (the openvpn client simply fails to connect).

 

https://airvpn.org/topic/9518-faking-static-local-vpn-addess-using-client-nat-and-ifconfig/

 

Is there a way to obtain a static IP address from the server, or just a better way to accomplish this?

 

 

 

Share this post


Link to post

...

 

This works, however, the IP of the TAP being dynamic, every time the IP changes, this change needs to be reflected in utorrent's settings - huge PITA. :-)

 

I followed the instruction in this post, to try and setup a static IP, but it just does not seem to work for me (the openvpn client simply fails to connect).

 

https://airvpn.org/topic/9518-faking-static-local-vpn-addess-using-client-nat-and-ifconfig/

 

Is there a way to obtain a static IP address from the server, or just a better way to accomplish this?

 

If you can get it right, it does work. I used to do it that way. But it is easy to get it wrong.

 

You are not the first to ask about this. For example:

 

https://airvpn.org/topic/14314-static-internal-ip/?p=28045

 

...

 

The approach there is still very inconvenient though. When you change servers, you have to first make a connection to the server in order to "auto-update" your OpenVPN configuration files.

 

I have begun using a version of OpenVPN that I patched to add a new configuration command I have tentatively called "ifconfig-nat". It is fairly easy to build OpenVPN from source for Linux yourself (although I have built it for Windows too). So I will paste the patch in at the end of this, in case you want to try it.

 

With the patch applied, I add this line to my configuration files:

ifconfig-nat 10.44.0.2 10.44.0.1
My local address now appears to be 10.44.0.2. And the remote/gateway address appears to be 10.44.0.1.

 

I have been thinking about posting the patch to the OpenVPN developers forum to solicit comments and see whether this could find its way into the official release. But I may not get to this in a hurry.

 

I will probably put it up on github long before (if ever) it gets into the official release. The thing is though, would there be any point in putting pre-built versions on github? Who would trust them? If however AirVPN decided to host pre-built versions with this patch applied (and maybe push the issue on the OpenVPN forum?), then that might be another matter.

 

...

 

 

I mentioned there that I now use a patched version of the OpenVPN client (both on a linux VPS and on Windows). And I provided there a patch against release 2.3.6 for this. I have a patch for 2.3.7 too (not in this forum though). I have not upgraded to 2.3.8 yet.

 

I also sort of hinted that it might be nice if AirVPN provided binaries for the OpenVPN client with this patch applied, from their web site. But this made no splash at all.

Share this post


Link to post

Thanks NaDre, that sound like an awful lot of work you've done on this topic.  I'd be curious to test the windows version of the patched client, if you don't mind.  Also, I'm still checking the speed over the VPN tunnel. I'm connecting to one server at the time (so that the IP is usually the same), and the results so far are not very encouraging.  I'm not getting anything remotely close to what I get with a direct connection on a speedtest - about 15-20%. I'm in Canada, and I get a solid 50/10 Mb/s from my ISP, not very high, I'm thinking Air should match that.  Sorry, I do realize this is a completely different topic...  May I just ask if you get similar speeds between using airVPN or not?  I wonder how hard would be for AirVPN to offer static IPs, maybe even charging a small fee to set things up, for the people interested?

Share this post


Link to post

An issue you will likely fail against with your approach is BT is very dynamic in terms of source/destination ports, destination IPs, and protocol headers (due to encryption and utp). You can restrict source ports in some clients, but very bad idea. You fail to mention your OS.

 

In Linux, you could run the client with a different UID with read/write permissions for your user group to make it seamless. A cli based client, like rtorrent, is simplest for this approach (no messing with X permissions). You would then set the user's route for the tun interface.

 

In Android, simply use 5.0 or up. Use a client that uses the API for selecting apps to tunnel and select your torrent app (every Android app runs under a different UID, so it works like my Linux method under the hood). My main torrenting box is Android due to low power and heat. I use this setup.

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

×
×
  • Create New...