0

On my windows wifi devices I am able to add wireless network filters to disable connectivity to unwanted signals.

First I whitelist any networks I deem secure using the following command:

netsh wlan add filter permission=allow ssid=myNetworkName networktype=infrastructure 

Then I blacklist all the others using:

netsh wlan add filter permission=denyall networktype=infrastructure

I recently got a MacBook Air and now I want to do the same thing with it. What are the terminal equivalents of these cmd commands?

Thanks in advance!

Edit:

This question is not a duplicate. It's alright if you don't have the answer, but don't mark it resolved just for the sake of it. Leave it up in case someone else knows the answer.

First of all, that script fails to connect most of the time. Secondly, I need a way to stop non-administrators from connecting to ALL networks other than the ones I've white-listed. That solution has you list the 'bannedList' of networks one by one. And it doesn't mention how to force non-admins to connect through the script rather than just using the regular WiFi list or network preferences.

I refuse to believe there is no solution to such a trivial network security question. Especially since it was so easy on Windows.

6
  • This is not a trivial question. Your assumption that 'because it was so easy on Windows [...]' does not follow. macOS is a different OS, so expect different behaviour. It's designed with simplicity in mind, and that often means things are removed, in order to not clutter the user experience. Now, underneath it is a UNIX operating system, so the sky's the limit if you want to do some kernel hacking. Head over to unix.stackexchange.com and try your question there, you may have better luck. But, no, what you're asking for has been asked before and is not as easy as you'd like. – Harv Dec 19 '17 at 22:12
  • And as far as I know, the actual answer to your actual question is "there aren't any". Unless someone made a tool that does it by modifying the SSID list on-the-fly as your system discovers them and before they're presented in the WiFi menu -- which would mean it's running at a layer not easily accessible by a user on the system. That's pretty deep in the kernel, and I don't think you're going to get there quickly or easily. Best of luck. – Harv Dec 19 '17 at 22:17
  • Well, alright then. I appreciate your time and dedication to this community. I'll try my luck in unix.stackexchange.com. – V. Poghosyan Dec 20 '17 at 1:00
  • Additional dupe answer you may wish to consider: apple.stackexchange.com/a/302081/119271 – Allan Dec 20 '17 at 2:10
  • 1
    Oh no! I know you didn't mean it like that. It's all good. I think I was too set in my Windows ways to consider alternative approaches to my particular problem. The post Allan linked to did it for me. All I had to do was disallow changing networks without administrator privileges. Turns out it's much simpler in Mac than Windows! Thanks! – V. Poghosyan Dec 22 '17 at 0:10
-1

If it's running High Sierra you can turn off auto-join in the system preferences > network > airport panel.

EDIT: question was unclear. Here's another answer that might be better for the question-asker.

You can create a 'Profile' to install on the system.

  1. Buy Server.app on the App Store.
  2. Learn about Profiles and how they work.
  3. Create a profile with a restirction that prevents the user from accessing the 'network' control panel.
  4. Make sure the WiFi network(s) it's OK to connect to are already set up - the credentials will be stored in the System keychain, so all users will be able to access them. If the administrator has connected to networks that other users shouldn't - you'll need to 'forget' those networks or move them from the system keychain to a user one.
  5. Install the profile in the users' account, and make sure to disable the WiFi menu while you're at it, so the only way to change networks - other than the command-line if they figure out how - is through the Network control panel, which is now disabled.
6
  • Not auto join, I need a way to permanently remove the networks from appearing on the wifi list. But thanks, that's definitely a start. – V. Poghosyan Dec 18 '17 at 8:13
  • Oh, then I doubt you can do that. Why do you want to have them not show up on the list? – Harv Dec 18 '17 at 8:54
  • The reason is that I'd like whoever uses this laptop to connect only to networks I've hooked up to Open DNS.All the other networks should be inaccessible to them.Of course, as the administrator I can change this myself any time. I'm able to do this on Windows as explained above, I'm sure there must be some way for Mac. – V. Poghosyan Dec 18 '17 at 9:25
  • I would use parental controls then. Create them a managed account and don't allow them to change system settings. Set the wifi network up under your account and it'll still work on theirs. – Harv Dec 18 '17 at 17:08
  • I tried that but there seems to be no way to disable their access to the WiFi list through the parental controls. If you know the exact steps, I'd appreciate it if you could let me know. – V. Poghosyan Dec 18 '17 at 21:53

Not the answer you're looking for? Browse other questions tagged .