internal and external IP's

Results 1 to 3 of 3

Thread: internal and external IP's

  1. #1
    Join Date
    Dec 1969

    Default internal and external IP's

    Do you know how to detect whether a site user has accessed your site from an external ip / resolved address e.g. or whether they have access it from the intranet e.g.<BR><BR>This is an issue for me as links that I send for pages to be signed off internally don&#039;t reflect the site layout as they are on the network and the pages are set up for external use.<BR><BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default You'd have to get the subnet...

    ...mask and IP of the server to see whether an IP is on the same network or not. However, in a large business you may have several subnets all belonging to the same logical "intranet", and then you won&#039;t be able to say what is on the intranet and what isn&#039;t. You may have to hardcode the IP address ranges and compare them with the client&#039;s IP address to see what&#039;s going on.<BR><BR>Anyway, what are you trying to do? Why do you need the IP address? Won&#039;t Windows authentication do the trick?<BR><BR>Oliver.

  3. #3
    Join Date
    Dec 1969

    Default RE: internal and external IP's

    Why not just use Request.ServerVariables("REMOTE_ADDR") to get the ip address and then parse the address to find out if it&#039;s non-routable IE, 10.X.X.X or 192.168.X.X ? Could probably just use split to break the address into individual numbers and look at the first and second digits. <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts