Speed up network discovery after having been on 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
gosa
Level 4
Level 4
Posts: 317
Joined: Mon Nov 01, 2010 5:12 am
Location: Spain

Speed up network discovery after having been on vpn?

Post by gosa »

Hi all,

Apologies if something similar have been covered before, but I'm not really sure about what I'm asking for with regards to terminology which kind of makes it hard to search for previous threads as well.

I have a couple of "shared" devices in my home network - among them a printer and a NAS (running on Openmediavault). I also run my desktop computer on VPN on and off depending on what I'm doing at the moment. I'm using smb to connect to the NAS, not sure how the printer is accessed (layman speaking)

It so happens that every time I use the vpn I lose my printer and my file server, which is kind of expected so I really don't have any issues with that.

What I would like to "fix" though is the time it takes for my computer to "pick up" the shared network devices again after disconnecting my vpn. This today can take between 10 minutes and... a lot more. I usually find myself disconnecting from the vpn, continue doing my thing and get surprised when a message pops up saying "added printer..." thinking "Ohh... that's right - I was on a vpn earlier..."

So - my question is - is there any way of speeding up the part where Linux Mint understands that it's not all by itself anymore and actually go back to being a part of the network? Any script I can run? Terminal command?

Thanks in advance,
gosa
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
greengnome
Level 2
Level 2
Posts: 74
Joined: Wed Oct 16, 2019 6:41 am

Re: Speed up network discovery after having been on vpn?

Post by greengnome »

Your VPN connection will change your routing so everything is routed via the VPN network. This could be in your local configuration for the connection or a routing config pushed by the server you connect to.

With some tweaking you could add an exception for your local network so it is still routed by your home router. I connect to two VPN:s simultaneously for work while also keeping access to my NAS and other things at home.

Try a search like "openvpn exempt local network" assuming it is openvpn. Or post some more details of your config here if you want more specific advice - just be careful not to post anything that should not be public about your VPN setup.

This also assumes that your local network doesn't use the same subnet as anything on your VPN network, if so you would have to change your local subnet to avoid using any IP address that may exist over the VPN.
Locked

Return to “Networking”