开发者

Generic way to know whether a laptop is located in the office or not?

开发者 https://www.devze.com 2023-02-12 23:08 出处:网络
I develop software running laptops from various companies. The employees are allowed to bring these laptops home or on holidays. I want to be able to reliably detect whether the laptops are in the off

I develop software running laptops from various companies. The employees are allowed to bring these laptops home or on holidays. I want to be able to reliably detect whether the laptops are in the office or not. The laptops are connected to the company network via some kind of VPN (though various solutions are used), so I cannot say that if they can access internet, they are in the office. 开发者_Go百科To make this question even more interesting, please notice that a company might have multiple locations.

Edit: I need to detect this on the laptop.


Speculation: One thing you could look at are the IP addresses allocated to the machine. If you run a VPN then at home then there is probably one IP for the Internet connection and one for the VPN.


I think the answer from Rob is close but maybe you should take into account the gateway used by the NIC.

And if you have time enough a tracert to a known server in your office.

That will give you the route and the intermediate NIC's between the laptop and the known server.

You only have to make sure in that case that on the office location the route to the VPN concentrator is different but that should be possible with a clever dns/dhcp setup.

You might try a more specific question on serverfault.com


This cannot be done reliably, because branch offices can be setup up the same as a home network. And from experience, I'm not saying "almost the same as a home network". I mean literally the same, with non-clued managers buying network equipment from the cheapest local shop, and running copies of Windows XP HOME.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号