LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-23-2024, 09:44 PM   #1
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Rep: Reputation: Disabled
Question Does USB tethering bypass VPN?


Using a PPTP VPN on my Android, when I tether from Linux, the Android is using the VPN while Linux sees my real IP.

I can use Linux VPN & Android tether (VPN is in Linux).

How can a Linux tether get around the Android's VPN?
 
Old 02-24-2024, 01:22 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,307

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You can see what you're doing - we can't. Linux & Android obey rules.; Better restate your question/problem very clearly using diagrams so that nobody can be in any doubt about what is going in and out, and what you want to happen.

Explain how you tested if things work, what happened, and what you want to happen instead.
 
1 members found this post helpful.
Old 02-24-2024, 01:43 PM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,638

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
Also, make sure you include your routing tables if possible. We cannot map where the packets should go without some kind of clues, and the routing helps a LOT!
 
Old 02-24-2024, 03:57 PM   #4
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
This is a curiosity not a project, but it could evolve later.

Somehow the USB tether function (Android 8.1) when paired with Android's builtin VPN, routes around what seems like a serial pathway (A -> C through B, or Linux -> Internet through Android VPN).

Instead I suspect a parallel connection.

Last edited by JASlinux; 02-24-2024 at 03:58 PM. Reason: spelling
 
Old 02-24-2024, 03:58 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
wifi on phone?
 
Old 02-25-2024, 03:03 AM   #6
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
wifi on phone?
Yes, wi-fi & VPN are on the Android.

Open an Android browser & VPN is working.

Open a Linux browser & it sees the Android's local wi-fi connection.

I'm on Ethernet now, but it's so unbelievable I'll have to test it again.
 
Old 02-25-2024, 10:29 AM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,638

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
You DO realize that the WIFI interface has to be open, working, and detected on the network for it to USE the network to make the VPN connection, right?

A VPN is not magic hardware, it is just an encryption tunnel that encrypts traffic over the network between that host and the VPN endpoint. Anything along the way can even detect the traffic and capture the packets, but they are encrypted so that the contents are difficult to read.
 
Old 02-26-2024, 12:41 PM   #8
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by wpeckham View Post
You DO realize that the WIFI interface has to be open, working, and detected on the network for it to USE the network to make the VPN connection, right?
The VPN is only on the Android. It is physically connected to the Linux machine via USB. Linux wi-fi is not active.

How would you get to a wi-fi router or wireless data network on your Linux machine through an Android with an active VPN?

In Linux I am not seeing the VPN but my real IP.

I know the tether is working (not the computer's wi-fi card) because it's significantly faster when the VPN is off (old hardware).

Like I wrote last post, this needs to be validated with a retest. It's not the most important thing in the world, but I can't believe it. It's not logical that you can get around a VPN when it is the source of your Internet connection.
 
Old 02-26-2024, 01:32 PM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,307

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Personally, I feel you should go for vpn on both. IP Forwarding with a vpn on is probably more trouble than it's worth. If you're paying for a vpn, they are usually cheap or free about a second box.

And vpn on a mobile isn't the panacea you might think.
 
Old 02-28-2024, 08:46 AM   #10
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Personally, I feel you should go for vpn on both. IP Forwarding with a vpn on is probably more trouble than it's worth. If you're paying for a vpn, they are usually cheap or free about a second box.

And vpn on a mobile isn't the panacea you might think.
Panacea for? I don't know what you mean, but my results are replicated.

I'm in Linux only connected to the Internet via an Android with a VPN on. Linux sees my regular IP while Android uses the VPN.

Guessing now it's something to do with Android's tethering technology.

I could easily put the VPN in Linux as well or independently. This is more a logic exercise. You wouldn't expect tethering to work this way.
 
Old 03-06-2024, 04:58 PM   #11
jadaja
LQ Newbie
 
Registered: Feb 2024
Distribution: ubuntu 22.04
Posts: 7

Rep: Reputation: 0
you're using a cable to your phone so naturally the true Ip is going to be seen by the linux machine. you aren't connecting the computer to a hotspot thru your phone. the cable by default bypasses any VPN you could possibly have on the phone. it would possibly/probably do the same if you had a firewall on it as well. you answered your own question when you said that you had the phone USB tethered to the computer. i don't know how a VPN would effect the hotspot if you were using your phone as 1 for the computer.
 
Old 03-06-2024, 10:18 PM   #12
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Quote:
Originally Posted by jadaja View Post
you answered your own question when you said that you had the phone USB tethered to the computer.
Pretty sure it's the computer that's USB tethered to the phone. The computer is getting it's network connection from the phone, the phone itself is likely connected to Wifi or mobile data.

I dunno how to share the connection after the VPN thru the cable tho, and I suspect even if he enabled a wifi hotspot on the phone and connected his computer to it thru wifi, it still wouldn't use the VPN.
 
Old 03-06-2024, 11:03 PM   #13
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,638

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
Quote:
Originally Posted by enigma9o7 View Post
Pretty sure it's the computer that's USB tethered to the phone. The computer is getting it's network connection from the phone, the phone itself is likely connected to Wifi or mobile data.

I dunno how to share the connection after the VPN thru the cable tho, and I suspect even if he enabled a wifi hotspot on the phone and connected his computer to it thru wifi, it still wouldn't use the VPN.
If it were a Linux phone you could load up some routing software and configure virtual interfaces and make it pipe all traffic for both through a VPN. I cannot say you could not do that under Android, but I have never seen it done.
 
Old 03-12-2024, 09:53 AM   #14
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jadaja View Post
you're using a cable to your phone so naturally the true Ip is going to be seen by the linux machine. you aren't connecting the computer to a hotspot thru your phone. the cable by default bypasses any VPN you could possibly have on the phone. it would possibly/probably do the same if you had a firewall on it as well. you answered your own question when you said that you had the phone USB tethered to the computer. i don't know how a VPN would effect the hotspot if you were using your phone as 1 for the computer.
I read you are stating a tether automatically produces a bypassed VPN, but not how. It does not seem logical.

Secondarily if I were willing to suffer slower bandwidth, a hotspot connection might still use the VPN. That is a possibility I have not considered.
 
  


Reply

Tags
android, bypass, tethering, vpn



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] If terminal needs to download or upgrade does it bypass my vpn? linux-man Linux - Newbie 40 12-18-2023 10:04 PM
[SOLVED] USB tethering to Blackberry KeyOne does not work Jason_25 Linux - Software 1 08-22-2022 11:38 AM
Two Questions - USB tethering problem & VM software for USB passthrough lawnm0wer Slackware 6 01-25-2018 01:19 AM
installed zorin os my i phone tethering wireless does not connect to zorin walt8 Linux - Newbie 1 06-18-2010 03:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration