client-config-dir ccd NOT WORKING [oconf]

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
jim2048
OpenVpn Newbie
Posts: 1
Joined: Tue Apr 17, 2018 1:27 am

client-config-dir ccd NOT WORKING [oconf]

Post by jim2048 » Tue Apr 17, 2018 2:10 am

OpenVPN Server on Windows server, working as designed, but I will post to perhaps help others
if the hostname file in the ccd folder has the .txt extension, the server will read the file, but when the client connects, it will push the route to the client and cause all traffic on the client to be routed over the VPN (bad.)

*** with file: ccd\pinfw02.txt ***
Mon Apr 16 23:53:15 2018 us=359485 IFCONFIG POOL LIST
Mon Apr 16 23:53:15 2018 us=359485 pinfw02,10.210.0.4
Mon Apr 16 23:54:36 2018 us=388932 pinfw02/76.xxx.xxx.28:36021 MULTI: Learn: 10.210.0.4 -> pinfw02/76.xxx.xxx.28:36021
Mon Apr 16 23:54:36 2018 us=388932 pinfw02/76.xxx.xxx.28:36021 MULTI: primary virtual IP for pinfw02/76.xxx.xxx.28:36021: 10.210.0.4
Mon Apr 16 23:54:37 2018 us=638897 pinfw02/76.xxx.xxx.28:36021 UDPv4 READ [56] from [AF_INET]76.xxx.xxx.28:36021: P_CONTROL_V1 kid=0 [ ] pid=6 DATA len=42
Mon Apr 16 23:54:37 2018 us=638897 pinfw02/76.xxx.xxx.28:36021 PUSH: Received control message: 'PUSH_REQUEST'
Mon Apr 16 23:54:37 2018 us=638897 pinfw02/76.xxx.xxx.28:36021 SENT CONTROL [pinfw02]: 'PUSH_REPLY,route 172.31.16.0 255.255.240.0,route 192.168.1.0 255.255.255.0,compress lz4-v2,route-gateway 10.210.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.210.0.4 255.255.255.0,peer-id 1,cipher AES-256-GCM' (status=1)

*** with file: ccd\pinfw02 ***
Mon Apr 16 21:33:07 2018 us=442367 IFCONFIG POOL LIST
Mon Apr 16 21:33:07 2018 us=442367 pinfw02,10.210.0.4
Mon Apr 16 21:33:09 2018 us=770423 pinfw02/76.xxx.xxx.28:46802 MULTI: Learn: 10.210.0.4 -> pinfw02/76.xxx.xxx.28:46802
Mon Apr 16 21:33:09 2018 us=770423 pinfw02/76.xxx.xxx.28:46802 MULTI: primary virtual IP for pinfw02/76.xxx.xxx.28:46802: 10.210.0.4
Mon Apr 16 21:33:09 2018 us=770423 pinfw02/76.xxx.xxx.28:46802 MULTI: internal route 192.168.1.0/24 -> pinfw02/76.xxx.xxx.28:46802
Mon Apr 16 21:33:09 2018 us=770423 pinfw02/76.xxx.xxx.28:46802 MULTI: Learn: 192.168.1.0/24 -> pinfw02/76.xxx.xxx.28:46802
Mon Apr 16 21:33:09 2018 us=770423 pinfw02/76.xxx.xxx.28:46802 REMOVE PUSH ROUTE: 'route 192.168.1.0 255.255.255.0'
Mon Apr 16 21:33:10 2018 us=864158 pinfw02/76.xxx.xxx.28:46802 PUSH: Received control message: 'PUSH_REQUEST'
Mon Apr 16 21:33:10 2018 us=864158 pinfw02/76.xxx.xxx.28:46802 SENT CONTROL [pinfw02]: 'PUSH_REPLY,topology subnet,route 172.31.16.0 255.255.240.0,compress lz4-v2,route-gateway 10.210.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.210.0.4 255.255.255.0,peer-id 0,cipher AES-256-GCM' (status=1)

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 4641
Joined: Fri Jun 03, 2016 1:17 pm

Re: client-config-dir ccd NOT WORKING [oconf]

Post by TinCanTech » Tue Apr 17, 2018 12:27 pm

jim2048 wrote:
Tue Apr 17, 2018 2:10 am
if the hostname file in the ccd folder has the .txt extension, the server will read the file
The server will only read the file which has the exact same name as the client common_name.

So, unless the client common_name has a .txt at the end (eg. common_name="my_client_01.txt") the CCD file will not be read.

In your case:
jim2048 wrote:
Tue Apr 17, 2018 2:10 am
*** with file: ccd\pinfw02.txt ***
The CCD file is not used.
jim2048 wrote:
Tue Apr 17, 2018 2:10 am
*** with file: ccd\pinfw02 ***
The CCD file is used.

Post Reply