How to host Etherpad (node.js) AND create a closed Wifi network from the same Mac

airportdnsNetworkwebserverwifi

I have a successfully running Etherpad install running on my Mac, and when clients on my network connect to my node.js server through the IP address assigned by my router, all is well.

But I'm going to take this Mac offsite to a location which might not have Internet access, so I'd like to create a closed local Wifi network, allowing clients to connect to this same Mac running the server.

But without an active router connection, I don't have an IP address. How should I proceed?

I fumbled around trying to create custom network interfaces and trying to make them available through both 'Create network…' and 'Internet sharing', but no luck.

(I'm aware I can bring a router, or set up another Mac to act as one, but I'd like to figure this one out.)

Best Answer

Ah, it seems that the problem is that while "Internet Sharing" is ON, OSX does not instantiate the child connection (in your case, the WiFi network) until you actually get an internet connection on the parent connection.

You can potentially fool it with a loopback adapter on your ethernet connection (and perhaps static addressing and setting the router as itself), but I have not tried it.

Loopback RJ-45