I think you would need a router that is not connected to the internet. I think that would not be hard to do. In my case, it would mean unplugging the ethernet cable from the router.
Are you asking how to have your iMac on the same Wi-Fi network as other computers that do access the internet? I think that would be difficult. (@JoeP’s solution of blocking the MAC address had not occurred to me.)
In my situation, in case it helps, I have two networks, one Wi-Fi and one ethernet. The computers and other devices are connected to ethernet all the time, and the ethernet router is not connected to the internet. I have not enabled file or screen sharing, but I would expect them to work, just as I can access the devices on the ethernet network. When I want to access the internet, I turn Wi-Fi on. Having both Wi-Fi and ethernet active is not a problem.
I think Airdrop uses Bluetooth for discovery and an ad hoc WiFi network for point-to-point data transfer. Having the WiFi radio enabled but not configured with an IP would work in this situation.
File sharing (e.g. SMB/CIFS), I believe needs to have the interface configured in advance.
Not having the default gateway field populated (or setting it to 0.0.0.0 if necessary) would mean that the interface would only communicate on the local LAN and would not know how to get outside the LAN. Configuring the interface this way would need to be done manually since DHCP autoconfig would fill in the router/gateway info.
Yes. And as @bb1 wrote, you only need to have the interface enabled. You don’t need to actually be connected to any wireless LAN for AirDrop to work.
Which is good, but it’s still annoying that AirDrop won’t work over wired Ethernet, even when that Ethernet connects to the same router running my Wi-Fi. Oh well.
You could try Blip as an AirDrop alternative. The Macs in College have WiFi/Bluetooth disabled and connect via Ethernet. Students use Blip to send/receive files via WiFi from personal laptops and phones.
Hm Maybe that was what I was thinking of. In that case, the WiFi symbol will be gray?
Out of long habit, I am switching WiFi on then selecting the network. So, ok, hm, think I got it. Switch it on, look for following symbols, and carry on…
The Status Bar Symbol then, will be the wave pattern with line thru it for off; gray symbol for on but not connected to internet (?) and thus capable of local wifi networking (?) and solid symbol for on and connected to the Internet (?).
I used to keep an old iMac on that was attache to three film scanners. I needed it on the LAN to copy scans to my NAS, but I didn’t want the internet polluting it as it was stuck at Lion. I set the subnet mask to 0.0.0.0, and I think that worked.
OK I got it! Finally coming back to this home network saga.
Got screen and file sharing working from MBAir to MacMini over a Thunderbolt cable but it would not work over wifi, with wifi on but not connected to the local router. The Mini I don’t want on the internet, its mission is as a file & print server, so when it needs OS update I want to enable internet or maybe have the MBAir share its connection.
First it looked like maybe Stealth Mode was a culprit. I had it on in the Mini but still no wifi networking when turned off.
Searched again for a variety of keywords, most results were for disabling wifi completely, not enabling wifi for networking locally but no internet.
Thought I’d read it above but now can’t find it but the easiest way was to go into FritzBox’s Filter settings under Parental Controls. I connected the Mini to the local network, found it in the Parental Controls and clicked ‘Block’ and it showed ‘internet access blocked’ or similar. Verified with a browser on the Mini.
Found and connected MBAir and Mini in Finder for file and screen sharing, hurrah!
I had looked for blocking internet by MAC address in the router admin pages but if it’s there it’s harder to find than Parental Controls. Maybe that’s effectively what is happening. I had to refresh myself on if the Mini has a MAC address itself or if this is referring to the wifi component and in the router’s pages it shows the same address as in System Report for the WiFi card.
So, marking this one as solved in the title finally!