> On Friday, February 23rd, 2024 at 3:54 PM, Gert Doering <g...@greenie.muc.de> 
> wrote:

> Hi,
> 
> On Fri, Feb 23, 2024 at 12:20:32PM +0000, Peter Davis via Openvpn-users wrote:
> 
> > 2024-02-23 15:46:43 Peter/172.20.1.254:44526 OPTIONS IMPORT: reading client 
> > specific options from: /tmp/openvpn_cc_49daa49dc12e3fd51fc8e9f83942bc70.tmp
> > 2024-02-23 15:46:43 Peter/172.20.1.254:44526 Options error: Unrecognized 
> > option or missing or extra parameter(s) in 
> > /tmp/openvpn_cc_49daa49dc12e3fd51fc8e9f83942bc70.tmp:1: 2024-02-23 (2.6.3)
> 
> 
> This very much looks like your --client-connect script isn't logging to
> where it should but writing a timestamp to the CC options output file
> (which which the script can create per-client configs).
> 
> I think at this point you need to familiarize yourself with shell
> scripting to ensure that script is well-behaved.
> 
> gert
> 
> --
> "If was one thing all people took for granted, was conviction that if you
> feed honest figures into a computer, honest figures come out. Never doubted
> it myself till I met a computer with a sense of humor."
> Robert A. Heinlein, The Moon is a Harsh Mistress
> 
> Gert Doering - Munich, Germany g...@greenie.muc.de

Hi,
I found another script:

#!/bin/sh

# Copyright Josh Cepek
# This file is part of the openvpn-dynamic project, available from:
# https://github.com/QueuingKoala/openvpn-dynamic
# Dual-licensed under GPLv3 and BSD-3-clause

# BEGIN User Connect Accounting

log_file="/tmp/Connections.log"

# Vars used:
date_now="$(date +'%F-%H:%M')"

line="User '$common_name' \
at $date_now \
using $ifconfig_pool_remote_ip \
from ${trusted_ip}:${trusted_port}"

# Append to the log
echo "$line" >> "$log_file"

# END User Connect Accounting

exit 0

This script also cannot write the reports in the defined file.


_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to