Web App Get Mac Address

Hi,

Im using a web app to pick up the remote users IP address when they log on to my website with the following code:-

set ws-UserHostIP  to self::Request::UserHostAddress

But how can I find out what their PC MAC address is?

I want to do this so I can introduce a level of security where I only allow certain addresses to do certain things.

Many thanks in advance for any help on this matter

Kind regards

Neil.

Parents
  • You can't.

    If the client system is on a local network segment, you could in theory get its MAC address by inspecting your system's ARP cache, or making your own ARP request. That's not trivial.

    If the client system is not on a local network segment - that is, if there are any routers between your system and the client system - then the MAC address is not available to you. A MAC address is only meaningful on a network segment; when an IP packet is forwarded by a router, the MAC address of the originating system is not included. (In fact, the MAC address isn't in the IP packet at all, except under certain unusual circumstances that don't apply to normal traffic.)

    With IPv6, IP addresses typically include the MAC address, but they aren't guaranteed to. And most people are still using IPv4.

Reply
  • You can't.

    If the client system is on a local network segment, you could in theory get its MAC address by inspecting your system's ARP cache, or making your own ARP request. That's not trivial.

    If the client system is not on a local network segment - that is, if there are any routers between your system and the client system - then the MAC address is not available to you. A MAC address is only meaningful on a network segment; when an IP packet is forwarded by a router, the MAC address of the originating system is not included. (In fact, the MAC address isn't in the IP packet at all, except under certain unusual circumstances that don't apply to normal traffic.)

    With IPv6, IP addresses typically include the MAC address, but they aren't guaranteed to. And most people are still using IPv4.

Children
No Data