IOS – How to get OSX to appear as a wifi router without sharing internet

iosNetworkrouterwifi

I want to use my Mac as a wifi-router on a private network (no internet access). I want users to be able to connect to the network by selecting the SSID on their iOS devices.

Is there a way to do this from the command line? I can select "Create Network…" from the networking menu but that has 2 problems.

  1. The created network shows up under a special section "devices" on iOS. I want it to appear in the normal list of wifi hotspots. How do I do this? I'm assuming maybe I can do it manually I can set whatever needs to be set so iOS can't tell the difference between my mac and a normal router

  2. When selecting it in iOS is says it's not connected to the internet. I want to avoid that message. I get that I'm not actually letting them connect to the internet. The question is, how and I fool iOS into thinking it is connected to the internet. I have a feeling this is related to #1 because how does iOS know there's no internet when it hasn't actually connected to the network yet (I haven't selected it).

Note: any pointers into apple docs would be great as well. I've even tried looking at how something similar would be done in Linux in the hopes that it might lead to ideas about OSX but my Google foo is weak for this topic.

Best Answer

What you are trying to do is indeed possible, but it requieres a lot of work to get it working.

I thought about that for a while and it is a great Idea to use a mac as Wifi-Router, especially in Virtual-Test-Environments. But Mac OS X does not work like that.
The reason for that is, that Mac OS X only starts the service, if you really have Internet connection. Why would you share your internet, if there is no internet. Simple as that. Simple as a Mac ;D

But you can work around this by setting up virtual Network Interfaces, that would simulate internet.
There is a nice discussion about Virtual network interfaces on Stack Overflow, meantoning your problem in a comment :

https://stackoverflow.com/questions/87442/virtual-network-interface-in-mac-os-x

(especially the long post by "bmasterswizzle" with the comment : "I've tested it and yes, it does. I was able to share my OpenVPN tun0 device (from my Ethernet connection) over my WiFi using this method. ")

You get this problem often with Virtual Machines, because there OS X also shares ethernet via the NAT-Bridge, but in fact does not need to have Internet Access to make it work.

It is a bit of an efford and I think you could easily go around it, if you have a script that fakes the Internet Traffic on En0 so you can share the En0 to the Wifi-Adapter. But I have no clue how to talk to the en0 interface via command line and faking traffic.

And as long as there is no traffic, your Mac won't share the Connection.