Course contentsShow
← Security
Lesson 491 of 3,05211. Network Security - VPNs and TunnelingFree lesson

Client Configuration and Split Tunneling

Configuring OpenVPN clients, implementing split tunneling for selective routing, and DNS leak prevention strategies.

Client Configuration and Split Tunneling

You'll learn how to configure OpenVPN clients, implement split tunneling to route only specific traffic through the VPN, and prevent DNS leaks that could expose your browsing activity.

What Is Client Configuration?

OpenVPN clients need a configuration file (.ovpn) that specifies the server address, authentication credentials, certificates, and routing behavior. This file tells the client how to connect and what to do with your network traffic once connected.

The basic client config includes:

  • remote vpn.example.com 1194 (server address and port)
  • ca ca.crt, cert client.crt, key client.key (authentication files)
  • cipher AES-256-GCM (matching the server's encryption)
  • auth-user-pass (if using username/password authentication)

Split Tunneling Explained

By default, VPNs route all your traffic through the encrypted tunnel (full tunnel). Split tunneling lets you choose: send work traffic through the VPN, but stream Netflix directly through your local connection.

Think of it like having two roads: one goes through a secure checkpoint (VPN) for sensitive destinations, the other goes directly for everyday browsing.

To implement split tunneling, you control which routes get pushed to the client:

  • Server-side: Use push "route 10.0.0.0 255.255.0.0" to route only specific networks through the VPN
  • Client-side: Add route 192.168.10.0 255.255.255.0 to route specific subnets through the tunnel
  • Prevent default gateway override: Use route-nopull on the client to ignore server-pushed routes, then manually specify what you need

DNS Leak Prevention

Even with a VPN, DNS queries can leak outside the tunnel, revealing what sites you visit. Prevent this by:

  • Using dhcp-option DNS 10.8.0.1 to force VPN DNS servers
  • Adding block-outside-dns (Windows) to prevent non-VPN DNS queries
  • Testing with nslookup to verify DNS goes through the tunnel

Key Takeaway: Client configuration defines connection parameters, split tunneling selectively routes traffic through the VPN (improving performance while maintaining security for sensitive data), and DNS leak prevention ensures queries don't bypass the tunnel.