On Sat, 02 Mar 2024 10:22:48 +, Peter Davis via Openvpn-users
wrote:
>Hello,
>As suggested by someone here, I chose the /tmp directory because it
>doesn't need any special permissions and I can make sure the script
>runs correctly.
And as you have stated it still "does not work", except it
> On Wednesday, February 28th, 2024 at 5:01 PM, Bo Berglund
> wrote:
> On Wed, 28 Feb 2024 14:07:13 +0100, Marc SCHAEFER schae...@alphanet.ch wrote:
>
> > On Wed, Feb 28, 2024 at 12:52:17PM +, Peter Davis via Openvpn-users
> > wrote:
> >
> > > # #!/bin/bash
> > > # export script_type="cli
Hi,
On Sat, Mar 02, 2024 at 08:41:57AM +, Peter Davis wrote:
> So, how to solve it?
I also answered this before - get a solid understanding how systemd works,
and how the systemd unit files on your system are configured (= which
directories are protected, or made private). Also find out if S
> On Wednesday, February 28th, 2024 at 6:10 PM, Gert Doering
> wrote:
> Hi,
>
> On Wed, Feb 28, 2024 at 12:52:17PM +, Peter Davis via Openvpn-users wrote:
>
> > # cat /tmp/Connections.log
> > 2024-02-28 16:16:51 - CommonName connected with IP 192.168.129.253
> >
> > So, why is the script
Hi,
On Wed, Feb 28, 2024 at 12:52:17PM +, Peter Davis via Openvpn-users wrote:
> # cat /tmp/Connections.log
> 2024-02-28 16:16:51 - CommonName connected with IP 192.168.129.253
>
> So, why is the script not working in OpenVPN?
You already know the answer of that - because systemd is making
On 28.02.24 14:31, Bo Berglund wrote:
I am running *all* openvpn scripts from within /etc/openvpn/scripts and I use
the *full path* to the scripts in the conf files calls.
I also keep all of the custom logs (as defined in the conf file) below
/etc/openvpn/log, which is also perfectly accessile b
On Wed, 28 Feb 2024 14:07:13 +0100, Marc SCHAEFER wrote:
>On Wed, Feb 28, 2024 at 12:52:17PM +, Peter Davis via Openvpn-users wrote:
>> # #!/bin/bash
>> # export script_type="client-connect"
>> # export common_name="CommonName"
>> # export trusted_ip="192.168.129.253"
>> # ./server-events.sh
On Wed, Feb 28, 2024 at 12:52:17PM +, Peter Davis via Openvpn-users wrote:
> # #!/bin/bash
> # export script_type="client-connect"
> # export common_name="CommonName"
> # export trusted_ip="192.168.129.253"
> # ./server-events.sh
I did not follow the whole discussion, but why on earth are you
> On Monday, February 26th, 2024 at 5:06 PM, Bo Berglund
> wrote:
> On Mon, 26 Feb 2024 10:07:14 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hi,
> > Thanks again.
> > I changed "LOG_FILE" to LOG_FILE="/tmp/Connections.log" and executed the
> > script
On Mon, 26 Feb 2024 10:07:14 +, Peter Davis via Openvpn-users
wrote:
>Hi,
>Thanks again.
>I changed "LOG_FILE" to LOG_FILE="/tmp/Connections.log" and executed the
>script:
>
># ./script-events.sh
>#
># cat /tmp/Connections.log
>2024-02-26 13:32:19 - CommonName connected with IP 192.168.129.
> On Monday, February 26th, 2024 at 1:42 PM, Gert Doering
> wrote:
> Hi,
>
> On Mon, Feb 26, 2024 at 10:10:23AM +, Peter Davis wrote:
>
> > I have two scripts. The second script worked, but puts the data in the /tmp
> > directory.
> > I selected the "/tmp" directory, so this is not relate
Hi,
On Mon, Feb 26, 2024 at 10:10:23AM +, Peter Davis wrote:
> I have two scripts. The second script worked, but puts the data in the /tmp
> directory.
> I selected the "/tmp" directory, so this is not related to the permission!
If you have a working script, then why not use that?
(And when
> On Monday, February 26th, 2024 at 10:55 AM, Gert Doering
> wrote:
> Hi,
>
> On Sun, Feb 25, 2024 at 06:50:39PM +, Peter Davis via Openvpn-users wrote:
>
> > But my problem is that the script doesn't work at all. How do I find the
> > cause?
>
>
> Last thing you said is it does work wh
> On Monday, February 26th, 2024 at 12:05 AM, Bo Berglund
> wrote:
> On Sun, 25 Feb 2024 10:50:05 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > > Hello,
> > > I installed shellcheck and result is:
> > >
> > > # shellcheck script-events.sh
> > >
> > >
Hi,
On Sun, Feb 25, 2024 at 06:50:39PM +, Peter Davis via Openvpn-users wrote:
> But my problem is that the script doesn't work at all. How do I find the
> cause?
Last thing you said is it *does* work when logging to /tmp (though
systemd hides it in the private /tmp directory).
So if all yo
> On Sunday, February 25th, 2024 at 6:20 PM, Bo Berglund
> wrote:
> On Sun, 25 Feb 2024 15:31:20 +0100, Bo Berglund bo.bergl...@gmail.com wrote:
>
> > On Sun, 25 Feb 2024 10:50:05 +, Peter Davis via Openvpn-users
> > openvpn-users@lists.sourceforge.net wrote:
> >
> > > Hello,
> > > I insta
On Sun, 25 Feb 2024 10:50:05 +, Peter Davis via Openvpn-users
wrote:
>>Hello,
>>I installed shellcheck and result is:
>>
>># shellcheck script-events.sh
>>
>>In script-events.sh line 14:
>>if [[ "$script_type" == "client-connect" ]]; then
>> ^--^ SC2154 (warning): script_type is
On Sun, 25 Feb 2024 15:31:20 +0100, Bo Berglund wrote:
>On Sun, 25 Feb 2024 10:50:05 +, Peter Davis via Openvpn-users
> wrote:
>
>>Hello,
>>I installed shellcheck and result is:
>>
>># shellcheck script-events.sh
>>
>>In script-events.sh line 14:
>>if [[ "$script_type" == "client-connect" ]];
On Sun, 25 Feb 2024 10:50:05 +, Peter Davis via Openvpn-users
wrote:
>Hello,
>I installed shellcheck and result is:
>
># shellcheck script-events.sh
>
>In script-events.sh line 14:
>if [[ "$script_type" == "client-connect" ]]; then
> ^--^ SC2154 (warning): script_type is referen
> On Friday, February 23rd, 2024 at 4:39 PM, Bo Berglund
> wrote:
> On Fri, 23 Feb 2024 13:24:36 +0100, Gert Doering g...@greenie.muc.de wrote:
>
> > I think at this point you need to familiarize yourself with shell
> > scripting to ensure that script is well-behaved.
>
>
> And using shellche
On Fri, 23 Feb 2024 13:24:36 +0100, Gert Doering wrote:
>I think at this point you need to familiarize yourself with shell
>scripting to ensure that script is well-behaved.
And using shellcheck after editing/creating a script file also
helps in getting rid of syntax errors etc...
"sudo apt ins
> On Friday, February 23rd, 2024 at 3:54 PM, Gert Doering
> wrote:
> Hi,
>
> On Fri, Feb 23, 2024 at 12:20:32PM +, 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_49daa49dc12e
Hi,
On Fri, Feb 23, 2024 at 12:20:32PM +, 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 err
> On Friday, February 23rd, 2024 at 3:33 PM, Bo Berglund
> wrote:
> On Fri, 23 Feb 2024 11:36:39 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > > On Friday, February 23rd, 2024 at 2:50 PM, Bo Berglund
> > > bo.bergl...@gmail.com wrote:
> >
> > > On Fri
On Fri, 23 Feb 2024 11:36:39 +, Peter Davis via Openvpn-users
wrote:
>> On Friday, February 23rd, 2024 at 2:50 PM, Bo Berglund
>> wrote:
>
>> On Fri, 23 Feb 2024 10:33:19 +, Peter Davis via Openvpn-users
>> openvpn-users@lists.sourceforge.net wrote:
>>
>> > # mkdir /etc/openvpn/Log/
>
> On Friday, February 23rd, 2024 at 2:50 PM, Bo Berglund
> wrote:
> On Fri, 23 Feb 2024 10:33:19 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > But:
> >
> > # ls /etc/openvpn/Log/
> > #
> >
> > No files have been created.
>
>
> Logfile is created fol
On Fri, 23 Feb 2024 10:33:19 +, Peter Davis via Openvpn-users
wrote:
>But:
>
># ls /etc/openvpn/Log/
>#
>
>No files have been created.
Logfile is created following a login to the
OpenVPN server you have configured for logging.
--
Bo Berglund
Developer in Sweden
___
> On Friday, February 23rd, 2024 at 12:36 PM, Bo Berglund
> wrote:
> On Fri, 23 Feb 2024 08:12:47 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hi,
> > Thanks again.
> > You right. Logs are under
> > "/tmp/systemd-private-0b76fd773c1b491090b47570896093
On Fri, 23 Feb 2024 08:12:47 +, Peter Davis via Openvpn-users
wrote:
>Hi,
>Thanks again.
>You right. Logs are under
>"/tmp/systemd-private-0b76fd773c1b491090b475708960936b-openvpn\@server.service-kEyUKj/tmp/Connections.log".
>
>Why is nothing written to the file when I create it in the "/var
Hi,
On Fri, Feb 23, 2024 at 08:12:47AM +, Peter Davis wrote:
> Why is nothing written to the file when I create it in the "/var/log/openvpn
> directory"?
>
> # ls -l /var/log/openvpn/
> total 40
> -rw-r--r-- 1 root root 0 Feb 23 10:16 Connections.log
> -rw--- 1 root root 603 Feb 23
> On Friday, February 23rd, 2024 at 10:58 AM, Gert Doering
> wrote:
> Hi
>
> On Fri, Feb 23, 2024 at 07:05:46AM +, Peter Davis wrote:
>
> > log_file="/tmp/Connections.log"
>
>
> Don't use /tmp in systemd environments - that was bad advice by one of
> the other posters. Systemd likes to d
Hi
On Fri, Feb 23, 2024 at 07:05:46AM +, Peter Davis wrote:
> log_file="/tmp/Connections.log"
Don't use /tmp in systemd environments - that was bad advice by one of
the other posters. Systemd likes to do per-service /tmp directories,
so your log file is likely somewhere in /tmp/systemd-priva
> On Wednesday, February 21st, 2024 at 9:48 PM, Gert Doering
> wrote:
> Hi,
>
> On Wed, Feb 21, 2024 at 05:53:59PM +, Peter Davis via Openvpn-users wrote:
>
> > What is wrong?
>
>
> Have you enabled the script in the openvpn config? Including raising
> script-security? What does the open
On 21.02.24 18:53, Peter Davis via Openvpn-users wrote:
LOG_FILE="/var/log/openvpn/Connections.log"
I restarted the OpenVPN service and connected to the OpenVPN server
with a client. I checked the file, but it was empty and nothing was
registered.
What is wrong?
Are directory and file writable
Hi,
On Wed, Feb 21, 2024 at 05:53:59PM +, Peter Davis via Openvpn-users wrote:
> What is wrong?
Have you enabled the script in the openvpn config? Including raising
script-security? What does the openvpn server log look like?
(It's always the same question "what is in the logs?" so you mig
> On Wednesday, February 21st, 2024 at 5:18 PM, Bo Berglund
> wrote:
> On Wed, 21 Feb 2024 11:04:48 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hello,
> > I use Debian. I used "bash" instead of "sh":
> >
> > # bash script-events.sh
> > script-events.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Hi,
On Wednesday, 21 February 2024 at 06:59, Peter Davis via Openvpn-users
wrote:
> Hi,
> I got the following error:
>
> # sh /etc/openvpn/scripts/script-events.sh
> /etc/openvpn/scripts/script-events.sh: 6: [: ==: unexpected operator
> /etc/o
On Wed, 21 Feb 2024 11:04:48 +, Peter Davis via Openvpn-users
wrote:
>
>Hello,
>I use Debian. I used "bash" instead of "sh":
>
># bash script-events.sh
>script-events.sh: line 6: [: ==: unary operator expected
>
>I changed "[" to "[[":
>
># bash script-events.sh
>#
>
>Seems OK?
You also ne
>On Wednesday, February 21st, 2024 at 1:01 PM, Bo Berglund
> wrote:
> On Wed, 21 Feb 2024 06:59:25 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > > On Tuesday, February 20th, 2024 at 8:26 PM, Bo Berglund
> > > bo.bergl...@gmail.com wrote:
> >
> > > On T
On Wed, 21 Feb 2024 06:59:25 +, Peter Davis via Openvpn-users
wrote:
>> On Tuesday, February 20th, 2024 at 8:26 PM, Bo Berglund
>> wrote:
>
>> On Tue, 20 Feb 2024 11:29:36 +, Peter Davis via Openvpn-users
>> openvpn-users@lists.sourceforge.net wrote:
>>
>> > Hi,
>> > Thanks again.
>> >
> On Tuesday, February 20th, 2024 at 8:26 PM, Bo Berglund
> wrote:
> On Tue, 20 Feb 2024 11:29:36 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hi,
> > Thanks again.
> > Can you make the report be saved to a file?
>
>
> Are you trolling me?
>
> What
> On Tuesday, February 20th, 2024 at 8:26 PM, Bo Berglund
> wrote:
> On Tue, 20 Feb 2024 11:29:36 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hi,
> > Thanks again.
> > Can you make the report be saved to a file?
>
>
> Are you trolling me?
>
> What
On Tue, 20 Feb 2024 11:29:36 +, Peter Davis via Openvpn-users
wrote:
>Hi,
>Thanks again.
>Can you make the report be saved to a file?
Are you trolling me?
What do you think this does? :
LOG_FILE="/etc/openvpn/log/server-events.log"
echo "$LOG_TIMESTAMP - $common_name connected with IP $tru
> On Monday, February 19th, 2024 at 5:16 PM, Bo Berglund
> wrote:
> On Mon, 19 Feb 2024 11:57:43 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hi,
> > Thanks again.
> > Can you put the script somewhere like pastebin? I can't fix it.
>
>
> I modified t
On Mon, 19 Feb 2024 11:57:43 +, Peter Davis via Openvpn-users
wrote:
>Hi,
>Thanks again.
>Can you put the script somewhere like pastebin? I can't fix it.
I modified the script so it can be used without call argument like I have done,
then the logfile defined in the script is used, otherwise
> On Sunday, February 18th, 2024 at 5:57 PM, Bo Berglund
> wrote:
> On Sun, 18 Feb 2024 09:44:14 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > Hi,
> > Mine is:
> >
> > # ls -l scripts/script-events.sh
> > -rwxr-xr-x 1 root root 543 Feb 18 10:11 scripts
On Sun, 18 Feb 2024 09:44:14 +, Peter Davis via Openvpn-users
wrote:
>Hi,
>Mine is:
>
># ls -l scripts/script-events.sh
>-rwxr-xr-x 1 root root 543 Feb 18 10:11 scripts/script-events.sh
>
>And Server.conf is:
>...
>script-security 2
>client-connect /etc/openvpn/scripts/script-events.sh
>clie
> On Sunday, February 18th, 2024 at 12:27 PM, Bo Berglund
> wrote:
> On Sun, 18 Feb 2024 06:50:06 +, Peter Davis via Openvpn-users
> openvpn-users@lists.sourceforge.net wrote:
>
> > > SOLUTION
> > >
> > > Just to follow up on my question
> > > -
> > > I have
On Sun, 18 Feb 2024 06:50:06 +, Peter Davis via Openvpn-users
wrote:
>> SOLUTION
>>
>> Just to follow up on my question
>> -
>> I have done the following and it seems to work:
>>
>> /etc/openvpn/server/serverlocal.conf:
>>
>> #Add logging of client connect/d
> On Friday, February 16th, 2024 at 2:10 PM, Bo Berglund
> wrote:
> On Wed, 14 Feb 2024 08:34:38 +0100, Bo Berglund bo.bergl...@gmail.com wrote:
>
> > I also want to log server side client connect/disconnect events on my
> > server.
> >
> > And I have tried to read the documentation here:
> >
On Wed, 14 Feb 2024 08:34:38 +0100, Bo Berglund wrote:
>I also want to log server side client connect/disconnect events on my server.
>
>And I have tried to read the documentation here:
>https://openvpn.net/community-resources/reference-manual-for-openvpn-2-5/
>
>I can find a lot of entries for t
On Tue, 13 Feb 2024 13:28:27 -0500, mike tancsa wrote:
>On 2/13/2024 1:13 PM, Peter Davis via Openvpn-users wrote:
>> Hello,
>> 1- Is there a way to report when clients connect and disconnect?
>>
>> 2- Is it possible to notify the connection of a specific client to the
>> server through email?
>
Hi,
On Tue, Feb 13, 2024 at 06:37:03PM +, Peter Davis via Openvpn-users wrote:
> I mean, does OpenVPN itself have the ability to keep the IP address of the
> client and the time it is connected to the server somewhere for reporting?
No. This is something we have script/plugin interfaces for
Hi,
On Tue, Feb 13, 2024 at 06:13:37PM +, Peter Davis via Openvpn-users wrote:
> 1- Is there a way to report when clients connect and disconnect?
>
> 2- Is it possible to notify the connection of a specific client to the server
> through email?
I seem to have managed --client-connect script
On 2/13/2024 1:13 PM, Peter Davis via Openvpn-users wrote:
Hello,
1- Is there a way to report when clients connect and disconnect?
2- Is it possible to notify the connection of a specific client to the
server through email?
On the server, you can use the client-connect/disconnect config. Just
On 2/13/2024 1:37 PM, Peter Davis wrote:
> On Tuesday, February 13th, 2024 at 9:58 PM, mike tancsa
wrote:
On 2/13/2024 1:13 PM, Peter Davis via Openvpn-users wrote:
Hello,
1- Is there a way to report when clients connect and disconnect?
2- Is it possible to notify the connection of a specific
> On Tuesday, February 13th, 2024 at 9:58 PM, mike tancsa
> wrote:
> On 2/13/2024 1:13 PM, Peter Davis via Openvpn-users wrote:
>
>> Hello,
>> 1- Is there a way to report when clients connect and disconnect?
>>
>> 2- Is it possible to notify the connection of a specific client to the
>> server
Hello,
1- Is there a way to report when clients connect and disconnect?
2- Is it possible to notify the connection of a specific client to the server
through email?
Thank you.___
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://li
58 matches
Mail list logo