how to get mac address from ip address from client site in asp.net? - asp.net

i want to store details of visitor in site like
ip and mac address
i got ip address of client
but how can i get mca address of client ?

Simple answer: you can't. The MAC address is never transmitted. The best you can hope is to get the IP but remember that this IP could be the one of a proxy server situated anywhere in the world if the user configured some proxy to access the internet.

If your website has been compromised you will have to contact the authorities in order to attempt to catch the person who did it. In most countries regular citizens do not have the power or authority to request the type of information you need from ISPs.

Related

User can't see server

The user is reporting the issue has an IP address of 10.10.15.67/20. The server has an IP address of 10.10.16.1/20. The user's machine has an IP address of 10.10.25.197/20. Can anyone explain to me based on this why he can't get to the file? This users has full permissions.
The first IP address belongs to network 10.10.15. The other two, to 10.19.16.
Do the first machine not being in the same subnet cannot talk to the two others. Use ping to confirm that.
You can use the subnet calculator here: https://www.calculator.net/ip-subnet-calculator.html

using dedicated IP of VPS for your personal web server

Pretext: There is a ABC company providing Virtual Private Server for $xx, which includes features like blah1, blah2, blah3 and 1 dedicated IP address.
I have my home FiOS internet connection.
I have serverA, serverB, serverC running at my home.
Let's assume ServerA is a web server.
Scenario 1:
To access this web serve from outside my LAN, I would type "myDynamicIPAddress", we are assuming it still has the same lease token, and get access to my website successfully.
Scenario 2:
I am at my school/work(I work at a corporate office). I would type "myDynamicIPAddress" to access my web server. Since my IP address is dynamic/residential, it is blocked(All residential IP are blocked by default, to reduce the chance of them getting infected and sending out spams).
My question:
Is there any way to connect my home network to the VPS that I purchased(the one with dedicated IP, remember?), so that I can use that dedicated IP address to connect to my web server from my school/work where residential IP address are blocked(this also means no Dyndns.com/no-ip.com).
I hope I explained my question correctly and I posted it in the right section.
Thank You in advance.
EDIT1: I found this one question, but I want to do the exact opposite of what the user in this question is asking for.
https://superuser.com/questions/498529/is-it-possible-to-use-a-static-ip-assigned-by-my-isp-for-an-offsite-web-server-o
The answer is the same as the other question, for the same reasons. The IP address is routed to the owning network prefix so it can't be used at a different location without changing the Internet routing tables to point the overall prefix to route to a different place. Since you don't own the network prefix, you can't do that.

Obtaining MAC address

According to Obtain client MAC address in ASP.NET Application, it is not possible. I am not entirely convinced because whenever I connect to Tim Hortons WiFi, my MAC address is known.
Occasionally, the network is slow and I see this URL like this before being redirected to the Connect page:
http://timhortonswifi.com/cp/tdl3/index.asp
?cmd=login
&switchip=172.30.129.73
&mac=60:6c:66:17:1a:83
&ip=10.40.66.229
&essid=Tim%20Hortons%20WiFi
&apname=TDL-ON-NEP-02177-WAP1
&apgroup=02177
&url=http%3A%2F%2Fweather%2Egc%2Eca%2Fcity%2Fpages%2Fon-72_metric_e%2Ehtml
So according to this URL, the site knows the IP address of the router, my MAC address, the IP address assigned to my device by the router, the network SSID, some other pieces of information, and the URL I was trying to access prior to connecting.
There's two options: Tim Hortons WiFi Basic and Tim Hortons WiFi Plus, where the "Plus" option allows me to connect to any Tim Hortons WiFi access point in Canada automatically with this device. Registration requires an email address, so I'm assuming this is possible by checking the MAC address and storing it in a database that routers ping upon connection. More info here.
According to the extension of this page, I can safely assume it is ASP. How are they obtaining this information?
When your client traffic reaches the first router, that router will route the traffic to the adecuated port, changing the response MAC address with its own MAC address so the answer will be routed to it. And this will happen for each of the routers the packets travel by. So, at the end, the web server will only see the MAC address of the last router where the answer will be sent to be routed back to the previous roter, and this process repeated until the answer reaches the client.
No, there is not way to obtain the MAC address of client from server side.
But, what you are seeing is a client sending its information to a server. So, the answer can be converted into "how can i obtain my local mac address and send it to the server?".
Browsers do not allow to read this information. Some properly signed/configured ActiveX or Java applets can do it, but they can be blocked, or you can have some device that will not execute java nor activex, so it is not a reliable way of doing it.
In the case in your post, the easiest way of doing it is configuring the wifi access point dhcp or dns server to serve a proxy configuration file that will allow to configure a redirection to the desired web server, redirection that has been created inside the access point, which have all the shown information in your post.

Classic asp emails are going to spam instead of inbox

I have moved my classic asp websites from vps to dedicated server(windows server 2012). All the emails are going to spam instead of inbox(gmail and hotmail), emails are not at all receiving at yahoo. I have properly configured smtp on windows server.
Most receiving email servers are quite picky about where your email is sent from. They check your sending IP address and can choose to classify your email as spam or reject it all together unless all of the following things are true:
reverse-DNS for you IP address should give a proper name (and not look like a dynamic or dial-up address)
the reverse-DNS should again forward resolve to the same IP address
your IP address must not be on any blocklist or have a bad reputation. The problem here is that there are may different blocklists and you do not necessarily know what lists they check. You could test your IP address at http://multirbl.valli.org and see if there are any known issues
the domain-name of your sender email address can have SPF policies published in DNS that explicitly tells the world what IP addresses are allowed to send emails for that domain, and if your IP address is not included you are considered a fake sender
And there can be any number of other anti-spam/forgery checks in place that cause trouble for you. The best bet would be for you to relay your outgoing emails via an official mail server (for the domain your are trying to send from), as that already has the above things covered, but that usually requires some authentication mechanism or other agreement with the real mail server you want to use.
All these checks by the receiving end are there to stop spam and other unwanted emails. In order to not be classified as a spammer, you cannot just set up a random server at a random address and start sending emails from a random email address (or email address that normally are sent from some more official email server).

Can I track Activities , if i know the IP?

Say if i have the IP of a user x.x.x.x , then using the IP can i track all the activities that the user is doing ? How can i do this ?
how can i check which web pages is the user opening or something similar
please guide
No, you cannot. Traffic is point-to-point and knowing the address of a point is not enough to know the traffic going to/from that point. It's like asking if you can read someones (snail) mail just because you know their house address.
In order to "snoop" that fully, you need to be in the middle where all traffic passes through your node (liking having the postman give you the mail and then you giving it to the owner of the house).
If you have a machine, the traffic from the user is reaching it (e.g. you're connected to the same switch) then probably yes. The most trivial way is using network sniffer (Wireshark for windows, tcpdump for Linux).
However if the used surf SSL secured site (a.k.a https) than you will see only encrypted content
Geolocation is not accurate because the primary source for IP address data is the Regional Internet Registries. They do not hold a database for information about individual IP addresses, but information about ranges of IP addresses that have been assigned to certain organizations. Such an organization has free reign over the IP addresses they get and they do not need to give location information to the RIRs. In other words, only your ISP knows your exact location. If you want to find the location of a user you will have to ask your ISP, and they will most probably deny your request.
You can't sniff packets sent from someone, unless you are part of the same subnet - you would have to be connected to the same switch and be on the same Virtual LAN as that user. Even if you somehow find the physical location of a user and connect to the same switch, the ISP has most likely sat up port security, which would deny access to your MAC address.
In conclusion, unless you are already connected to the same switch, you can't track that user's activities.
If you are connected to the same switch, you can install one of the popular packet sniffer utilities such as Wireshark and set it to promiscuous mode.

Resources