The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ossama on December 07, 2007, 09:12:00 AM

Title: internet connection IP address and LAN ip address
Post by: ossama on December 07, 2007, 09:12:00 AM
hello  :bg

i was navigating the web , and i have found a website that make me write this topic,
the site is:
http://ip-lookup.net/
this site can give you the ip address of the internet connection,which is assigned by your ISP,and your LAN address (if you are behind a router or you are connected via LAN)

my question is how it detects my LAN IP address? and what are the winsock functions to use to do this( i mean if i know the ip address of the internet connection of a LAN, how can i get the LAN ip addresses)?
i hope you understand my bad english   :bg
Title: Re: internet connection IP address and LAN ip address
Post by: ragdog on December 10, 2007, 05:07:01 PM
hi  :bg

you  can detects the IP address with eaxample php that can you see here

http://www.plus2net.com/php_tutorial/php_ip.php

and here is a masm example


greets
ragdog

[attachment deleted by admin]
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 05:24:06 PM
Ragdog !
you didnt understaand me,
my computer is a member in LAN, this LAN is connected to internet via a router,
the internet connection IP (of the router) is different from my IP address ,because my ip address is given by my router (and is 192.168.30.11 at this time) but the internet connection is given by our ISP (and it is at this time : 41.209.133.59.
if i go to anyu website that gives the ip address of my machine it gives the internet connection ip not my ip in the LAN.
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 05:35:40 PM
Ragdog,
if you are connected to internet via LAN or you are behind a router,please visit http://ip-lookup.net/ ,it will give you your internet ip address and your LAN ip address
Title: Re: internet connection IP address and LAN ip address
Post by: Mark Jones on December 10, 2007, 05:42:20 PM
Is this still for your "Internet Cafe?"
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 05:44:00 PM
Quote from: Mark Jones on December 10, 2007, 05:42:20 PM
Is this still for your "Internet Cafe?"
you are very Skeptical (if it is the right word)
Title: Re: internet connection IP address and LAN ip address
Post by: P1 on December 10, 2007, 05:58:33 PM
Quote from: ossama on December 10, 2007, 05:24:06 PMif i go to anyu website that gives the ip address of my machine it gives the internet connection ip not my ip in the LAN.
I am interested to know, what your reasons are that the information becomes significant enough to collect here?

I know the reasons I keep an internal IP map, but I am the Local Network Administrator.  As an web developer, what use is it to you?

Regards,  P1   :8)
Title: Re: internet connection IP address and LAN ip address
Post by: ragdog on December 10, 2007, 06:37:25 PM
@ossama

yes my pc is conected with lan and uses a router your link this detects my provider ip not my lan ip
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 06:52:56 PM
ragdog,
when you visit the website you get this:

Your current IP address :
WAN : 41.209.133.59 Neighborhood
LAN : get my LAN address »

click on the link "get my LAN address »"
it will detect your ip address of your pc in the LAN

when i clicked that link  i got this

Your current IP address :
WAN : 41.209.133.59 Neighborhood
LAN : 192.168.30.11
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 06:58:37 PM
Quote from: ragdog on December 10, 2007, 06:37:25 PM
@ossama

yes my pc is conected with lan and uses a router your link this detects my provider ip not my lan ip

ofcourse it will detect your internet connection ip address ,in fact any web site that you visit know your internet connection ip address which will be used to send you the page (or file) you are visiting, and it is the job of the router to give you that page (or file) and not other user in the LAN.
Title: Re: internet connection IP address and LAN ip address
Post by: Vortex on December 10, 2007, 07:31:39 PM
Quote from: ossama on December 10, 2007, 06:52:56 PM
LAN : get my LAN address »

click on the link "get my LAN address »"
it will detect your ip address of your pc in the LAN

Ossama,

Did you enable Java in Internet Explorer? The "get LAN address" feature can be abused in my opinion, you should be carefull with your Java and \ or ActiveX settings. It's the Java application installed on your system informing about your LAN address.

http://windowshelp.microsoft.com/Windows/en-US/Help/59c3a93d-1342-43a6-a01a-f720c7a17ffc1033.mspx
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 07:35:33 PM
vortex,
do you mean that the java/activex within the web site is givng my LAN ip address not thz web site it self?
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 07:38:11 PM
vortex, i have not instaled java on my machine,i have ms vm.
Title: Re: internet connection IP address and LAN ip address
Post by: Vortex on December 10, 2007, 07:52:56 PM
Quote from: ossama on December 10, 2007, 07:35:33 PM
vortex,
do you mean that the java/activex within the web site is givng my LAN ip address not thz web site it self?


No, it's the Java VM installed on the computer reporting your IP address. Logically, there must be an application on your system who informs the website.

MS VM stands for Microsoft Java Virtual Machine. Exactly, this is the tool sending your LAN ip address! :)
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 07:58:14 PM
QuoteNo, it's the Java VM installed on the computer reporting your IP address. Logically, there must be an application on your system who informs the website.

MS VM stands for Microsoft Virtual Java Machine. Exactly, this is the tool sending your LAN ip address!
vortex, are you sure,  so the ms vm can send other things to web sites on demand?
do you know a other thing that ms vm send?
Title: Re: internet connection IP address and LAN ip address
Post by: Vortex on December 10, 2007, 08:10:53 PM
Hitting the "get LAN address" link, a dialog box popups in my IE7 informing me that the page is using Java.

I don't think that there is a malicious intend here. I am not very familiar with the Java technology so I cannot tell you about the other features of Java VM.
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 08:14:26 PM
thank you vortex (and all who had help me) , when i first time wrote this topic, i was wondering how to get ip of pc on LAN, and i did not find any function of winsock to do that (i read the msdn) this is why i wrote here to get help.
Title: Re: internet connection IP address and LAN ip address
Post by: MichaelW on December 10, 2007, 08:16:49 PM
Quote from: ossama on December 07, 2007, 09:12:00 AM
my question is how it detects my LAN IP address? and what are the winsock functions to use to do this( i mean if i know the ip address of the internet connection of a LAN, how can i get the LAN ip addresses)?

Why do you need the LAN address, and what do you expect to do with it? People use routers with NAT firewalls and non-routable IP addresses to keep malicious people on the Internet from running around barefooted in their LAN. Without this technology it would be impossible to safely connect most LANs to the Internet.
Title: Re: internet connection IP address and LAN ip address
Post by: ossama on December 10, 2007, 08:24:56 PM
MichaelW,
this forum is for helping coders to solve problems in their programs with masm,
and they will ask various qusetion here,yes i am agree with you that some questions are suspicious (hacking,...)but in real it is used in other ereas other than illigal use,
so you when i asked for keyboard lock you said that it is for something illegal,but it can be used for many useful things like preventing children for using pc,....
please dont be suspicious like that MichaelW,if i want to do something illegal i wont come here at all, i am learning masm and make programs for my self and freinds,
thank you. :naughty:
Title: Re: internet connection IP address and LAN ip address
Post by: MichaelW on December 11, 2007, 01:43:41 AM
Your “it could be used in other areas…� is wimpy rationalization that can be applied to almost anything. You have had two opportunities to explain why you need the LAN IP address and what you expect to do with it, and you have not done so. You did not answer my question, just as you did not answer P1’s question, so I’m going to assume that “how can i get the LAN ip addresses� is the same as “how can I bypass a firewall�, and that your request is a violation of the forum rules. Topic locked, pending removal.