Disable multiple network connections, allow only one

We plan to create a security application that does the following on laptops:

  • If an ethernet adapter is used (connected to the cable), disconnect / block all other network connections (wireless WIFI, mobile broadband (PPP), virtual VPN adapters, etc.).
  • If the Ethernet adapter is not used again, all connections are allowed.

Does anyone have a good suggestion on how to do this?

We looked at WMI a lot, but there are no good ways to do this. Just disconnecting your network connection is not safe enough because most mobile broadband applications try to reconnect. This should be an application that works on all laptop manufacturers without any user interaction (for example, when choosing interfaces, etc.).

So any suggestions on how to do this would be highly appreciated.

+5
source share
3 answers

. , , WMI. ++, . NETCONLib Microsoft.

0

- . , , , . , - .

, , - . , , . codeproject.com, .

, , . monitor DBT_DEVICEARRIVAL , , .

. , , , . . .

, . , , . , , .

, , - API Windows. , IP.

0

, , ... route, . , , , .

0

All Articles