Specifying Interface with Only OpenVPN Command

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
finalbrez
OpenVpn Newbie
Posts: 1
Joined: Fri Dec 09, 2016 6:44 am

Specifying Interface with Only OpenVPN Command

Post by finalbrez » Fri Dec 09, 2016 7:01 am

I'm kinda new to this. I know how to create a basic server, and I've done that just fine. That isn't that useful for me though. What would be useful is being able to tether with my Phone's data plan while using Wi-Fi. It is rooted and has the OpenVPN binary installed. Here's the situation though. I want my phone to be connected over Wi-Fi. I want the OpenVPN server to be running and listening over Wi-Fi. I want all my phone's traffic to go through Wi-Fi. The only traffic I want to go over LTE is what is coming over the VPN Server. I, of course, have tested that both interfaces work, even while both connected to the internet. I have setup a basic OpenVPN server on it, which can route me through my Wi-Fi's internet connection (not useful at all). I just want to know how to specify which interface for OpenVPN to send its traffic over.

I'd like to do this without any extra commands because I am not running full debian on my phone, just android with some busybox binaries and OpenVPN binaries. Finding binaries for Android Lollipop or higher is a pain with PIE required, and I've never actually set up the NDK.

In case any of you think this is immoral, my data plan has Unlimited Data, including tethering. My final plan is to create a hotkey on my computer to connect to this VPN when the internet is out, so I hardly even notice it's out. Also, we come close to Comcast's data "usage plan" every month, so I'd like to route steam downloads through this when I can. Creating a Wi-Fi hotspot is just very time consuming to do and devours my battery.

Thanks for any help you can provide!

Post Reply