Can't be done using perl. The best you can do is look at the IPs.
I suggest creating a whitelist of all the "trusted" IPs as a bunch of CIDR blocks (using Net::CIDR as someone else suggested), then checking connections against that.
In reply to Re^3: Discriminating between local and remote IP's
by DrHyde
in thread Discriminating between local and remote IP's
by Avitar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |