Use of push-peer-info

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
mahhy
OpenVpn Newbie
Posts: 2
Joined: Tue Jan 21, 2020 12:08 pm

Use of push-peer-info

Post by mahhy » Tue Jan 21, 2020 12:48 pm

According to the documentation:

Code: Select all

--push-peer-info
Push additional information about the client to server. The following data is always pushed to the server:
<..SNIP..>
When --push-peer-info is enabled the additional information consists of the following data:

UV_<name>=<value> -- client environment variables whose names start with "UV_"
I have a few questions:

1. Will the client side log the UV_* vars/values?
2. Will the server side log the UV_* vars/values?
3. Does "client environment variables" refer to the --setenv param, or actual environment variables?

I'm attempting to add some env vars that the client can push to server as per documentation, however I wanted to check I'd see them in the logs (assuming I've set them correctly), and if they required use of --setenv.

Thanks!

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use of push-peer-info

Post by TinCanTech » Tue Jan 21, 2020 2:10 pm

The server --log file @ --verb 4 will show the variables pushed by the client.

In the client config use:

Code: Select all

setenv UV_myvar foo

mahhy
OpenVpn Newbie
Posts: 2
Joined: Tue Jan 21, 2020 12:08 pm

Re: Use of push-peer-info

Post by mahhy » Wed Jan 22, 2020 6:25 am

TinCanTech wrote:
Tue Jan 21, 2020 2:10 pm
The server --log file @ --verb 4 will show the variables pushed by the client.

In the client config use:

Code: Select all

setenv UV_myvar foo
Thanks for the reply, I can see anything set with setenv/--setenv in the logs.

However I'm wondering if I can use actual environment variables. The documentation states "client environment variables", but I suspect that does not mean actual "environment variables", i.e. those set in your shell / system environment. Is that correct?

DFu
OpenVpn Newbie
Posts: 1
Joined: Thu Oct 29, 2020 9:47 am

Re: Use of push-peer-info

Post by DFu » Thu Oct 29, 2020 9:47 am

i have the same problem... no system env are possible?

Post Reply