Takamoto has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks
For a desktop application of mine, I need to read the hostdomain of the net where the application is running. I do this with
use Net::Domain qw(hostdomain hostfqdn); my $hostfqdn = hostfqdn; print "FQDN : $hostfqdn \n"; my $hostdomain = hostdomain; print "DOMAIN: $hostdomain \n";
This works fine for most of my scenarios, but when the user is connected to an (enterprise) VPN. In this base 'hostdomain' returns empty. Is there a way to get a similar response 'as if' the computer was in the physical net? What I am trying to achieve is to determine in which company the tool is run to enable certain functions, and I need to do it so not only when the tool is run in a computer which is physically in the company (working fine), but because of many users working from home nowadays also on a computer connected by VPN to that company.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read hostdomain over VPN
by pryrt (Abbot) on Nov 16, 2020 at 15:18 UTC | |
by Takamoto (Monk) on Nov 16, 2020 at 15:41 UTC | |
|
Re: Read hostdomain over VPN
by Bod (Parson) on Nov 16, 2020 at 18:27 UTC | |
by Takamoto (Monk) on Nov 16, 2020 at 19:08 UTC | |
by marto (Cardinal) on Nov 16, 2020 at 19:26 UTC | |
by Bod (Parson) on Nov 16, 2020 at 20:58 UTC | |
|
Re: Read hostdomain over VPN
by jszinger (Scribe) on Nov 16, 2020 at 21:42 UTC | |
|
Re: Read hostdomain over VPN
by Takamoto (Monk) on Nov 16, 2020 at 20:59 UTC |