How to create a password protected ad-hoc network on Yosemite
I just tried to create an ad-hoc network on OS X Yosemite and noticed there are no password options. Are they hidden? If so, is there any way to enable them? Is Terminal an option?
Is it possible to create a password protected ad-hoc network on yosemite? If so, how?
You can create a password-protected ad-hoc network by sharing your internet connection. To do so:
- Go to Apple Menu -> System Preferences
- Go to Sharing preference pane
- Select "Internet Sharing"
- Choose the source port
- Set your connection to be broadcast over WiFi
- Click on WiFi options and set a network name and security
While this is a little more involved than just creating the ad-hoc, it will serve the same purpose as well as having the benefit of sharing your connection. At this time, there is no way to add security to an ad-hoc only network on Yosemite.
Source
As a newer answer for making an ad hoc network that works in Mojave without a internet connection, while searching online, I finally found an answer!
Smoooosher's answer only works with an active connection to share.
To create your own "active" network, in terminal run the 2 following commands.
sudo networksetup -createnetworkservice Loopback lo0
sudo networksetup -setmanual Loopback 172.20.42.42 255.255.255.255
This creates a new network conection that although it looks inactive, it can be shared from the internet sharing preference pane to wifi.
source: https://www.laszlopusztai.net/2016/02/14/creating-a-wi-fi-access-point-on-os-x/