Home > network > OpenVPN and hosts/routes in your local/corporate networks

OpenVPN and hosts/routes in your local/corporate networks

Using the most excellent OpenVPN (seriously, it blows anything I ever used for VPNs out of the water…) and wondering how to not tunnel local networks, aka how to access local network hosts and routes? Simply use the following most common options in your client-configuration.

route net_gateway <network> <netmask>, e.g. route 10.65.0.0 255.255.0.0 net_gateway
A statement like this will route anything that goes to that network through your original network-adapter/gateway and not through the tunnel.

There is one common pitfall though… Usually your local/corporate networks use their own DNS servers for local/company-specific needs. No problem, simply override the DNS pushed from your OpenVPN provider:
dhcp-option DNS <host>, e.g. dhcp-option DNS 10.65.1.1
You can have multiple DNS servers defined, just add more dhcp-option statements.

There are lots more options (see the OpenVPN manpage), but these should cover most needs.

Advertisements
Categories: network Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: