[SOLVED] how to keep internet access on vpn while keeping local network off vpn?

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
coffeebean
Level 1
Level 1
Posts: 18
Joined: Sat Jan 22, 2022 8:06 pm

[SOLVED] how to keep internet access on vpn while keeping local network off vpn?

Post by coffeebean »

Hello,

I have 2 laptops that are connected with an ethernet cable. Both are running Linux MInt 19.3 MATE, both have their own wifi access to the internet. The ethernet cable is only there to exchange local files, not to share an internet connection.

I know nothing about networking, so I followed the step-by-step instructions from viewtopic.php?t=301842 and now I can effectively exchange files between the computers. Basically I made a new ethernet connection, set the IPv4 method to manual and gave both computers an IP address and subnetmask 255.255.255.0

My firewall blocks incoming traffic. To enable connections I had to make a rule in the firewall that says: Anywhere ALLOW in 172.16.0.0/24
I think this means that I'm still blocking all incoming traffic, except traffic from the 172.16.0.0-255 subnet, which is my local network. I hope this is safe.

But I also have to disable the VPN. As I don't want to go online without vpn, I have to disable internet access every time I'm exchanging files between the computers, which is not really convenient. I would prefer to keep the internet connection active at all times.

What do I need to do to make sure that traffic between the two laptops is not running through vpn, while keeping all traffic to the internet on vpn? Is that "tunneling" or is tunneling something else? Do I need to make changes in the settings of the vpn or in the settings of the connection in the connection manager?

Rather confused now. Suggestions?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
djph
Level 7
Level 7
Posts: 1928
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: how to keep internet access on vpn while keeping local network off vpn?

Post by djph »

They're connected to the same WLAN for internet access, right?
In that case, they can just communicate over that network, no extra cabling required.

Having one (or both) connected to a VPN should not affect communication between them (as they're on the same network). That is, if properly configured, the VPN should not be intercepting traffic that is destined for your local network.
coffeebean
Level 1
Level 1
Posts: 18
Joined: Sat Jan 22, 2022 8:06 pm

Re: how to keep internet access on vpn while keeping local network off vpn?

Post by coffeebean »

Thanks for replying!
djph wrote: Wed Jan 26, 2022 12:21 pm They're connected to the same WLAN for internet access, right?
Both computers use the wifi of the guesthouse. I'm not sure if that counts as "being connected to the same WLAN", but even if it does, I wouldn't know how to find my other devices on that network. Apart from that, communication over the cable is waaaay faster than the wifi, so there is an incentive to use the cable.
djph wrote: Wed Jan 26, 2022 12:21 pm That is, if properly configured, the VPN should not be intercepting traffic that is destined for your local network.
That's the issue, isn't it, how to properly configure. I don't even know if the configuration is to be done on the vpn or on the connection.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11173
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: how to keep internet access on vpn while keeping local network off vpn?

Post by AZgl1800 »

Easy to see where the other devices are on a WiFi or LAN network.

all of the devices that use WiFi should not be on VPN, IF, the VPN is between your ISP and a local WiFi Router.

Everything in the house that is using the WiFi router is unaware of the VPN if all you are doing is connecting from one device to another device.

Use Angry IP Scanner to see what the other devices are using for their internal WiFi IP Address.


https://angryip.org/download/#linux
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
djph
Level 7
Level 7
Posts: 1928
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: how to keep internet access on vpn while keeping local network off vpn?

Post by djph »

coffeebean wrote: Thu Jan 27, 2022 12:19 am Thanks for replying!
djph wrote: Wed Jan 26, 2022 12:21 pm They're connected to the same WLAN for internet access, right?
Both computers use the wifi of the guesthouse. I'm not sure if that counts as "being connected to the same WLAN", but even if it does, I wouldn't know how to find my other devices on that network. Apart from that, communication over the cable is waaaay faster than the wifi, so there is an incentive to use the cable.
Okay a "guest house" may also involve a "guest WiFi network" that then blocks devices from communicating with one another. This is pretty standard stuff nowadays in hospitality environments (hotels, etc).
coffeebean wrote: Thu Jan 27, 2022 12:19 am
djph wrote: Wed Jan 26, 2022 12:21 pm That is, if properly configured, the VPN should not be intercepting traffic that is destined for your local network.
That's the issue, isn't it, how to properly configure. I don't even know if the configuration is to be done on the vpn or on the connection.
It depends somewhat on "which VPN Provider" you're talking about and "which VPN Technology" they're using ... Most of the big players use OpenVPN or wireguard (or have options for both).
coffeebean
Level 1
Level 1
Posts: 18
Joined: Sat Jan 22, 2022 8:06 pm

Re: how to keep internet access on vpn while keeping local network off vpn?

Post by coffeebean »

Thanks for your input!
I figured it out, there is actually a setting in the vpn (mullvad) to allow traffic to the LAN. Easy once you know it.
djph
Level 7
Level 7
Posts: 1928
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: [SOLVED] how to keep internet access on vpn while keeping local network off vpn?

Post by djph »

coffeebean wrote: Thu Jan 27, 2022 7:48 am Thanks for your input!
I figured it out, there is actually a setting in the vpn (mullvad) to allow traffic to the LAN. Easy once you know it.
Perfect!
Locked

Return to “Networking”