Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Macinthelou

macrumors member
Original poster
Mar 15, 2011
48
0
I am essentially always connected to my work network via VPN when I am using my MBP at home. This may be a simple question, but is there a way to connect via wifi to a printer? I tried this with my very old printer (Canon MP610) connected to an Airport (also older version) and was only able to get it to work if I disconnected from VPN.

Are there newer printers that I could do this with?
 
The concept of a VPN is that it creates a secure tunnel between the endpoints. No offramps so to speak, an "offramp" would be needed to access resources on your home network such as a printer.

Put another way, when you connect to your work VPN you get an IP address from that network, because your home printer has a network address from your home network, you now can't communicate with it.

It's not the fault of your printer, the only way around it is to plug it in as a USB printer.
 
Thanks for the reply. I read something about certain printers having wifi-direct or something like that, in other words, it sounds like you can connect to the printer independent of your home network. Does that sound right?
 
If you're hard-wired for the VPN connection, that MAY work as the wireless would be a different network. If you're on wireless, it wouldn't work as your wireless card can typically connect to only one network at a time.
 
Most VPN connections block any other network access. Your only option is to use a usb printer connection.
What effect would the option to not send all traffic over VPN play in OS X built-in VPN? I always assumed it will decide based on destination's subnet, over which link to transmit, no?
 

Attachments

  • VPN.png
    VPN.png
    144.3 KB · Views: 118
What effect would the option to not send all traffic over VPN play in OS X built-in VPN? I always assumed it will decide based on destination's subnet, over which link to transmit, no?

That might allow access to local devices. I used to use a Cisco client that blocked all local network access. If you have some control over the client configuration it may work. I didn't have that option.
 
The concept of a VPN is that it creates a secure tunnel between the endpoints. No offramps so to speak, an "offramp" would be needed to access resources on your home network such as a printer.

Put another way, when you connect to your work VPN you get an IP address from that network, because your home printer has a network address from your home network, you now can't communicate with it.

It's not the fault of your printer, the only way around it is to plug it in as a USB printer.

Rubbish.

I'm sitting here connected to 3 remote VPNs. Only traffic destined for each target network uses its respective VPN and everything else goes unencrypted on my normal public interface.

Internet access does not go over my VPNs nor does any LAN traffic.

For me:
anything on 10.0.0.0/8 goes over VPN1
192.168.0.0/24 goes over VPN2
192.168.1.0/24 goes over VPN3

192.168.10.0/24 is my local LAN
and all other traffic goes out of my internet connection

You just need to know how to setup the routing properly.

When a ppp connection is dialed (i.e. each time my Mac connects to a VPN), the file /etc/ppp/ip-up is run. Each time a VPN disconnects, the file /etc/ppp/ip-down is automatically run by ppp daemon.

I differentiate each remote VPN using the VPN gateway IP. This IP is automatically passed to each of these script as the variable $5 and $1 is the interface name

This is an example of a /etc/ppp/ip-up file

#!/bin/sh

if [ "$5" == "192.168.2.1" ]; then
/sbin/route add 10.0.0.0/8 -interface $1
/sbin/route add 122.201.64.0/8 -interface $1
elif [ "$5" == "192.168.95.1" ]; then
/sbin/route add 172.16.0.0/12 -interface $1
fi

In this example file, there are two VPNs configured. One has a gateway of 192.168.2.1 and the other has a gateway of 192.168.95.1.

If the gateway IP of the VPN I am connecting to matches the "if" statement, then the route commands in that block are added.

Here is an example /etc/ppp/ip-up file (used for deleting the VPN routes when you disconnect).

#!/bin/sh

if [ "$5" == "192.168.2.1" ]; then
/sbin/route delete 10.0.0.0/8 -interface $1
/sbin/route delete 122.201.64.0/8 -interface $1
elif [ "$5" == "192.168.95.1" ]; then
/sbin/route delete 172.16.0.0/12 -interface $1
fi
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.