hieuhtr / Blog

Don’t be lazy. Don’t make excuses. No one cares. Work fucking harder.
Other
6 stars 2 forks source link

VPN Split tunneling #68

Open hieuhtr opened 7 years ago

hieuhtr commented 7 years ago

Fundamental

For example, suppose a user utilizes a remote access VPN software client connecting to a corporate network using a hotel wireless network. The user with split tunneling enabled is able to connect to file servers, database servers, mail servers and other servers on the corporate network through the VPN connection. When the user connects to Internet resources (Web sites, FTP sites, etc.), the connection request goes directly out the gateway provided by the hotel network.

Advantage

Configuration

Goal:

Current

Config

$ vim client.ovpn
# Add 2 lines into beginning of this client config file
# route-nopull 
# route  171.253.181.55

client.ovpn

route-nopull 
route  171.253.181.55
client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote 45.79.85.159 1194
...

Reference

  1. https://en.wikipedia.org/wiki/Split_tunneling
  2. https://www.ibvpn.com/billing/knowledgebase/330/Split-Tunneling-for-OpenVPN-GUI.html