AW: AW: Read Client Hostname

Matthias Mandlmeier matthias.mandlmeier at online.de
Thu Mar 3 10:00:07 PST 2016


I tested it with the the ocserv-script and added the value $Hostname in it get the Hostname. 
The Line in the ocserv-script now looks like echo "User '$USERNAME' from '$IP_REAL' connected. Local IP is '$IP_REMOTE' Hostname is '$Hostname'" >> /etc/ocserv/test2.txt and output it to a file that I can see the variables. When a client connects I get the following Output "User 'test' from 'X.X.X.X' connected. Local IP is 'X.X.X.X' Hostname is ''" and the Value of the Hostname variable is empty all other variables in the script has the correct value in it. In the debug log I see the correct hostname in this entry HTTP: X-CSTP-Hostname.

Regards

Matthias

-----Ursprüngliche Nachricht-----
Von: Nikos Mavrogiannopoulos [mailto:n.mavrogiannopoulos at gmail.com] 
Gesendet: Donnerstag, 3. März 2016 09:44
An: Matthias Mandlmeier <matthias.mandlmeier at online.de>
Cc: 'openconnect-devel' <openconnect-devel at lists.infradead.org>
Betreff: Re: AW: Read Client Hostname

On Wed, 2016-03-02 at 18:10 +0100, Matthias Mandlmeier wrote:
> Hi Nikos,
> 
> In the debug Log I see for example in the X-CSTP-Hostname my hostname 
> with HTTP: X-CSTP-Hostname: Matthiass-iPhone in the Server Debug Log.
> My question is now How to read this variable in a script that I can 
> send an Dynamic DNS Update to my Bind DNS Server that also other 
> Clients can resolve the Hostname to an IP Adress when they are 
> connected via VPN.

Isn't it exported in the HOSTNAME variable available on the up/down scripts?

regards,
Nikos





More information about the openconnect-devel mailing list