2

So I have the following setup: enter image description here

Now from home I like to make a connection through OpenVPN to access my LAN from work. So I edit the config of the OpenVPN client on my home computer to:

remote 180.135.0.10 1194

Now I can connect to it but it won't allow me to access the LAN just out of the box. So I add a new line to the clients config:

redirect-gateway def1

This will make sure all traffic will go through the VPN. This works. However now I don't have internet. So I add the following lines:

dhcp-option DNS 8.8.8.8
dhcp-option DNS 8.8.4.4

Now I can access the LAN through my VPN and when I check WhatIsMyIp it is clear that the internet traffic is going through the VPN also as I now have the work WAN IP. This is not preferred. In my ideal situation the only traffic that should go through the VPN is the LAN of work all other traffic such as internet and my home LAN should just route normal.

Does anyone have an answer how to accomplish such a thing?

Mark
  • 123
  • 1
  • 3

1 Answers1

1

If I understand your configuration and network topology, then you should delete the redirect-gateway directive and instead add:

route 192.168.188.0 255.255.255.0

If you want reach work machines by name you should configure your work dns server (if any):

dhcp-option DNS <your work dns server LAN IP>

Delete the two Google DNS entries.

Regards

Paolo Basenghi