I have a local intranet that will not require an extensive logon, but if you are accessing it via the internet, it will require a more though logon proceder as per my bosses request. The Intranet server also has a direct connection to the internet so the box has a public and private IP. Which makes matters worse is that it is also a NAT box with DNS and DHCP in it for the local intranet. The intranet hosted via an Apache server on this box.
I know how to get IP's but i need to know how to determine if the range is on the local network, or accross the web.
For instance: Say the range of my LAN is 192.168.0/24 ...
There is also a internet ip of 192.168.0.1 which would have reduced security on it.
What would be an abstract way of telling these two apart?
I was considering getting the remote MAC addresses and storing them in a database that would be cross referenced with the users IP, but that would require setting up another machine maybe to run the script, and would require manual intervention every setup.
Is there a way to force perl to look at the NIC it is using to talk to the client? I am sure this has been done somewhere in cpan, just having problems with the best approach to solve the problem.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.