Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk11 min

How to Configure an OpenVPN Server and Client Profiles

A practical, end-to-end guide to building an OpenVPN PKI, configuring a routed server, creating per-device .ovpn profiles, enabling LAN or full-tunnel access, and revoking compromised credentials.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To configure OpenVPN, build a private certificate authority (CA), issue one server certificate and a separate client certificate/key pair for every device, make the server and clients agree on transport and tunnel settings, then configure forwarding, firewall rules, routes and NAT for the networks you want to reach. Each client receives a portable .ovpn profile containing those connection settings and credentials.

The example below uses Ubuntu, a routed TUN tunnel, UDP port 1194 and the private pool 10.8.0.0/24. Change the pool, LAN routes, interface names and port to fit your network; never choose a VPN subnet that overlaps a client or server LAN.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the design before installing anything

OpenVPN has several independent choices. Decide them first because the server and every client profile must match on the tunnel device, transport, address family and TLS-control settings.

Decision Recommended starting point Use the alternative when
Tunnel type Routed TUN (layer 3) Use bridged TAP (layer 2) only when you genuinely need Ethernet broadcasts or applications that cannot be routed.
Transport UDP, commonly port 1194 TCP can traverse a network that blocks or degrades UDP, but both endpoints must use TCP and the same port.
Address pool A private, non-overlapping subnet such as 10.8.0.0/24 Choose another RFC1918 range if any client or reachable LAN already uses that range.
Routing Split tunnel for selected private networks Full tunnel when all client traffic, including internet traffic, must exit through the VPN server.
Authentication Mutual certificates signed by your CA Add username/password authentication as a second factor only when your server and client software support and require it.
Management Community OpenVPN with files you administer Access Server when you want its version-specific administrative and profile-generation workflow.

A routed TUN deployment is simpler to troubleshoot: the VPN creates an IP interface and routes traffic between the VPN subnet and permitted networks. Bridged TAP extends an Ethernet segment and introduces broadcast, DHCP and loop-prevention considerations that are unnecessary for most remote-access installations.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Install OpenVPN and Easy-RSA on Ubuntu

You need an Ubuntu host with administrative access, a stable hostname or public address, and a firewall or gateway that can deliver the chosen port to the VPN server. If your home or office connection cannot accept inbound traffic, a VPS can host the endpoint instead; the same PKI and routing principles apply.

sudo apt update
sudo apt install openvpn easy-rsa

Keep the CA workspace separate from the running daemon. A common arrangement is an Easy-RSA directory under an administrator-owned location and a server configuration directory readable only by the OpenVPN service. Distribution package paths differ, so verify where your installed service expects server.conf, certificates and keys before copying files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build the private PKI with Easy-RSA

OpenVPN certificate authentication is mutual. The client validates the server certificate, and the server validates the client certificate, with both chains anchored at the same CA. The CA certificate (ca.crt) is shared; the CA private key is not. OpenVPN’s guidance is explicit: each client has its own certificate and key pair, while only the CA file is universal.

Initialize the CA

  1. Enter the Easy-RSA directory and initialize its PKI database.
  2. Create the CA. Protect the CA key with a strong passphrase unless you have a documented reason not to.
./easyrsa init-pki
./easyrsa build-ca

Run CA operations on an offline or tightly restricted administration system whenever possible. Do not place ca.key on the VPN server or in a client profile. Anyone who obtains that key can sign certificates trusted by your entire deployment.

Create and sign the server certificate

The following names are examples; use a unique server name in your own PKI.

./easyrsa gen-req myservername nopass
./easyrsa gen-dh
./easyrsa sign-req server myservername

nopass creates an unencrypted private key so the daemon can start without an interactive password. That is operationally convenient but makes file permissions and host security especially important. If your service design supports an encrypted key and a secure unlock mechanism, omit nopass.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some OpenVPN versions and configurations require Diffie-Hellman parameters; others use an alternative key-exchange configuration. Generate and reference dh.pem only when the selected server configuration calls for it.

Issue one certificate for every client device

Never copy one client private key to several phones, laptops or users. A separate certificate lets you identify and revoke one device without disconnecting every other client.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
./easyrsa gen-req myclient1 nopass
./easyrsa sign-req client myclient1

Repeat the two commands with a different common name for each device, such as laptop-alice or phone-bob. Keep an inventory that maps each certificate name to its owner and device. The generated files normally include the CA certificate, signed certificates, private keys and, when used, a TLS-control key. Transfer only the files that the intended endpoint needs.

Write the OpenVPN server configuration

Start from the sample configuration shipped with your OpenVPN package and adapt it rather than combining directives from unrelated versions. This routed example uses UDP and a 10.8.0.0/24 pool:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
port 1194
proto udp
dev tun
topology subnet
server 10.8.0.0 255.255.255.0
ca ca.crt
cert myservername.crt
key myservername.key
dh dh.pem
tls-crypt ta.key
persist-key
persist-tun
keepalive 10 120
user nobody
group nobody
push "route 192.168.1.0 255.255.255.0"
status openvpn-status.log
verb 3

Replace the example LAN route with the private subnet that clients are allowed to reach. The certificate and key paths can be absolute or relative to the service’s configuration directory; relative paths are easier to manage when all referenced files are stored together.

Select TLS-control protection consistently

The TLS control channel can be protected with tls-auth, tls-crypt or, where supported, tls-crypt-v2. The same mode and compatible key material must be present on both ends. tls-crypt also encrypts the control channel, whereas tls-auth primarily authenticates it. Access Server documentation identifies TLS-Crypt as its default option from version 2.9 onward, but do not copy that product’s defaults into a community server without checking the applicable version.

If you use tls-auth, the server commonly references the key with direction 0 and the client with direction 1. With tls-crypt, both sides reference the same key without a direction value. Generate the key using the syntax supported by the OpenVPN version installed on your server, then protect it like a private credential.

Control client-to-client access

Do not add client-to-client by habit. Without it, clients normally reach the server and routed networks but not one another directly. Add it only when peer-to-peer communication inside the VPN is an explicit requirement, and then apply host-firewall rules to limit which clients may communicate.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Drop privileges after validating permissions

On Unix-like systems, the sample often uses user nobody and group nobody (some distributions use nogroup). Confirm that the service account can read the certificate, key, CA and TLS files before enabling the privilege drop. The private key should be readable by the daemon and its administrator, not by ordinary users.

Choose split-tunnel or full-tunnel pushes

For split tunneling, push only the private networks clients need. For example:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
push "route 192.168.1.0 255.255.255.0"
push "route 10.20.0.0 255.255.0.0"

For a full tunnel, push a default route:

push "redirect-gateway def1"

A full tunnel also requires forwarding, NAT or return routes, and DNS settings that work through the server. If internal DNS is available at 192.168.1.1, you might push it with:

push "dhcp-option DNS 192.168.1.1"

Only advertise DNS servers that VPN clients can actually reach. A route can be correct while name resolution still fails.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make the tunnel reach the LAN or internet

A successful TLS handshake proves authentication and transport, not end-to-end connectivity. The server must forward packets, the host and network firewalls must permit them, and the destination must know how to return traffic to the VPN pool.

Forward the public port

If the VPN server sits behind a gateway, forward UDP port 1194 (or your chosen port) from the gateway’s public address to the server’s LAN address. Set the client’s remote value to the gateway’s public hostname or address, not the server’s private address. If you deliberately use TCP, forward TCP and set proto tcp on both sides.

Enable IPv4 forwarding

sudo sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward=1' | sudo tee /etc/sysctl.d/99-openvpn-forward.conf
sudo sysctl --system

Enable IPv6 forwarding separately if you are routing IPv6; an IPv4-only configuration does not automatically provide IPv6 reachability.

Permit forwarding and add NAT when needed

Your host firewall must allow traffic from the tunnel interface to the intended LAN or internet interface and allow established return traffic. A simple iptables example, using tun0 and eth0, is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo iptables -A FORWARD -i tun0 -o eth0 -s 10.8.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o tun0 -d 10.8.0.0/24 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

Adapt interface names, source ranges and firewall persistence to your distribution. NAT is convenient when you cannot change the LAN router. Without NAT, add a return route on the LAN router for 10.8.0.0/24 via the VPN server’s LAN address; explicit routing preserves source addresses and is often preferable in managed networks.

Separate LAN access from internet access

LAN access needs a route to the LAN and a return path. Full-tunnel internet access additionally needs a default-route push, forwarding to the upstream interface, NAT or an upstream route for the VPN pool, and working DNS. A client can therefore reach a file server while still failing to browse the internet, or browse by IP while failing to resolve names.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Assemble a client profile

An .ovpn file is a portable text artifact containing the directives, parameters and certificates needed to establish a connection. A profile normally includes these elements:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • client, dev and proto to select client mode, tunnel type and transport.
  • remote with the public hostname or address and port.
  • The CA certificate, that device’s signed certificate and its private key.
  • The same TLS-control mode and key used by the server.
  • Persistence, certificate-role and logging options appropriate for the client platform.

This file-reference example assumes the four credential files are stored beside the profile:

client
dev tun
proto udp
remote 198.51.100.20 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth-nocache
verb 3
ca ca.crt
cert myclient1.crt
key myclient1.key
tls-crypt ta.key

The address 198.51.100.20 is a documentation-only example; replace it with your gateway’s public address or DNS name. If a client application expects one file, embed the PEM contents inside <ca>...</ca>, <cert>...</cert>, <key>...</key> and, when applicable, <tls-crypt>...</tls-crypt> blocks. Paste the complete material exactly, including the BEGIN and END lines; never replace it with a sample or truncate it.

Use a unique profile and certificate for each device. A profile contains a private key, so send it over a secure channel, restrict file permissions, avoid storing it in public cloud folders and remove temporary copies from the server after delivery where practical.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Import and verify the profile

OpenVPN 3 Linux

Import a persistent profile and give it an administrative name:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
openvpn3 config-import --config myclient1.ovpn --name office-vpn --persistent
openvpn3 configs-list

Other OpenVPN clients import the same .ovpn artifact through their platform interface or service. The labels differ, but the required certificate, key, transport and TLS settings do not.

Test in layers

  1. Confirm the client reports a completed TLS handshake and assigns a VPN address.
  2. Ping the VPN server’s tunnel-side address. This isolates certificate and tunnel-interface problems from LAN routing.
  3. Reach one permitted LAN host by IP address.
  4. Test an internal hostname if the deployment should provide private DNS.
  5. For full tunnel, check the client’s default route, then test an internet address and DNS name.

Record the client’s assigned address, routes and DNS servers during a successful connection. Those observations make later troubleshooting much faster.

Troubleshoot the common failure modes

The client never completes TLS negotiation

  • Verify the public port is forwarded to the correct host and that the host firewall permits it.
  • Check that both ends use UDP or both use TCP, the same port and compatible address families.
  • Confirm the client’s remote value resolves to the gateway’s public address.
  • Ensure the CA, client certificate, private key and TLS-control key belong together.
  • Check server and client clocks. Certificates are rejected when a clock is outside their validity period.
  • Look for an expired certificate, an incorrect server name, or a client certificate signed by a different CA.

A message such as a TLS key negotiation timeout usually indicates reachability, firewall, transport or mismatched control-channel settings; it is not fixed by changing LAN routes.

The client connects but cannot reach the VPN gateway

Inspect the client route table and verify that the tunnel interface exists. Check the server’s tunnel address, host firewall and the server configuration’s server pool. If the gateway itself is unreachable, solve the tunnel-side problem before investigating LAN routing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The gateway responds but LAN hosts do not

Confirm that the server pushed or statically installed the LAN route, that IP forwarding is enabled, and that firewall rules allow traffic from tun0 to the LAN interface. Then inspect the LAN router’s return route for the VPN subnet. Adding NAT can prove a return-path problem, but use an explicit route when preserving client source addresses matters.

LAN access works but full-tunnel internet does not

Check for redirect-gateway def1, forwarding from the tunnel to the internet interface, and a MASQUERADE rule or upstream route for the VPN pool. If public IP tests work but hostnames fail, push a reachable DNS server or configure a client-side DNS policy.

Only one of several clients works

Look for reused certificates or private keys, duplicate common names and copied profiles. Issue a new certificate for each device. Also check whether the VPN pool is exhausted or whether overlapping local subnets cause a client to send traffic to its local network instead of the tunnel.

TCP works where UDP does not

That can indicate a network that blocks or mishandles UDP, but TCP-over-TCP can perform poorly under packet loss. Use TCP as a deliberate compatibility choice, not as a universal performance improvement, and change both the server and every client profile together.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Revoke credentials and operate the PKI

Plan revocation before issuing certificates. If a laptop or phone is lost, revoke its certificate rather than merely deleting a profile from your inventory.

./easyrsa revoke myclient1
./easyrsa gen-crl

Distribute the resulting CRL to the server and reference it with a directive such as crl-verify crl.pem in the server configuration. Reload or restart the service according to your operating system so the new CRL is active. Keep the CA key offline, protect server and client private keys, and limit who can read daemon configuration files.

Maintain a record of certificate names, issue dates, owners, devices and revocation status. Synchronize clocks on the server, gateway and clients because certificate validity depends on time. When replacing a device, issue a new key pair instead of copying the old one.

Community OpenVPN and Access Server are different workflows

They implement the same underlying VPN concepts—certificates, tunnel networks, routes and TLS protection—but their administration differs. A community deployment is normally configured by editing server and client files and operating Easy-RSA yourself. Access Server provides its own management interface and profile-generation process. Follow the documentation for the exact product and version in use; do not paste Access Server-specific defaults or generated-profile commands into a community configuration, or assume that a community configuration can be imported unchanged into Access Server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Production readiness checklist

  • The VPN subnet does not overlap any client or reachable LAN subnet.
  • Every client has a distinct certificate and private key.
  • The CA private key is offline or tightly restricted.
  • The server and clients agree on TUN/TAP, UDP/TCP, port, TLS-control mode and key.
  • The public gateway forwards the selected port to the VPN server.
  • IP forwarding, host firewall rules and LAN firewall policies are intentional.
  • Each advertised route has a working return path, with NAT used only where appropriate.
  • Full-tunnel deployments have tested internet forwarding and DNS.
  • Client profiles are transferred securely and protected at rest.
  • A revocation procedure and CRL distribution process have been tested.
  • Server and client clocks remain synchronized.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.