0

We have several computers running Microsoft Edge (no option to change the browser).

We have a central web server with pages created for each individual computer. I want users of these computers to be able to enter a single URL and be redirected to the specific page for that computer. So if I enter www.foo.com on computer A, I want to be redirected to the page www.foo.com/A.

In the past there seems to have been a way to do this by getting the private IP via WebRTC in Chrome and Firefox: Can You Get A Users Local LAN IP Address Via JavaScript?

That would also work in our case, but from what I read it is no longer possible in most browsers and has never been possible with Edge, and it indeed does not work when I try it.

We could theoretically run a service on each computer that we can fetch the ip from but that is not an option for many practical reasons.

But it doesn't need to be the IP, any unique identifier would do. Is there ANY way of generating an id that would be unique to each computer and also predictable in the backend?

  • Are these pages accessed without any authentication? – Sam Feb 27 '22 at 11:44
  • Sounds like a managed environment; can't you put some cookies with a unique id on those machines with some deploy script? – deceze Feb 27 '22 at 11:50
  • @Sam Yes the pages are accessed without any authentication. – Wolfgang Jagomir Feb 27 '22 at 11:58
  • @deceze Any way to do that in the browser application without physically going to the machine? – Wolfgang Jagomir Feb 27 '22 at 12:02
  • Again, if you’re in some sort of managed environment (intranet, AD login, remote software deployment etc), this shouldn’t be too hard to realize; the details just depend on your deployment methods. If the machines are not managed, well, that’ll be harder… – deceze Feb 27 '22 at 12:17
  • @deceze Thanks, it is a managed environment so it should be doable. During deployment we could generate a cookie or a localStorage variable with the unique id in Edge. – Wolfgang Jagomir Feb 28 '22 at 07:37
  • Just as you say, you can check the unique cookie or localStorage the next time the user opens the page. This is a workaround. But this is not guaranteed to work. For example, if the user opens the browser in private mode, the cookie and localStorage will not persist. – Yu Zhou Feb 28 '22 at 08:02

1 Answers1

0

It's possible to identify computer through MacAddress and there was a way to get mac address in old versions of IE(through ActiveX, you can find solutions), but now it's not possible and there is a reason for that - security.

I think, you should place this logic about redirecting to the server, e.g. for nginx you can add list of rules where you can tell, where every mac address should go.

Slawa Eremin
  • 5,264
  • 18
  • 28