Friends--
My first post here.
Production environment
Have been working with this about 2 1/2 weeks, 2-3 hours per night, all day on weekends, and finally got remote to be able to access files on server. Some work is getting done!
Server ("earth") OS: Ubuntu 12.04.2
Client ("samba1") OS: Lubuntu 12.04.2
Local printer #1: 192.168.0.5
Local printer #2: 192.168.0.10
Local file server, serving Samba shares: 192.168.0.201
Local vnc server: 192.168.0.111 (this is WinXP, and the only Win box)
4 other Ubuntu boxes locally
remote is 192.168.1.6 in its local network
remote is behind a router
server and all local computers are behind a router
a ddns is used
Intent: get remote computer to be able to print to local printers, and to access the vnc server. In addition, let the local computers see the file locks placed by remote machine (I suspect this is the same issue as the printing and vnc).
server.conf:
port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/earth.crt
key /etc/openvpn/earth.key # This file should be kept secret
dh /etc/openvpn/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.0.0 255.255.255.0"
client-to-client
keepalive 10 120
comp-lzo
max-clients 1
persist-key
persist-tun
status openvpn-status.log
verb 3
client.conf:
client
dev tun
proto udp
remote [blanked].no-ip.org 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/samba1.crt
key /etc/openvpn/samba1.key
remote-cert-tls server
comp-lzo
verb 3
ifconfig server:
eth0 Link encap:Ethernet HWaddr [blanked]
inet addr:192.168.0.201 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::213:20ff:fe80:83ad/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23420190 errors:0 dropped:0 overruns:0 frame:0
TX packets:17003747 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2559473491 (2.5 GB) TX bytes:1906572766 (1.9 GB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1414 errors:0 dropped:0 overruns:0 frame:0
TX packets:1414 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:87738 (87.7 KB) TX bytes:87738 (87.7 KB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:16311 errors:0 dropped:0 overruns:0 frame:0
TX packets:14893 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3100129 (3.1 MB) TX bytes:6867717 (6.8 MB)
route server:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
localnet * 255.255.255.0 U 0 0 0 eth0
ifconfig client (eth0 is a dead onboard card):
eth0 Link encap:Ethernet HWaddr [blanked]
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:17 Base address:0x2000
eth1 Link encap:Ethernet HWaddr [blanked]
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:75ff:fece:6f98/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32052 errors:0 dropped:0 overruns:39 frame:0
TX packets:14760 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10785294 (10.7 MB) TX bytes:2656008 (2.6 MB)
Interrupt:22 Base address:0x2400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:450 errors:0 dropped:0 overruns:0 frame:0
TX packets:450 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43469 (43.4 KB) TX bytes:43469 (43.4 KB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.6 P-t-P:10.8.0.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:8569 errors:0 dropped:0 overruns:0 frame:0
TX packets:8629 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3844799 (3.8 MB) TX bytes:1444815 (1.4 MB)
route client:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
10.8.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0
10.8.0.5 * 255.255.255.255 UH 0 0 0 tun0
192.168.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 1 0 0 eth1
Friends, I am a real newbie around openvpn, and don't grasp yet all the nuances and meanings of bridging and nat and push, and the like, so please bear with me as I ask questions!
My last couple of attempts to make this work were the client-to-client and push lines in the server.conf. If it is a clue, when I try to uncomment the user and group nobody lines, connection fails.
10.8.0.1 and 10.8.0.6 are able to ping each other. Other local computers cannot ping remote, nor can remote ping them. remote can ping 192.168.0.5 and 192.168.0.10 (the printers)(this does not make sense to me, if it cannot print to them).
So can you help me realize my intent?
Thanks!
:- Doug.