I setup OpenVPN in a machine in my
home network so I can access my files from
work.
When my client establishes the openvpn connection, I can access machines in my home network just fine, which is what I wanted. The only thing that I would like to be able to do is connect to machines on my work network (client network) while the tunnel is open. I've been unable to do so. As soon as I start the tunnel, I lose connectivity to my client machine network.
Here is the server configuration:
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
crl-verify crl.pem
script-security 3
up nat.sh
down nat.sh
server 172.16.0.0 255.255.255.0
ifconfig-pool-persist omv-ipp.txt
keepalive 10 120
persist-key
persist-tun
status /var/log/omvvpn-status.log 5
verb 2
mute 10
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.0.1"
auth-user-pass-verify vpnpwauth.sh via-env
comp-lzo
Some details, my OpenVPN server runs in a OMV box in my home network. My router is forwarding 1194 to such box. My home network uses address space 192.168.*. I have the vpn server using 172.16.*. My work lan uses address space 10.*
I had to add the "push DNS" option above in order to be able to browse the web. Though it would be nice to be able to do so via the client network as well.
My client machine at
work runs Mac OS X 10.8 and I am using Tunnelblick as OpenVPN client. Tunnelblick's config file is:
client
remote <my_public_internet_host_name>
proto udp
dev tun
ca omv-ca.crt
cert omv-client.crt
key omv-client.key
ns-cert-type server
auth-user-pass
comp-lzo
To summarize, first thing is I want to be able to access other machines in the client network while the tunnel is open.
Secondarily, I want to be able to route all traffic via the client network (web browsing, etc), and only use the tunnel to access my machines in the home network to access my files.