Post-auth programming. GET fqdn or full hostname from client.

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
Grg123
OpenVpn Newbie
Posts: 1
Joined: Tue Oct 31, 2023 4:53 pm

Post-auth programming. GET fqdn or full hostname from client.

Post by Grg123 » Tue Oct 31, 2023 4:59 pm

Good afternoon.
I'm using latest version of the server OpenVPN AC.
I read the documentation on the official website.
Tell me, is it possible to some how get hostname of the client for Windows or Linux witch Post-auth programming?
Is this feature available?

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Post-auth programming. GET fqdn or full hostname from client.

Post by openvpn_inc » Tue Oct 31, 2023 6:07 pm

Hello Grg123,

What you can do in the post_auth script is get the public IP address of however this client contacted your VPN server to establish the VPN tunnel. You can then do a reverse lookup on that to get the public hostname of that public IP.

But no, you can't get the local hostname in post_auth. That information is not transmitted.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply