Gentoo Archives: gentoo-user

From: thelma@×××××××××××.com
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] openvpn client IP address
Date: Thu, 18 Jan 2018 16:08:29
Message-Id: a77e67f1-bea3-e52f-ee49-7842fa99c35d@sys-concept.com
In Reply to: Re: [gentoo-user] openvpn client IP address by Michael Orlitzky
1 On 01/18/2018 07:15 AM, Michael Orlitzky wrote:
2 > On 01/17/2018 09:51 PM, thelma@×××××××××××.com wrote:
3 >> How openvpn client obtains IP address from the server?
4 >>
5 >> On the sever in server.conf I had:
6 >> server 192.168.139.0 255.255.255.0
7 >> route 10.0.0.0 255.255.255.0 192.168.139.7
8 >>
9 >> On server in ccd/ I had client.file:
10 >> ifconfig-push 192.168.139.3 255.255.255.0
11 >
12 > Two things to check:
13 >
14 > First, the client configuration directory needs to be specified in the
15 > server configuration file with the "client-config-dir" directive. In
16 > your case, it looks like you need
17 >
18 > client-config-dir ccd
19 >
20 > but try an absolute path if that doesn't work for you.
21 >
22 > The second is the naming convention for the client configuration files
23 > themselves. The files in "ccd" need to match the common names on the
24 > certificates of your clients exactly, IIRC. So instead of "client.file",
25 > you probably want just "client".
26
27 Thanks for reply.
28 I've already figure it out. The configuration file in ccd/ directory on
29 a server is linked to a key generated for the client during setup on
30 server:
31 ./easyrsa build-client-full syscon7 nopass (this is client key pair)
32
33 So the file in ccd/ (on server) has to be called "syscon7" and the
34 client computer will take IP from this file (that you assign).
35
36 Joseph