Jump to content

OpenVPN:Client Configuration: Difference between revisions

From jb-vpn.uk Wiki
Minor update - configuration guide: OpenVPN Client Configuration (9 sections) (configuration)
Content added - configuration guide: OpenVPN Client Configuration (15 sections) (configuration)
 
Line 1: Line 1:
= OpenVPN Client Configuration =
This document describes how to configure OpenVPN clients.
This document describes how to configure OpenVPN clients.


Line 46: Line 44:
=== Connecting from Client ===
=== Connecting from Client ===


= '''Install OpenVPN client''' on the device =
==== '''Install OpenVPN client''' on the device ====
= '''Import the <code>.ovpn</code> file''' into the OpenVPN client =
== '''Import the <code>.ovpn</code> file''' into the OpenVPN client ==
= '''Connect''' using the client application =
== '''Connect''' using the client application ==


=== Synology NAS Connection ===
=== Synology NAS Connection ===
Line 59: Line 57:


<pre class="lang-bash">
<pre class="lang-bash">
= Check connected clients =
==== Check connected clients ====
cat /etc/openvpn/server/ipp.txt
cat /etc/openvpn/server/ipp.txt


= Check VPN interface =
== Check VPN interface ==
ip addr show tun0
ip addr show tun0


= Ping client =
== Ping client ==
ping 10.8.0.2
ping 10.8.0.2
</pre>
</pre>

Latest revision as of 13:44, 1 January 2026

This document describes how to configure OpenVPN clients.

Client Files

[edit]

Client configuration files (.ovpn) are stored in /root/:

  • josh.ovpn
  • Work_MacBook_Air.ovpn
  • StrawberryNAS.ovpn (Synology NAS)

Client Configuration Structure

[edit]

Each client .ovpn file contains:

  • Client certificate
  • Client private key
  • CA certificate
  • TLS-Crypt key
  • Connection settings (server IP, port, protocol)

Client Configuration Directory

[edit]

Per-client configurations can be placed in /etc/openvpn/ccd/ to assign static IP addresses or custom routes.

Current CCD Files:

  • StrawberryNAS - Static IP configuration for Synology NAS (10.8.0.2)

Example CCD File

[edit]

Example CCD file content:

ifconfig-push 10.8.0.2 255.255.255.0

This assigns a static IP address (10.8.0.2) to the client named "StrawberryNAS". The second parameter is the netmask for the VPN subnet.

Client Connection

[edit]

Connecting from Client

[edit]

Install OpenVPN client on the device

[edit]

Import the .ovpn file into the OpenVPN client

[edit]

Connect using the client application

[edit]

Synology NAS Connection

[edit]

The Synology NAS connects using StrawberryNAS.ovpn and typically receives IP address 10.8.0.2.

Verifying Connection

[edit]

From the server, verify client is connected:

==== Check connected clients ====
cat /etc/openvpn/server/ipp.txt

== Check VPN interface ==
ip addr show tun0

== Ping client ==
ping 10.8.0.2
[edit]
  • [Server Configuration](server-configuration.md) - Server setup
  • [User Management](user-management.md) - Adding new clients
  • [Certificate Management](certificate-management.md) - Certificate details