How to printer to a local printer when on VPN

M
M used Ask the Experts™
on
I need to be able to share a printer when a computer is connected to the VPN.
My theory is that  the printer will need to be shared, before it can be printed to, when a VPN connection is established.
The OS is Windows 10
My other ideas is to uninstall the printer and install it when I am connected to the VPN.
I imagine there is a solution to this challenge.
I do not recall the other steps I tried, but I believe the one solution to the problem is to configure a Cisco ASA.
I was also thinking that I will have to enable the wireless printer's IP as an exception on the firewall.

Maybe I need to create a script with Powershell, to first configure the printer to print to a file then send it directly to the print queue.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
nociSoftware Engineer
Distinguished Expert 2018

Commented:
This normally has nothing to do with sharing.
When on VPN the network routes are changed therefore the local resources are not reachable any more.

You could try to add a Host route  to the IP address of the printer before opening the VPN.  (if on the same subnet)
or a specific host route to the printer through the default gateway if on a different subnet.
(a route with netmask = 32 or 255.255.255.255).   In most case those routes will still work (they need one such route to get to the default gateway f.e.).

Commented:
Printing through a shared printer, is communication purely between 2 PC's. If the VPN is working properly, and your PC is connected and it's part of the network, other PC's in the original fixed LAN should be able to print to your with the \\YOURPC\Printer as if you were also part of the fixed LAN there. Obviously if VPN traffic to your PC is limited by the firewall, they can't connect.
But all that's needed should only be a ONE time rule setting. The whole uninstall/install thing shouldn't be necessary at all.
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
I assume you have a Cisco AnyConnect VPN running, and it is configured to redirect all traffic (including local and Internet traffic) to the office. Then the only way to get it work is a configuration change on the ASA, commonly called "split tunneling", which only redirects traffic targetting the office LAN.
As has been said above, your issue is not related to installing or sharing. You cannot set routes either, because they are overruled by the VPN client.
nociSoftware Engineer
Distinguished Expert 2018

Commented:
Setting routes did work for me in the past... maybe because the settings were not tight on the central systems.
Hence the suggestion to try them at least.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Whether you can trick the VPN client depends on the client and its corresponding device configuration. Cisco clients remove all routing info while connected, even if added after connecting.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial