1 |
On Saturday 14 Feb 2015 03:51:12 Joseph wrote: |
2 |
> On 02/13/15 20:44, Joseph wrote: |
3 |
> >On 02/13/15 22:17, Michael Orlitzky wrote: |
4 |
> >>On 02/13/2015 09:50 PM, Joseph wrote: |
5 |
> >>> I have a hard time finding any documentation on how to print over VPN. |
6 |
> >>> |
7 |
> >>> I have a network printer and I would like to setup my laptop to print |
8 |
> >>> to it over VPN. The remote VPN IP address is: 192.168.151.1 |
9 |
> >>> The printer IP is: socket://10.0.0.105 |
10 |
> >>> and lpd://10.0.0.106/BINARY_P1 |
11 |
> >>> |
12 |
> >>> I think I need some entries in VPN config files isn't it? |
13 |
> >> |
14 |
> >>Does the VPN server also have a 10.0.0.x address? If so, you just need |
15 |
> >>to tell the VPN clients that they can reach the 10.0.0.x network via the |
16 |
> >>VPN, i.e. by routing through your VPN server. |
17 |
> >> |
18 |
> >>We have pretty much the same setup, with our VPN server sitting on |
19 |
> >>10.1.1.1 with some other private IP address. This is the client config |
20 |
> >> |
21 |
> >>for the OpenVPN server: |
22 |
> >> # cat /etc/openvpn/client-config/DEFAULT |
23 |
> >> push "route 10.1.1.0 255.255.255.0" |
24 |
> >> |
25 |
> >>Then you point to that in openvpn.conf (also on the server): |
26 |
> >> # grep client-config /etc/openvpn/openvpn.conf |
27 |
> >> client-config-dir client-config |
28 |
> >> |
29 |
> >>After that, any new client connections will just know that 10.1.1.x can |
30 |
> >>be reached over the VPN. |
31 |
> > |
32 |
> >Thank for replying. |
33 |
> > |
34 |
> >My eeepc VPN IP: 192.168.151.9 is the client connected over VPN to server |
35 |
> >VPN IP 192.168.151.1 |
36 |
> > |
37 |
> >So I inserted on eeepc (client) to /etc/openvpn/eeepc.conf |
38 |
> >... |
39 |
> > |
40 |
> > push "route 192.168.151.0 255.255.255.0" |
41 |
> > |
42 |
> >On a server 192.168.151.1 I have file: |
43 |
> >/etc/openvpn/server.conf |
44 |
> >/etc/openvpn/ccd/eeepc |
45 |
> > |
46 |
> >in /etc/openvpn/ccd/eeepc is: |
47 |
> >ifconfig-push 192.168.151.9 255.255.255.0 |
48 |
> > |
49 |
> >Do I add to "eeepc" |
50 |
> >client-config-dir ??? |
51 |
> > |
52 |
> >Which file on a server do I modify? |
53 |
> |
54 |
> One more question. |
55 |
> |
56 |
> Do I modify on a client eeepc file: |
57 |
> |
58 |
> /etc/cups/client.conf |
59 |
> |
60 |
> and add: |
61 |
> ServerName 192.168.151.1:631 |
62 |
|
63 |
DISCLAIMER: I don't use OpenVPN, but IKE/IPSec. In any case, similar routing |
64 |
principles apply. |
65 |
|
66 |
Your printer is on a different subnet than your laptop. Therefore, unless you |
67 |
have set up routing in your VPN gateway from 192.168.151.0/24 to 10.0.0.0/24 I |
68 |
don't think you will be able to connect to the printer. |
69 |
|
70 |
In addition, follow the example that Michael has suggested above on your |
71 |
laptop to be able to route packets in it to 10.0.0.0/24 via the openvpn |
72 |
gateway. |
73 |
|
74 |
If you want to *only* allow connections to the printer, but not other devices |
75 |
within the 10.0.0.0/24 subnet, then adjust the route declarations for |
76 |
10.0.0.106/32. |
77 |
|
78 |
HTH. |
79 |
-- |
80 |
Regards, |
81 |
Mick |