Getting the MAC Address, ISP IP, Client IP of the user and verifying it to let the Login

Hi Everyone,

Any help for getting the IP address of the client, its MAC address and its ISP IP so that after checking these he will be let into login.

Regards

Sadeed


Remember to click “Mark as Answer” on the post If you get answer from this post(s) !

Thanks Guys

Regards

Sid
0
sadeed
3/3/2009 8:30:29 AM
asp.net.security 27051 articles. 1 followers. Follow

12 Replies
1180 Views

Similar Articles

[PageSpeed] 40

 Is this over the LAN or over the internet?

Over the internet, you can only get the apparent IP address of the user (which may be the address of the external router).

As to getting the IP of the ISP, then closest might be do a traceroute and take the last but IP address.


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
3/4/2009 10:02:45 PM

Thanks for the reply.............

I needed to get the MAC address of the client that is connected to the web application.............

Also the IP Address of the client and both of these are required over the internet..........

Regards

Sadeed

 


Remember to click “Mark as Answer” on the post If you get answer from this post(s) !

Thanks Guys

Regards

Sid
0
sadeed
3/5/2009 9:25:04 AM

Hi,

You can use the following...

HttpContext.Current.Server.MachineName;//To get Machine Name

HttpContext.Current.Request.UserHostAddress;// To Get IP Address  

 

 


Read My Blogs
0
sunilyadav165
3/5/2009 9:38:22 AM

 >I needed to get the MAC address of the client that is connected to the web application

Without running a script at the client end, you cannot get the MAC address over the internet. Also the results of such a script could probably be spoofed by a hacker.

The Apparent IP address can be got from the request object but may only be the IP address of the external router.


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
3/5/2009 9:52:33 AM

Any solution if we want to check connecting users against any fixed MAC Addresses..........I mean to say that if we want to check the incoming users for already saved MAC addreses in the database then is there a way out to this.........

 


Remember to click “Mark as Answer” on the post If you get answer from this post(s) !

Thanks Guys

Regards

Sid
0
sadeed
3/5/2009 10:01:19 AM

 The only way I am aware of getting the MAC Address reliably over the internet, would be to write a small winforms program for the user to download and run. At this point you are looking at providing a web service rather than a web site with an intelligent client front-end.


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
3/5/2009 11:23:43 AM

Any example.......will be appreciated


Remember to click “Mark as Answer” on the post If you get answer from this post(s) !

Thanks Guys

Regards

Sid
0
sadeed
3/5/2009 11:57:39 AM

 >Any example.......will be appreciated

    lblMessage.Text = "Welcome " + Request.UserHostAddress;

returned the address of the user as in 

Welcome 127.0.0.1


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
3/5/2009 12:29:49 PM

Any thing regarding the MAC over the internet


Remember to click “Mark as Answer” on the post If you get answer from this post(s) !

Thanks Guys

Regards

Sid
0
sadeed
3/5/2009 12:34:10 PM

sadeed:
Any thing regarding the MAC over the internet
 

You need to go down the Smart Client route to be able to do this.

Have a look at:

I suggest that you show the latter to whoever is specifying reading the MAC Address - it can be spoofed! A better alternative (again only for a Smart Client) is to read the hard disk serial number see http://www.codeproject.com/KB/system/change_drive_sn.aspx, however this also can be spoofed.

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
3/5/2009 1:02:51 PM

Hi,

Get user's ip address:

string userIpAddress=Request.UserHostAddress;


Andrew Zhu
Microsoft online ASP.NET support
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
0
Andrew
3/6/2009 3:01:56 AM

sadeed:

Hi Everyone,

Any help for getting the IP address of the client, its MAC address and its ISP IP so that after checking these he will be let into login.

Regards

Sadeed

you can refer here

http://forums.asp.net/p/1360555/2807643.aspx#2807643


MAKMark as Answer if this reply helps you
MVP ASP/ASP.Net
MVP ASP/ASP.Net
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
0
mudassarkhan
3/6/2009 6:56:04 AM
Reply:

Similar Artilces:

Get IP address and MAC address
Hi there! How can get ip address and mac address from command shell without root attributes(I can't use 'ifconfig'). Thank you in advance. -- [Adri�n C�rdoba] ------------------------------------------------------------------------ aecordoba wrote: > Hi there! > How can get ip address and mac address from command shell without root > attributes(I can't use 'ifconfig'). > Thank you in advance. > > /sbin/ifconfig -- Vahis aecordoba wrote: > Hi there! > How can get ip address and mac address from command shell wi...

How to get MAC address & IP address?
Dear all how to get the MAC address & IP address using PowerBuilder 6.5? thanks! Michael On Wed, 16 Jan 2002 22:42:51 +0800, "Michael" <michaell@hknet.com> wrote: >Dear all > > how to get the MAC address & IP address using PowerBuilder 6.5? > thanks! > >Michael > For IP address see http://eric.aling.tripod.com/PB/tips/pbtip14.htm -- Boris Gasin [TeamSybase] mailto:bgasin@dynamictechgroup.com Close to NJ? Join the NJ Sybase Tools User Group http://www.njpbug.org/njpbug/join/join.asp On Wed, ...

How to get user name or user ip address?
Hi to all! I have written a little survey application for our intranet. In order to prevent users from taking the survey a second (3rd, 4th, 5th...) time, the app should detect the user name, or the ip address of the session. Does someone know how to manage this with WebMatrix? Thanks! Bye, MichaelTo finish first, you first have to finish. Sure, you can use the Request object. Request.UserHostAddressStanley Tan theSpoke Blog Stanley, thanks! I searched the MSDN library. I found this article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/h...

Get client IP address [Not Host] in C# .NET web services
I create one web service using c# .net and in this web service I want to get an IP address for client. I check thousend of article but that is not working, let me give you one example System.Web.HttpContext.Current.Request.UserHostAddress; System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; This is gives me IP but that my server ip where I put my web service but I want to get my client IP address. Can someone help me with this.http://www.codegroups.com/blog/ You can try: string ip; ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR"); i...

POA shows old ip address for client/server ip address
i just upgraded groupwise from 5.5 to 6.5 Clients cannot access via tcp/ip even though its setup with the correct ip address in console one. when looking at the poa log file at the server, it gives the old server ip address instead of the current ip address. I cannot find that old ip address in any settings, or is there another problem that is keeping me from accessing via the client using tcp/ip. Hi, Have you checked the POA startup file? Settings in there for the ipaddress and port override anything put into consoleone. Cheers, Steve <bfish@emily.ne...

How to get private ip address (intranet IP)
I found some webs at thailand taht can trace both the internet ip and the private ip address, (if user using intranet), of user who are interacting with web site. For Asp.NET . Are there some way to get a private ip address of user ? The link to web site that can traces private ip address http://www.pantip.com/tech/developer/topic/DN1701518/DN1701518.html ...

How to Get Client IP Address
I ahve use this code Dim strClientIP As String strClientIP = Request.UserHostAddress() Response.Write(strClientIP) This code return 127.0.0.1 Can You Tell me How to Get currect Client IP Address Thanx That is the correct API. But, if you are testing it by issuing requests from your local machine, you are going to get 127.0.0.1 because that is the address your http client is bound on when making a request to localhost. However, if you go on someone elses machine and make a request, you should see their ip address or the address of the NAT device b...

Get ip address of client?
Is it possible to get the IP Address of the client connecting to ASA? Just to a little security (to create an event to disconnect users accessing from other machines). Thanks. On Mon, 20 Jan 2003 16:49:37 +0800, jcnv wrote: > > Is it possible to get the IP Address of the client connecting to ASA? > Just to a little security (to create an event to disconnect users > accessing from other machines). Thanks. Hi, to get the ip of the current connection try select connection_property('nodeaddress') to get the ip of every connection use call sa_conn_...

Getting the IP address of a user
Is there an easy way to get a user's IP address if you know their username, either by a Novell tool or by the NDK/API? cogito.ergo.cogito@gmail.com wrote: > Is there an easy way to get a user's IP address if you know their > username, either by a Novell tool or by the NDK/API? Assuming they are logged into the server using IP nlist user=username /a/b -- -andy ...

Get users IP address
I need to modify the Send Thoughts module so that I will get the users public IP address. Can someone please provide some light on how I might accomplish this? You may be able accomplish what you want using the Request.Servervariables("REMOTE_ADDR") header. These may help:http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=577http://www.w3schools.com/asp/coll_servervariables.asp This link will be usefulhttp://www.vikramlakhotia.com/Post.aspx?postID=12Vikram www.vikramlakhotia.comPlease mark the answer if it helped you HttpContext.Current.Request.UserHostAddress; or...

get client ip address
hi friends       I am working with webapplication i encountered a problem in my applicaton,problem is i host my application in iis,when the user access my application  in remote i have to get that remote system ip address and store it in my database. Is it possible if so please give me the solution   with regards venkatvenkat Hi, Refer the below thread it contains the same . http://forums.asp.net/t/1388585.aspx   Best Regardslife is name of learning!Mark as an answer if it helps VB.NET:     Dim ipA...

how to get the ip address of the user?
Now I want to save the user's informaion such as the ipaddress,the login time and so on,how to do?and how to show the online user list on the page? thanks for reply! request the ip address of the user Request.ServerVariables["REMOTE_ADDR"].ToString().Trim()-- Tough People Do Tough Task -- ...

How do I get client IP address?
Hi all, I have a menu control created using JavaScript. The requirement is to have different menus for different IP range. For that reason, I need to get the IP address of the client machine. The script that I have written works just fine for Firefox and Opera. But, it doesn't work with Safari and most importantly IE. JavaScript: hn = java.net.InetAddress.getLocalHost().getHostName(); ha = java.net.InetAddress.getLocalHost().getHostAddress(); document.write('HostName: '+ hn + '<br>' + 'HostAddress: '+ ha );   Pls help... Girish.P...

Getting the users IP address
Ok here goes, I’m really new to ASP.net and just trying to get my head round all the objects and classes etc so please bear with me. I am trying to find out what IP address the user is from, to do this I’m using the class and then calling the variable from my page, when I type the following in the class it doesn’t have any problems but when I run the page it says  “Request is not available in this context” any ideas or can any one think of a better solution?  Public Class _Default    Inherits System.Web.UI.Page      Protected var_si...

Getting Client IP Address
hi In my  Application(It is a asp.net  web Application) trying to get the Client IP Address. the application is running in my local machine. When i am using the following code, i am getting the server IP Address. This code is running on the remote server. Dim localhost As StringDim IpHostEntry As IpHostEntry Dim IpAddress As IpAddress() Try localhost = Dns.GetHostName() IpHostEntry = Dns.GetHostByName(localhost) IpAddress = IpHostEntry.AddressList() Return IpAddress(0).ToString   when i am using this "Request.UserHostAddress()" with in my loca...

How to get client IP address
I would like to log the IP addresses of (the proxy servers of) people who access my web site. Can someone please show a usable piece of c# code that demonstrates how get an IP address from a client?  I think GetRemoteAddress may have something to do with it.  .NET help says the return value is the clients IP address.  Unfortuantely the help doesnt bother with such details as how to actually effect usage of said function. Thanks, Sam There are a couple of ways.   I think this is easiest:   Request.UserHostAddress()It's all over and I'm...

Getting information from user IP address
Hello,   I am collecting information from visitors (clients) that arrives to my website. Now I get the IP address, but I also want to get the ‘owner’ of the IP (usually  a service provider) using a WHOIS utility and also run a reverse DNS which can provide a domain name associated with the IP. Somebody knows how can I get both data (‘Owner’ of the IP and domain name associated)?   I want these data to store them in the database for each visitor that arrives to my website. Is this a normal practice?   Thanks in advanceCèsar HeyIt's much easier just to purchase the...

Get MAC Address and IP number
Hi All, Can we obtain de MAC Address and the IP number of the local machine use Indy Components? I want to get this information without using exclusive Windows functions. My problem is how to obtain this information on Mac OS X and iOS systems. Thanks. <romulo nascimento> wrote in message news:415847@forums.embarcadero.com... > Can we obtain de MAC Address and the IP number > of the local machine use Indy Components? MAC, no. MACs are not exposed in socket APIs. IP(s), yes. Use the LocalAddress and/or LocalAddresses properties, or the AddLocalAddressesToList()...

Get Isp assigned IP Address
I have been looking all over for a way to acquire the isp's assigned ip address.  Example: 68.4x.xx.xxx, not 192.168.xx.xxx I know you can get it like whatismyip.com by using this in your client side.  <%= Request.ServerVariables["REMOTE_ADDR"]%> Is there a way to get it in your code behind?  There must be a way to do it I have seen sites that email the IP when you change the password so you know who it is changing your password.  Has anyone done anything like this before and what are some of the best practices?   BC  Rem...

Getting Client IP Address #2
I'm getting the client IP address to determine whether the client is on our corporate network, and changing the content accordingly.  This is better in this case than having separate internet and intranet sites.  It works fine on dev and test, but on the production server the IP address comes through as 172.16.4.8 when the client is on our network.  I assumed at first that that was the proxy server, but now I see that everyone is set to bypass the proxy when the site is one of ours, and I learned that that address is in the reserved private address space.  This explai...

Getting MAC and TCP/IP addresses
Hi, Does anyone know how to determine the MAC address of an installed network interface card from within PowerBuilder? How about the current TCP/IP address? I think there are API calls for these items, but I can not seem to find them anywhere. Thanks for the help! Chris Street ctstreet@hydro.mb.ca In article <36EED522.65341440@hydro.mb.ca>, ctstreet@hydro.mb.ca says... > Hi, > > Does anyone know how to determine the MAC address of an installed > network interface card from within PowerBuilder? How about the current > TCP/IP address? > >...

Get MAC Address and IP number
Hi, All of us know how to get the MAC Address and IP number using Windows functions, because we have a lot of examples on internet. But now in Mac platform, how we can get this information too? Thanks in advance. Ralph Wesseling wrote: >> {quote:title=romulo nascimento wrote:}{quote} >> Hi, >> >> All of us know how to get the MAC Address and IP number using >> Windows functions, because we have a lot of examples on internet. >> But now in Mac platform, how we can get this information too? >> >> Thanks in advance. > > ...

Problem in getting client ip address
i  have a simple website working on internt server  , i want to get ip address for each visitor after searching on internet  i found the following code   Dim ip As String ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If ip = String.Empty Then ip = Request.ServerVariables("REMOTE_ADDR") End If Label1.Text = ip.ToString   but there is a problem , when clients are connected from the same ADSL Modem it gives me the same ip address to  all of them how can i distinguish the ip ad...

Get client Country and his ISP from his IP
Hi all,Can any one know how to know the country and the ISP of an ip ? I get user ip throught: Request.UserHostAddress;in simply way Best regards, My first post in months due to MS Server 2003 comitments lol. hmmmm. I think you can use something like NeoTrace to find a host. But the majority of the time it traces back to the ISP who leases the IP via DHCP. How this can be done in .net I do not know. MCAD.Net vb.net there is no certain way... an IP is the ISPs, not the clients so they may be seperated. You could do a whois and parse the info on the domain, but I think you will f...