7

I am trying to do OSX's internet sharing from the command line and there doesn't seem to be a command for it, so I'm trying to do it manually by turning the network card to access point mode. I can't seem to find anything about how to turn the wireless card into AP mode on the mac. Linux would use iwconfig (which OSX doesn't have) and I've monitored the files that network sharing opens, but no dice so far.

It looks related to wifid, but the documentation for wifid only says "Don't invoke wifid directly". Also played with the airportd command, but it doesn't seem to let the card go into AP mode. There must be a way to do it, since internet sharing creates an access point.

TL;DR:Does anyone know how to turn on Internet Sharing from the command line?

syzygy
  • 1,256
  • 2
  • 14
  • 26
  • If you downvote, please explain why in the comments. – syzygy Aug 12 '15 at 23:26
  • 1
    The way in which it used to be done doesn't appear to work anymore... – l'L'l Aug 13 '15 at 01:19
  • Well, thanks for looking anyway :( – syzygy Aug 13 '15 at 01:27
  • You might get a better response on http://superuser.com/ http://serverfault.com/ or http://networkengineering.stackexchange.com/ – Matt Luongo Aug 13 '15 at 01:47
  • @SnakeCharmer: There is a way to toggle the InternetSharing preference on/off then turn Wi-Fi on/off, and load/unload the daemon, although it seems a bit dicey in the way it works (or doesn't). – l'L'l Aug 13 '15 at 02:13
  • That's interesting, could you give the commands you found? – syzygy Aug 13 '15 at 07:34
  • I don't know how to do what you're asking as I'm not much of a OSX guy. However, in a roundabout way that could get you much more functionality in addition to completing what you're trying to accomplish, you could build [aircrack-ng](http://www.aircrack-ng.org/) from source. The suite has plenty of tools to manipulate your wireless card, if it's supported. – tniles Jan 20 '16 at 01:06

0 Answers0