LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2023, 04:51 PM   #1
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Rep: Reputation: Disabled
If terminal needs to download or upgrade does it bypass my vpn?


If terminal needs to download or update a program does it bypass my vpn ? What about when I use synaptic or yt-dlp in terminal?
What command would I use to check to make sure my terminal is utilizing my vpn?

Last edited by linux-man; 12-12-2023 at 05:01 PM.
 
Old 12-12-2023, 09:14 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,329
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
My understanding is that, if you are using a VPN, any actions you do should go through the VPN.
 
Old 12-12-2023, 09:28 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
A "VPN" functionally exists as "a network appliance," covering a specified range of external IP-addresses as specified by the route command. If, and only if, that external address is "covered" by your "route," it will be protected.

Therefore: "all of this is occurring at the network level." It has nothing to do with any particular application.
 
Old 12-12-2023, 09:49 PM   #4
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,454
Blog Entries: 7

Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557
Quote:
Originally Posted by linux-man View Post
What command would I use to check to make sure my terminal is utilizing my vpn?
What kind of VPN do you use? How do you connect to it?

/sbin/route will show you the routing table.
Quote:
Originally Posted by frankbell View Post
My understanding is that, if you are using a VPN, any actions you do should go through the VPN.
This is not necessarily the case. Eg: If you connect to a VPN using a browser extension, then only traffic generated by that browser session will go through the VPN.
 
1 members found this post helpful.
Old 12-13-2023, 02:30 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
We have a VPN which works only for our company. So facebook, google, microsoft, debian and other sites work without VPN and also all hosts inside the company are reachable with VPN, in the same time. (something like post #3).
 
Old 12-13-2023, 07:50 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
In a typical corporate setting, VPN is used to provide a cryptographically-secure "tunnel" to a specified range of IP-addresses, such as 10.8.x.x. These addresses appear as if they are "local," on some "private network." But it is a "virtual private network = VPN." Because the secure connection is made over a public network instead of a purchased piece of wire.

It is possible to arrange for VPN to capture all outbound traffic and send it through the tunnel to "somewhere else" for re-distribution. Some people do this in coffee shops. Some people try to do this to evade firewalls.

VPN works by linking into the operating system's "network stack" at one or two specific levels, allowing it to intercept the traffic by routing it through a "virtual network device" which leads to its software. It encrypts or decrypts the traffic and places it back into the network stack for final delivery. In this way, everything is automatically handled, without any further special effort on the part of end-users. The route command will display this "device" as something like tun0, and show you exactly what is being routed to it.

VPN can be used in a corporate network as though it were a simple "gateway." Everybody's traffic within the office is routed to one particular machine (or, hardware device) that is running the VPN software. It appears to them to "just" be a router or a switch, and it functions as one.

Last edited by sundialsvcs; 12-13-2023 at 07:57 AM.
 
Old 12-13-2023, 04:26 PM   #7
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rkelsen View Post
What kind of VPN do you use? How do you connect to it?
I use the software client provided by the vpn company, simply click and connect/disconnect an icon on the desktop.
It is not a browser extension.

Quote:
Originally Posted by rkelsen View Post
/sbin/route will show you the routing table.
I have the output from that command you provided above, from that output what do I look out for that will tell:
- if terminal command is going thru the vpn client. Do I need to be running a command to gauge that?
- if synaptic is/isn't going thru the vpn client? Do I need to be downloading something to gauge that?
To gauge the above do I look at which title from the output of command /sbin/route below?
Code:
Destination Gateway Genmask Flags Metric ref Use Interface
Results
Code:
0.0.0.0                                                UG    0      0        0 tun0
default                                                UG    100    0        0 enp2s0
                0.0.0.0                                U     100    0        0 enp2s0
                                                       UGH   0      0        0 tun0
                                                       UH    0      0        0 tun0
                                                       UG    0      0        0 tun0
                                                       UGH   0      0        0 enp2s0

Last edited by linux-man; 12-13-2023 at 04:36 PM.
 
Old 12-13-2023, 04:32 PM   #8
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
The route command will display this "device" as something like tun0, and show you exactly what is being routed to it.
What if it's not a device but rather terminal or synaptic manager and I need to know if these two are going thru the vpn client. I am not using a browser extension vpn.
 
Old 12-13-2023, 04:39 PM   #9
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
We have a VPN which works only for our company. So facebook, google, microsoft, debian and other sites work without VPN and also all hosts inside the company are reachable with VPN, in the same time. (something like post #3).
Do the commands from your terminal and package manager go thru the VPN, and can they both be tweaked to go or not go thru vpn?
 
Old 12-13-2023, 04:44 PM   #10
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
A "VPN" functionally exists as "a network appliance," covering a specified range of external IP-addresses as specified by the route command. If, and only if, that external address is "covered" by your "route," it will be protected.
How ill I know if synaptic and terminal are both "covered" by route i.e. green light to go thru the vpn?

Quote:
Originally Posted by sundialsvcs View Post
Therefore: "all of this is occurring at the network level." It has nothing to do with any particular application.
So the terminal and synaptic do thru the vpn client whether you like it or not?
 
Old 12-13-2023, 07:36 PM   #11
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
You seem to have taken ip addresses out of the output posted from the route command
I have this using "ip route show"
Code:
default via 192.168.4.1 dev wlp5s0 proto dhcp src 192.168.4.111 metric 600 
192.168.4.0/22 dev wlp5s0 proto kernel scope link src 192.168.4.111 metric 600 
192.168.124.0/24 dev virbr0 proto kernel scope link src 192.168.124.1
and this using "route"
Code:
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway.home.do 0.0.0.0         UG    600    0        0 wlp5s0
192.168.4.0     0.0.0.0         255.255.252.0   U     600    0        0 wlp5s0
192.168.124.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
Because you removed the ip information no one can tell exactly what the routing is telling us (we have no information).

Please redo that and post the full routing table without editing.

Last edited by computersavvy; 12-13-2023 at 07:39 PM.
 
Old 12-14-2023, 01:19 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quote:
Originally Posted by linux-man View Post
Do the commands from your terminal and package manager go thru the VPN, and can they both be tweaked to go or not go thru vpn?
it depends on the target I want to reach, not on the software I use. For example if I want to use an internal package repository it will go thru vpn, if I use an external one it won't use that vpn. It also does not depend on other circumstances, like if I execute it from terminal or crontab or gui.
 
Old 12-14-2023, 04:50 PM   #13
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
it depends on the target I want to reach, not on the software I use. For example if I want to use an internal package repository it will go thru vpn,if I use an external one it won't use that vpn.
Does using synaptic package manager falls fall into the external package repository category? If yes then it would not go thru my vpn?
An example of an internal package repository would be a company with it's own repo? I guess individuals can have their own repo's too?

Quote:
Originally Posted by pan64 View Post
It also does not depend on other circumstances, like if I execute it from terminal or crontab or gui.
Did you mean to say "does depend"?

Synaptic package manager only works thru the gui whether your at work for a company or not?

If your at your workplace and you used terminal to download an item from your workplace distro's repo would that go thru the company vpn?

If you were at home on your personal computer using a vpn client downloaded onto your linux desktop and you used terminal to download an item from your personal computer's distro's repo would it go thru the vpn? What about your package manager?

Last edited by linux-man; 12-14-2023 at 06:14 PM.
 
Old 12-14-2023, 05:31 PM   #14
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
Please redo that and post the full routing table without editing.
Should the post without editing go ahead if:
- synaptic package manager was not actively downloading/upgrading etc in during the time I got the results for the routing table?
- terminal was not downloading or getting anything from external repo when I got the results of the routing table?

Last edited by linux-man; 12-14-2023 at 05:32 PM.
 
Old 12-14-2023, 05:42 PM   #15
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by linux-man View Post
Should the post without editing go ahead if:
- synaptic package manager was not actively downloading/upgrading etc in during the time I got the results for the routing table?
- terminal was not downloading or getting anything from external repo when I got the results of the routing table?
What was or was not in use at the time is immaterial to the routing table. You are asking about traffic which does not show when looking at routing.
The only thing critical is that the vpn should be connected so we can analyze what actually is being done by the routing. Vpn vs the regular routing since the routing table, complete, shows what is directed to which interface.
Editing the output hides what the routing is doing and makes analysis impossible.

Last edited by computersavvy; 12-14-2023 at 05:44 PM.
 
  


Reply



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
bypass ISP throttling without VPN samiamqqq General 5 11-14-2017 12:38 PM
Allow Plex Media Server traffic to bypass VPN connection English_Man Linux - Networking 3 01-02-2016 10:49 PM
Selective Routing [to bypass VPN for most] ChuckTSI Linux - Networking 1 04-16-2014 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:01 PM.

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